diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 10:32:07 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 10:32:07 +0100 |
commit | 273410ba5a5eae4ee9614f76a9c31770b934669a (patch) | |
tree | 53d252b0a92b221ccdf1c9d7d351f0d42ce14c9f /core/input | |
parent | 996f7e5142b5055fca4b0fab2929c6082a76e404 (diff) | |
parent | e5354cacd0e85dc8c054179b40fecc2d7d24a8fd (diff) |
Merge pull request #67139 from PucklaMotzer09/insert_caret_at_carets
Add Caret Insert Below and Above shortcuts to TextEdit
Diffstat (limited to 'core/input')
-rw-r--r-- | core/input/input_map.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index 0c765fe23c..ea75a6b079 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -331,6 +331,10 @@ static const _BuiltinActionDisplayName _builtin_action_display_names[] = { { "ui_text_caret_document_start.macos", TTRC("Caret Document Start") }, { "ui_text_caret_document_end", TTRC("Caret Document End") }, { "ui_text_caret_document_end.macos", TTRC("Caret Document End") }, + { "ui_text_caret_add_below", TTRC("Caret Add Below") }, + { "ui_text_caret_add_below.macos", TTRC("Caret Add Below") }, + { "ui_text_caret_add_above", TTRC("Caret Add Above") }, + { "ui_text_caret_add_above.macos", TTRC("Caret Add Above") }, { "ui_text_scroll_up", TTRC("Scroll Up") }, { "ui_text_scroll_up.macos", TTRC("Scroll Up") }, { "ui_text_scroll_down", TTRC("Scroll Down") }, @@ -617,6 +621,24 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() { inputs.push_back(InputEventKey::create_reference(Key::DOWN | KeyModifierMask::CMD_OR_CTRL)); default_builtin_cache.insert("ui_text_caret_document_end.macos", inputs); + // Text Caret Addition Below/Above + + inputs = List<Ref<InputEvent>>(); + inputs.push_back(InputEventKey::create_reference(Key::DOWN | KeyModifierMask::SHIFT | KeyModifierMask::CMD_OR_CTRL)); + default_builtin_cache.insert("ui_text_caret_add_below", inputs); + + inputs = List<Ref<InputEvent>>(); + inputs.push_back(InputEventKey::create_reference(Key::L | KeyModifierMask::SHIFT | KeyModifierMask::CMD_OR_CTRL)); + default_builtin_cache.insert("ui_text_caret_add_below.macos", inputs); + + inputs = List<Ref<InputEvent>>(); + inputs.push_back(InputEventKey::create_reference(Key::UP | KeyModifierMask::SHIFT | KeyModifierMask::CMD_OR_CTRL)); + default_builtin_cache.insert("ui_text_caret_add_above", inputs); + + inputs = List<Ref<InputEvent>>(); + inputs.push_back(InputEventKey::create_reference(Key::O | KeyModifierMask::SHIFT | KeyModifierMask::CMD_OR_CTRL)); + default_builtin_cache.insert("ui_text_caret_add_above.macos", inputs); + // Text Scrolling inputs = List<Ref<InputEvent>>(); |