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). --- editor/settings_config_dialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'editor/settings_config_dialog.cpp') diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp index 9f8a531762..e258b66bc4 100644 --- a/editor/settings_config_dialog.cpp +++ b/editor/settings_config_dialog.cpp @@ -163,7 +163,7 @@ void EditorSettingsDialog::_unhandled_input(const Ref &p_event) { handled = true; } - if (k->get_scancode_with_modifiers() == (KEY_MASK_CMD | KEY_F)) { + if (k->get_keycode_with_modifiers() == (KEY_MASK_CMD | KEY_F)) { _focus_current_search_box(); handled = true; } @@ -317,10 +317,10 @@ void EditorSettingsDialog::_wait_for_key(const Ref &p_event) { Ref k = p_event; - if (k.is_valid() && k->is_pressed() && k->get_scancode() != 0) { + if (k.is_valid() && k->is_pressed() && k->get_keycode() != 0) { last_wait_for_key = k; - const String str = keycode_get_string(k->get_scancode_with_modifiers()); + const String str = keycode_get_string(k->get_keycode_with_modifiers()); press_a_key_label->set_text(str); press_a_key->accept_event(); @@ -334,7 +334,7 @@ void EditorSettingsDialog::_press_a_key_confirm() { Ref ie; ie.instance(); - ie->set_scancode(last_wait_for_key->get_scancode()); + ie->set_keycode(last_wait_for_key->get_keycode()); ie->set_shift(last_wait_for_key->get_shift()); ie->set_control(last_wait_for_key->get_control()); ie->set_alt(last_wait_for_key->get_alt()); -- cgit v1.2.3