Code52 / carnac

A utility to give some insight into how you use your keyboard
http://carnackeys.com/
Microsoft Public License
4.2k stars 506 forks source link

Added option to only show keys which have a modifier #157

Closed bfritscher closed 7 years ago

bfritscher commented 7 years ago

Fixed shortcutOnly to work only with keymaps file. Maybe shortcutOnly should be renamed or better explained? This is a rework and split into smaller commit of #151 and should resolve issue #94.

After looking into the code as I understand it the show only shortcuts was meant to only display key pressed which are listed in the keymaps yaml files and it is per process. The naming is misleading. As evidenced by issue #94

But in the process of adding the merge function and reusing the Message(IEnumerable keys, KeyShortcut shortcut) constructor. All the merged text and x times got a isShortcut=true. Therefore in the current state Only Shortcut shows everything except modifier keys without keympas file and individual characters. By adding a third argument which is only passed from the ShortcutAccumulator the original function is restored.

But this does not solve the problem to have a feature to only show "shortcut keys" meaning any combination of alt,ctrl,shift, windows keys. Those are also called modifiers keys. So I added an option to only display modifiers keys throughout any process.

JasonKleban commented 7 years ago

I didn't try it out, but it sounds perfect! Thanks.