From e5354cacd0e85dc8c054179b40fecc2d7d24a8fd Mon Sep 17 00:00:00 2001 From: PucklaMotzer09 Date: Sun, 9 Oct 2022 17:07:42 +0200 Subject: Add Caret Insert Below and Above shortcuts to TextEdit --- core/input/input_map.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'core/input') diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index ce76d11b6e..fd766584e2 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") }, @@ -616,6 +620,24 @@ const HashMap>> &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>(); + 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>(); + 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>(); + 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>(); + 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>(); -- cgit v1.2.3