diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-07-31 22:59:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-31 22:59:24 +0200 |
commit | 878f34d1e1a18398e7e12c778785aee7a1de3367 (patch) | |
tree | 34bb72e58c448187c67ea477b06ec92363e236a1 /platform | |
parent | 7348fbbea2bda6589a6d2041c4bf19f4bcb997e0 (diff) | |
parent | 66d302251698f50ab73c62a0305c589b75c10f85 (diff) |
Merge pull request #9886 from bruvzg/3.0-win-num-enter-fix
Fix Numpad Enter key on Windows (3.0)
Diffstat (limited to 'platform')
-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 c091c7d022..da14d5c284 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); |