diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2017-07-26 21:35:54 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2017-07-26 21:35:54 +0300 |
commit | 66d302251698f50ab73c62a0305c589b75c10f85 (patch) | |
tree | 50daf2acf7616858f70726245bcf136dc40a6cf1 /platform/windows | |
parent | 88bd18244bda74843ed6e0b99db106dffa4979bc (diff) |
Fix Numpad Enter key on Windows
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/os_windows.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 3413050f4a..d3db24833b 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -805,7 +805,12 @@ void OS_Windows::process_key_events() { k->set_pressed(ke.uMsg == WM_KEYDOWN); - k->set_scancode(KeyMappingWindows::get_keysym(ke.wParam)); + if ((ke.lParam & (1 << 24)) && (ke.wParam == VK_RETURN)) { + // Special case for Numpad Enter key + k->set_scancode(KEY_ENTER); + } else { + k->set_scancode(KeyMappingWindows::get_keysym(ke.wParam)); + } if (i + 1 < key_event_pos && key_event_buffer[i + 1].uMsg == WM_CHAR) { k->set_unicode(key_event_buffer[i + 1].wParam); |