microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.14k stars 6.43k forks source link

[KBM] Visualizer and Tester #2817

Open arjunbalgovind opened 4 years ago

arjunbalgovind commented 4 years ago

Summary of the new feature/enhancement

A keyboard manager can't be "perfect" and "complete" without an actual visualization for the new remapped keyboard. With a fluent UI it would be cool to have something which would show you how your keyboard layout looks like after remappings keys, and even better something where you can press your keys and see animation like the On-Screen Keyboard. image If you swapped your Win and Ctrl keys, the keyboard visualizer extension would appear like that, and whenever you click your keys that would highlight. The same could be done for remapping shortcuts, so users can see exactly what happens when they remap their keys and shortcuts. Having a visualization makes it much easier for users to remember and understand their mappings as well as they could have the opportunity to use a tool which swallows all keyboard input to test out their new remappings.

This could start out as an English keyboard feature since it might be hard to handle all languages. It is a known thing that even for english keyboards, the layout varies a bit from keyboard to keyboard. To solve that we could have a default layout and the users can move the keys around to make it appear like their physical keyboard pre-remap.

Proposed technical implementation details (optional)

Everything mentioned above is technically possible, it just mostly needs UI development. For just having a tool which swallows all your input we already have the Type Key interface on KBM, so the backend will be exactly the same as that, except instead of displaying the key name, we would highlight the key on the keyboard (at the end of the day everything is just key codes internally). For the UI to support keyboard with different layouts we would need to have draggable blocks which would be keys, and they would start in a default keyboard layout. The user would then be able to move the keys around to look more like there own keyboard (sort of reminiscent of the FancyZones editor). For highlighting the key and showing the remapped versions of keyboard the above layout doesnt really matter since we deal with key codes at the end of the day. It just makes the visualization for the user better and improves the user experience a ton.

arjunbalgovind commented 3 years ago

@crutkas something like this would make KBM more accessible and easy to understand the remappings. Having a "test-bed" for remappings would let users play around with what keys/shortcuts they are pressing and visually see what shortcuts/key events are being sent to the system as a result. This also adds an alternate UI experience to KBM, which resembles what the Microsoft Keyboard Layout Creator does (you can see a keyboard and swap around keys on it). This allows you to physically see what your "remapped" keyboard looks like. This is equivalent to removing and swapping around key caps on a mechanical keyboard, so a user can visually tell what the new layout is (consider someone who switches from QWERTY to something else).