ililim / dual-key-remap

Remap any key to any other two keys on Windows 🔥. Remap CapsLock to both Ctrl and Escape! (It's like xcape for windows!)
GNU General Public License v2.0
512 stars 36 forks source link

Having trouble mapping multiple keys #20

Closed wizonesolutions closed 4 years ago

wizonesolutions commented 4 years ago

I'm trying to get my keys to behave like how they do on my Linux install. It's kind of weird, but it would be good for my muscle memory to have the same behavior for now:

remap_key=CAPSLOCK
when_alone=ESCAPE
with_other=CTRL

remap_key=RIGHT_WINDOWS
when_alone=RIGHT_WINDOWS
with_other=RIGHT_CTRL

remap_key=RIGHT_CTRL
when_alone=RIGHT_CTRL
with_other=RIGHT_WINDOWS

Basically, Windows + a key acts as a Ctrl, and Windows otherwise. The opposite for Right Ctrl.

Those mappings (the second and third) don't do anything. I am on version 0.4, so it should be the release with support for multiple remappings. I'll play around with this more and see if I can figure something out.

wizonesolutions commented 4 years ago

Tried this config:

remap_key=CAPSLOCK
when_alone=ESCAPE
with_other=CTRL

remap_key=RIGHT_WINDOWS
when_alone=WINDOWS
with_other=CTRL

remap_key=RIGHT_CTRL
when_alone=CTRL
with_other=WINDOWS

debug=1

Here's some logs with debug mode on:

# Right Win + T
Logged keypress (Injected: 0, vkCode: 92, scanCode: 92, flags: 1, dwExtraInfo: 0                                        Logged keypress (Injected: 0, vkCode: 84, scanCode: 20, flags: 0, dwExtraInfo: 0                                        Logged keypress (Injected: 0, vkCode: 84, scanCode: 20, flags: 128, dwExtraInfo: 0                                      Logged keypress (Injected: 0, vkCode: 92, scanCode: 92, flags: 129, dwExtraInfo: 0 

# Right Ctrl + L
Logged keypress (Injected: 0, vkCode: 163, scanCode: 29, flags: 1, dwExtraInfo: 0
Logged keypress (Injected: 0, vkCode: 84, scanCode: 20, flags: 0, dwExtraInfo: 0
Logged keypress (Injected: 0, vkCode: 84, scanCode: 20, flags: 128, dwExtraInfo: 0
Logged keypress (Injected: 0, vkCode: 163, scanCode: 29, flags: 129, dwExtraInfo: 0
wizonesolutions commented 4 years ago

I just went with SharpKeys, which is working fine. Also, Linux is behaving as expected (fully-swapped Right Win/Right Ctrl) after a restart, so that's good enough.

ililim commented 4 years ago

Just clarify, did config 2 work for you in the end?

wizonesolutions commented 4 years ago

No, the config in https://github.com/ililim/dual-key-remap/issues/20#issuecomment-583075296 unfortunately didn't work either.