Merge pull request #70489 from stmSi/fix-certain-editor-shortcuts-insert-characters-into-code

Fix Editor Shortcut keys are inserting in Script Editor
This commit is contained in:
Rémi Verschelde 2023-01-03 12:16:14 +01:00
commit 81f0ddeae0
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -3003,6 +3003,7 @@ void ScriptEditor::shortcut_input(const Ref<InputEvent> &p_event) {
_go_to_tab(script_list->get_item_metadata(next_tab)); _go_to_tab(script_list->get_item_metadata(next_tab));
_update_script_names(); _update_script_names();
} }
accept_event();
} }
if (ED_IS_SHORTCUT("script_editor/prev_script", p_event)) { if (ED_IS_SHORTCUT("script_editor/prev_script", p_event)) {
if (script_list->get_item_count() > 1) { if (script_list->get_item_count() > 1) {
@ -3011,12 +3012,15 @@ void ScriptEditor::shortcut_input(const Ref<InputEvent> &p_event) {
_go_to_tab(script_list->get_item_metadata(next_tab)); _go_to_tab(script_list->get_item_metadata(next_tab));
_update_script_names(); _update_script_names();
} }
accept_event();
} }
if (ED_IS_SHORTCUT("script_editor/window_move_up", p_event)) { if (ED_IS_SHORTCUT("script_editor/window_move_up", p_event)) {
_menu_option(WINDOW_MOVE_UP); _menu_option(WINDOW_MOVE_UP);
accept_event();
} }
if (ED_IS_SHORTCUT("script_editor/window_move_down", p_event)) { if (ED_IS_SHORTCUT("script_editor/window_move_down", p_event)) {
_menu_option(WINDOW_MOVE_DOWN); _menu_option(WINDOW_MOVE_DOWN);
accept_event();
} }
} }