Closed ulixxe closed 2 years ago
Thanks for this patch!
Do we need to handle more than just 0xE0
? Which codes?
We probably should move this into the key configuration somehow and list all the codes that require KEYEVENTF_EXTENDEDKEY
there.
I'm reading through https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-keybd_event?redirectedfrom=MSDN but it's relatively sparse on details.
Sounds like we just need to pass this flag for every scan code that starts with 0xE0?
I think to test 0xE0 is enough. I checked it with Keyboard Test Utility by Javad Taheri. With this pull request Right Control is correctly recognized.
My use case is BigCtrl (https://github.com/benhansenslc/BigCtrl), where I map the space bar (when_alone=remap_key) to the right control event (with_other) when pressed together with other keys. Using the right control event, I have the left control key for windows default hotkeys such as copy&paste Ctrl-C and Ctrl-V. Furthermore, I use ewow (https://github.com/zk-phi/ewow) to remap with Autohotkey the right control events to emulate Emacs hotkeys in windows applications. To have this setup working, I need this pull request. Otherwise, Autohotkey doesn't capture the right control events.
Hey I just noticed some other changes were made on this branch. Could you just have one set of changes in this PR? Happy to consider other changes in additional PR's :)
…as RIGHT_CTRL (scancode=0xE01D) needs it.