[PATCH v2 0/1] MR11105: win32u: Fix handling of numlock and right shift.
See user32 tests. MSDN says only numlock behaves this way, but right shift also does. -- v2: win32u: Fix right shift and numlock handling for hardware inputs. https://gitlab.winehq.org/wine/wine/-/merge_requests/11105
From: Etaash Mathamsetty <etaash.mathamsetty@gmail.com> --- dlls/win32u/message.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 1428ff586f4..19e58913b26 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -3947,13 +3947,26 @@ NTSTATUS send_hardware_message( HWND hwnd, UINT flags, const INPUT *input, LPARA } req->input.kbd.vkey = map_scan_to_kbd_vkey( scan, layout ); req->input.kbd.scan = input->ki.wScan & 0xff; + + /* these keys are extended despite not having an extended scancode */ + if (!(flags & SEND_HWMSG_INJECTED)) + { + switch (req->input.kbd.vkey) + { + case VK_NUMLOCK: + case VK_RSHIFT: + req->input.kbd.flags |= KEYEVENTF_EXTENDEDKEY; + break; + default: break; + } + } } else { req->input.kbd.vkey = input->ki.wVk; req->input.kbd.scan = input->ki.wScan; } - req->input.kbd.flags = input->ki.dwFlags & ~KEYEVENTF_SCANCODE; + req->input.kbd.flags |= input->ki.dwFlags & ~KEYEVENTF_SCANCODE; req->input.kbd.time = input->ki.time; req->input.kbd.info = input->ki.dwExtraInfo; break; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11105
participants (2)
-
Etaash Mathamsetty -
Etaash Mathamsetty (@etaash.mathamsetty)