bfritscher / carnac

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

[Feature Request] Allow to ignore and/or rewrite Special keys entirely #18

Open Gordin opened 4 years ago

Gordin commented 4 years ago

I use vim, so I press Escape a lot, and I also have CapsLock remapped to Escape. This means every time I press Escape (CapsLock) I get this:

I would like to be able to ignore the "Capital" entirely and also Abbreviate the "Escape" if possible.

I tried to look into the code myself, but I have no idea about C# and I don't really know where the best place to put something like this would be. If you don't want to implement this I could try myself if you could give me some pointers on where to start.

bfritscher commented 4 years ago

Hi, long time since I looked into the code and even then, I was more focused on adding mouse features. Some pointer I remember: Naming is done here: https://github.com/bfritscher/carnac/blob/beta/src/Carnac.Logic/ReplaceKey.cs#L107 Filtering could be done here: https://github.com/bfritscher/carnac/blob/beta/src/Carnac.Logic/KeyProvider.cs#L134 Merging keys: is used in https://github.com/bfritscher/carnac/blob/beta/src/Carnac.Logic/MessageProvider.cs and defined here https://github.com/bfritscher/carnac/blob/beta/src/Carnac.Logic/Models/Message.cs#L120

EdePC commented 4 years ago

Nop, I have replace all "Escape" occurrences by "Esc" and not working x_x, Where can I find the part that directly prints the key on the screen, something like print "Escape" to put a if "Escape" print "Esc" XD

Gordin commented 4 years ago

Thanks @bfritscher I'll look into the naming stuff.

FYI if anyone happens to have the same problem with Capital + Escape being shown, this was happening because I was using uncap.exe to remap Caps to Escape. Looks like it just intercepts presses to caps, stops them, and presses Escape, but Carnac captures the press before uncap does, so Carnac receives both Keys. I replaced uncap with "SharpKeys", with remaps keys with a registry entry. Now Carnac only shows Escape when I press caps.