diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-05-23 00:18:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-23 00:18:05 +0200 |
commit | 45d3b965bb55f3111478306070034ed18e8fa5e4 (patch) | |
tree | 5a1a1061cb5edff43310974ca36d363a7b41c910 /core | |
parent | de4c17f716acf0efe484a3f553ebd817fd4c256e (diff) | |
parent | 80f4e407b231bc19d0d2ef0aaaf9e3389f9a621d (diff) |
Merge pull request #48739 from Calinou/textedit-add-select-word-under-cursor
Add a keyboard shortcut to select the word under cursor in TextEdit
Diffstat (limited to 'core')
-rw-r--r-- | core/input/input_map.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index 424509eb47..a43ad4ed7d 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -353,6 +353,7 @@ static const _BuiltinActionDisplayName _builtin_action_display_names[] = { { "ui_text_scroll_down", TTRC("Scroll Down") }, { "ui_text_scroll_down.OSX", TTRC("Scroll Down") }, { "ui_text_select_all", TTRC("Select All") }, + { "ui_text_select_word_under_caret", TTRC("Select Word Under Caret") }, { "ui_text_toggle_insert_mode", TTRC("Toggle Insert Mode") }, { "ui_graph_duplicate", TTRC("Duplicate Nodes") }, { "ui_graph_delete", TTRC("Delete Nodes") }, @@ -651,6 +652,10 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() { default_builtin_cache.insert("ui_text_select_all", inputs); inputs = List<Ref<InputEvent>>(); + inputs.push_back(InputEventKey::create_reference(KEY_D | KEY_MASK_CMD)); + default_builtin_cache.insert("ui_text_select_word_under_caret", inputs); + + inputs = List<Ref<InputEvent>>(); inputs.push_back(InputEventKey::create_reference(KEY_INSERT)); default_builtin_cache.insert("ui_text_toggle_insert_mode", inputs); |