diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-01-25 09:49:14 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-01-25 09:49:14 +0200 |
commit | 8d51af1c8dfb1b90e2fc1abf64898f19e84cdfff (patch) | |
tree | 67fff81c19d9846602eab49eacd834796a10bf87 | |
parent | a3a42159e31db27f8ae7c1ecad6a9ed417cb05de (diff) |
[Windows] Fix ToUnicodeEx resetting some dead key states.
-rw-r--r-- | platform/windows/display_server_windows.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 521bf85b27..610fc92265 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -3663,7 +3663,7 @@ void DisplayServerWindows::_process_key_events() { memset(keyboard_state, 0, 256); wchar_t chars[256] = {}; UINT extended_code = MapVirtualKey((ke.lParam >> 16) & 0xFF, MAPVK_VSC_TO_VK_EX); - if (!(ke.lParam & (1 << 24)) && ToUnicodeEx(extended_code, (ke.lParam >> 16) & 0xFF, keyboard_state, chars, 255, 0, GetKeyboardLayout(0)) > 0) { + if (!(ke.lParam & (1 << 24)) && ToUnicodeEx(extended_code, (ke.lParam >> 16) & 0xFF, keyboard_state, chars, 255, 4, GetKeyboardLayout(0)) > 0) { String keysym = String::utf16((char16_t *)chars, 255); if (!keysym.is_empty()) { key_label = fix_key_label(keysym[0], keycode); @@ -3715,7 +3715,7 @@ void DisplayServerWindows::_process_key_events() { memset(keyboard_state, 0, 256); wchar_t chars[256] = {}; UINT extended_code = MapVirtualKey((ke.lParam >> 16) & 0xFF, MAPVK_VSC_TO_VK_EX); - if (!(ke.lParam & (1 << 24)) && ToUnicodeEx(extended_code, (ke.lParam >> 16) & 0xFF, keyboard_state, chars, 255, 0, GetKeyboardLayout(0)) > 0) { + if (!(ke.lParam & (1 << 24)) && ToUnicodeEx(extended_code, (ke.lParam >> 16) & 0xFF, keyboard_state, chars, 255, 4, GetKeyboardLayout(0)) > 0) { String keysym = String::utf16((char16_t *)chars, 255); if (!keysym.is_empty()) { key_label = fix_key_label(keysym[0], keycode); |