diff options
Diffstat (limited to 'editor/input_event_configuration_dialog.h')
-rw-r--r-- | editor/input_event_configuration_dialog.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/editor/input_event_configuration_dialog.h b/editor/input_event_configuration_dialog.h index 67906233dd..e7ab0da4d6 100644 --- a/editor/input_event_configuration_dialog.h +++ b/editor/input_event_configuration_dialog.h @@ -50,7 +50,10 @@ private: Ref<Texture2D> joypad_axis; } icon_cache; - Ref<InputEvent> event = Ref<InputEvent>(); + Ref<InputEvent> event; + Ref<InputEvent> original_event; + + bool in_tree_update = false; // Listening for input EventListenerLineEdit *event_listener = nullptr; @@ -88,9 +91,15 @@ private: CheckBox *mod_checkboxes[MOD_MAX]; CheckBox *autoremap_command_or_control_checkbox = nullptr; - CheckBox *physical_key_checkbox = nullptr; + enum KeyMode { + KEYMODE_KEYCODE, + KEYMODE_PHY_KEYCODE, + KEYMODE_UNICODE, + }; + + OptionButton *key_mode = nullptr; - void _set_event(const Ref<InputEvent> &p_event, bool p_update_input_list_selection = true); + void _set_event(const Ref<InputEvent> &p_event, const Ref<InputEvent> &p_original_event, bool p_update_input_list_selection = true); void _on_listen_input_changed(const Ref<InputEvent> &p_event); void _on_listen_focus_changed(); @@ -100,7 +109,7 @@ private: void _mod_toggled(bool p_checked, int p_index); void _autoremap_command_or_control_toggled(bool p_checked); - void _physical_keycode_toggled(bool p_checked); + void _key_mode_selected(int p_mode); void _device_selection_changed(int p_option_button_index); void _set_current_device(int p_device); |