diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-03-06 10:31:23 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-13 22:04:08 +0100 |
commit | 4cce35824192e855cfda949259cbd149a2165570 (patch) | |
tree | c94c7a95bc16ef0843cc85264a7436925cf589b7 /platform | |
parent | ef3f1d426d4bb10be75b9984989f3fd145eddf53 (diff) |
[Windows] Update modifier key status during IME input.
(cherry picked from commit ba995c6ea1aa7f7eaff4e5d6673c7d6a096011dc)
Diffstat (limited to 'platform')
-rw-r--r-- | platform/windows/display_server_windows.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 92af3fef69..360e446de7 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -3404,16 +3404,8 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA } break; case WM_SYSKEYUP: case WM_KEYUP: - if (windows[window_id].ime_suppress_next_keyup) { - windows[window_id].ime_suppress_next_keyup = false; - break; - } - [[fallthrough]]; case WM_SYSKEYDOWN: case WM_KEYDOWN: { - if (windows[window_id].ime_in_progress) { - break; - } if (wParam == VK_SHIFT) { shift_mem = (uMsg == WM_KEYDOWN || uMsg == WM_SYSKEYDOWN); } @@ -3426,6 +3418,17 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA gr_mem = alt_mem; } } + if (wParam == VK_LWIN || wParam == VK_RWIN) { + meta_mem = (uMsg == WM_KEYDOWN || uMsg == WM_SYSKEYDOWN); + } + + if (windows[window_id].ime_suppress_next_keyup && (uMsg == WM_KEYUP || uMsg == WM_SYSKEYUP)) { + windows[window_id].ime_suppress_next_keyup = false; + break; + } + if (windows[window_id].ime_in_progress) { + break; + } if (mouse_mode == MOUSE_MODE_CAPTURED) { // When SetCapture is used, ALT+F4 hotkey is ignored by Windows, so handle it ourselves |