diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2018-04-05 20:59:35 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-02-25 12:30:33 +0200 |
commit | 1af06d3d4608b17c74caed951cd9579ccbba229d (patch) | |
tree | a0d57c6cd3c00614a5a30290085e91a6097e78b6 /editor/settings_config_dialog.cpp | |
parent | 376a8255a9b65b016fcd81634bfd54fb7fa029df (diff) |
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).
Diffstat (limited to 'editor/settings_config_dialog.cpp')
-rw-r--r-- | editor/settings_config_dialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<InputEvent> &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<InputEvent> &p_event) { Ref<InputEventKey> 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<InputEventKey> 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()); |