From 1af06d3d4608b17c74caed951cd9579ccbba229d Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 5 Apr 2018 20:59:35 +0300 Subject: Rename `scancode` to `keycode`. Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes). --- platform/haiku/haiku_direct_window.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'platform/haiku') 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); } -- cgit v1.2.3