diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-03-01 23:00:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-01 23:00:42 +0100 |
commit | e2b66cacf78ae39b94df748e9740b98a1f011e77 (patch) | |
tree | 56d468d762c43879c20b342702e8fc999221e6c6 /platform/haiku | |
parent | 55396d6e06f8e4e355e9ab0595bdb7f27c1c36dd (diff) | |
parent | 1af06d3d4608b17c74caed951cd9579ccbba229d (diff) |
Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodes
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
Diffstat (limited to 'platform/haiku')
-rw-r--r-- | platform/haiku/haiku_direct_window.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp index 3c2b7f8d10..2d7efe6b61 100644 --- a/platform/haiku/haiku_direct_window.cpp +++ b/platform/haiku/haiku_direct_window.cpp @@ -273,7 +273,8 @@ void HaikuDirectWindow::HandleKeyboardEvent(BMessage *message) { event.instance(); GetKeyModifierState(event, modifiers); event->set_pressed(message->what == B_KEY_DOWN); - event->set_scancode(KeyMappingHaiku::get_keysym(raw_char, key)); + event->set_keycode(KeyMappingHaiku::get_keysym(raw_char, key)); + event->set_physical_keycode(KeyMappingHaiku::get_keysym(raw_char, key)); event->set_echo(message->HasInt32("be:key_repeat")); event->set_unicode(0); @@ -283,8 +284,9 @@ void HaikuDirectWindow::HandleKeyboardEvent(BMessage *message) { } //make it consistent across platforms. - if (event->get_scancode() == KEY_BACKTAB) { - event->set_scancode(KEY_TAB); + if (event->get_keycode() == KEY_BACKTAB) { + event->set_keycode(KEY_TAB); + event->set_physical_keycode(KEY_TAB); event->set_shift(true); } |