susam / uncap

Map Caps Lock to Escape or any key to any key
MIT License
1.07k stars 44 forks source link

Cannot Map Ctrl to Esc #17

Closed hpr1999 closed 1 year ago

hpr1999 commented 4 years ago

Hey there, thanks for creating this!

I'm having trouble running the following command: uncap 0x1B:0x14 0x14:0x11 0x11:0x1B

Which should do the following:

The last one does NOT work. CAPS successfully acts as CTRL, ESC successfully acts as CAPS. but CTRL continues to be CTRL.

Any idea how I could fix that?

susam commented 4 years ago

Would you please try the following command instead and let me know if it works?

uncap 0x14:0xa2 0x1b:0x14 0xa2:0x1b

The virtual-key code needed to remap the left ctrl key is 0xa2. See https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes for the virtual-key codes.

hpr1999 commented 4 years ago

Thank you so much, that worked. I'm so sorry to have bothered you, I actually searched that page but somehow managed to not find the different "controls". Also, weird that my right control didn't work as ESC either. I'll close this now.

hpr1999 commented 4 years ago

Hey, since the above command is also in the ReadMe, I just wanted to note that rebinding LCTRL as you recommended had weird side effects in Windows for me.

  1. The Alt-Gr / Third-Level-Shift / however you call it on the right of spacebar seems to just enter LCTRL-ALT, which was now ALT and ESC in my case, which was really weird.
  2. Some touchpad gestures started misbehaving, for example tapping with three fingers brought up "project" (win+p) instead whatever I configured. All of that stopped when I stopped rebinding LCTRL with uncap.

I don't know if this is something you can do anything about or if this is some Windows oddity, but I still wanted to mention it.