diff options
Diffstat (limited to 'core/input')
-rw-r--r-- | core/input/input.cpp | 2 | ||||
-rw-r--r-- | core/input/input_map.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp index 1321e40795..cb65d2569c 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -1310,7 +1310,7 @@ void Input::parse_mapping(String p_mapping) { JoyButton output_button = _get_output_button(output); JoyAxis output_axis = _get_output_axis(output); ERR_CONTINUE_MSG(output_button == JoyButton::INVALID && output_axis == JoyAxis::INVALID, - vformat("Unrecognised output string \"%s\" in mapping:\n%s", output, p_mapping)); + vformat("Unrecognized output string \"%s\" in mapping:\n%s", output, p_mapping)); ERR_CONTINUE_MSG(output_button != JoyButton::INVALID && output_axis != JoyAxis::INVALID, vformat("Output string \"%s\" matched both button and axis in mapping:\n%s", output, p_mapping)); diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index 233065fe8b..1c7d71e309 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -342,6 +342,7 @@ static const _BuiltinActionDisplayName _builtin_action_display_names[] = { { "ui_text_select_all", TTRC("Select All") }, { "ui_text_select_word_under_caret", TTRC("Select Word Under Caret") }, { "ui_text_add_selection_for_next_occurrence", TTRC("Add Selection for Next Occurrence") }, + { "ui_text_clear_carets_and_selection", TTRC("Clear Carets and Selection") }, { "ui_text_toggle_insert_mode", TTRC("Toggle Insert Mode") }, { "ui_text_submit", TTRC("Text Submitted") }, { "ui_graph_duplicate", TTRC("Duplicate Nodes") }, @@ -672,6 +673,10 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() { default_builtin_cache.insert("ui_text_add_selection_for_next_occurrence", inputs); inputs = List<Ref<InputEvent>>(); + inputs.push_back(InputEventKey::create_reference(Key::ESCAPE)); + default_builtin_cache.insert("ui_text_clear_carets_and_selection", inputs); + + inputs = List<Ref<InputEvent>>(); inputs.push_back(InputEventKey::create_reference(Key::INSERT)); default_builtin_cache.insert("ui_text_toggle_insert_mode", inputs); |