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
499 stars 36 forks source link

LEFT_CTRL also remapping RIGHT_CTRL #35

Closed mtayler closed 3 years ago

mtayler commented 3 years ago

When dual-key-remap config is configured as:

remap_key=LEFT_CTRL
when_alone=ESCAPE
with_other=LEFT_CTRL

debug=1

Pressing RIGHT_CTRL also triggers the key remap:

dual-key-remap.exe version: 0.4, author: ililim

# Left control x2 (162)
Logged keypress (Injected: 0, vkCode: 162, scanCode: 29, flags: 0, dwExtraInfo: 0
Logged keypress (Injected: 0, vkCode: 162, scanCode: 29, flags: 128, dwExtraInfo: 0
Logged keypress (Injected: 1, vkCode: 27, scanCode: 1, flags: 16, dwExtraInfo: 4291022551
Logged keypress (Injected: 1, vkCode: 27, scanCode: 1, flags: 144, dwExtraInfo: 4291022551

Logged keypress (Injected: 0, vkCode: 162, scanCode: 29, flags: 0, dwExtraInfo: 0
Logged keypress (Injected: 0, vkCode: 162, scanCode: 29, flags: 128, dwExtraInfo: 0
Logged keypress (Injected: 1, vkCode: 27, scanCode: 1, flags: 16, dwExtraInfo: 4291022551
Logged keypress (Injected: 1, vkCode: 27, scanCode: 1, flags: 144, dwExtraInfo: 4291022551

# Right control x2 (163)
Logged keypress (Injected: 0, vkCode: 163, scanCode: 29, flags: 1, dwExtraInfo: 0
Logged keypress (Injected: 0, vkCode: 163, scanCode: 29, flags: 129, dwExtraInfo: 0
Logged keypress (Injected: 1, vkCode: 27, scanCode: 1, flags: 16, dwExtraInfo: 4291022551
Logged keypress (Injected: 1, vkCode: 27, scanCode: 1, flags: 144, dwExtraInfo: 4291022551

Logged keypress (Injected: 0, vkCode: 163, scanCode: 29, flags: 1, dwExtraInfo: 0
Logged keypress (Injected: 0, vkCode: 163, scanCode: 29, flags: 129, dwExtraInfo: 0
Logged keypress (Injected: 1, vkCode: 27, scanCode: 1, flags: 16, dwExtraInfo: 4291022551
Logged keypress (Injected: 1, vkCode: 27, scanCode: 1, flags: 144, dwExtraInfo: 4291022551
kmac commented 3 years ago

I must be seeing the same thing since I have the same config.txt.

FYI, I am trying to use LEFT_CTRL instead of CONTROL here as a workaround to Issue #26, so that I'd have RIGHT_CTRL in Remote Desktop, but it's not working.

[Thanks for this software. It's really nice to have xcape-like functionality in windows.]

mardukbp commented 3 years ago

Try using VK_LCONTROL instead of LEFT_CTRL.

kmac commented 3 years ago

VK_LCONTROL does work, thanks! I have RIGHT_CONTROL working now.

ililim commented 3 years ago

Interesting! I'm working on a big update right now that adds automated testing to it will be a little easier to maintain this app, I'll review this issue while I'm at it.

ililim commented 3 years ago

All keys are now sent by virtual codes. For anyone having issues please try the latest version https://github.com/ililim/dual-key-remap/discussions/36

Closing this now, feel free to open a new issue if the problem persists.