summaryrefslogtreecommitdiffstats
path: root/editor/input_event_configuration_dialog.h
diff options
context:
space:
mode:
authorMel Collins <sigh@ambimist.com>2023-08-03 15:18:26 +0200
committerMel Collins <sigh@ambimist.com>2024-01-26 14:42:28 +0100
commit8406e60522bb8d09649193be43c1c819edc1d059 (patch)
tree3c9ad2268b5c0c4ab50387e8d745528b2856daed /editor/input_event_configuration_dialog.h
parent4b6ad349886288405890b07d4a8da425eb3c97ec (diff)
downloadredot-engine-8406e60522bb8d09649193be43c1c819edc1d059.tar.gz
Add InputEventKey.location to tell left from right
This adds a new enum `KeyLocation` and associated property `InputEventKey.location`, which indicates the left/right location of key events which may come from one of two physical keys, eg. Shift, Ctrl. It also adds simulation of missing Shift KEYUP events for Windows. When multiple Shifts are held down at the same time, Windows natively only sends a KEYUP for the last one to be released.
Diffstat (limited to 'editor/input_event_configuration_dialog.h')
-rw-r--r--editor/input_event_configuration_dialog.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/input_event_configuration_dialog.h b/editor/input_event_configuration_dialog.h
index bde0b73ade..3ef089be8b 100644
--- a/editor/input_event_configuration_dialog.h
+++ b/editor/input_event_configuration_dialog.h
@@ -99,6 +99,9 @@ private:
OptionButton *key_mode = nullptr;
+ HBoxContainer *location_container = nullptr;
+ OptionButton *key_location = nullptr;
+
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();
@@ -110,6 +113,7 @@ private:
void _mod_toggled(bool p_checked, int p_index);
void _autoremap_command_or_control_toggled(bool p_checked);
void _key_mode_selected(int p_mode);
+ void _key_location_selected(int p_location);
void _device_selection_changed(int p_option_button_index);
void _set_current_device(int p_device);