mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Merge pull request #9886 from bruvzg/3.0-win-num-enter-fix
Fix Numpad Enter key on Windows (3.0)
This commit is contained in:
commit
878f34d1e1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user