From 0c5fc5eef9df6b67c7f6435bf9f59d7da0009f27 Mon Sep 17 00:00:00 2001 From: kobewi Date: Thu, 21 Aug 2025 23:37:27 +0200 Subject: [PATCH] Assign shortcuts to prev/next script buttons --- editor/script/script_editor_plugin.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/editor/script/script_editor_plugin.cpp b/editor/script/script_editor_plugin.cpp index 7374b1a0f47..eb5d016f1ac 100644 --- a/editor/script/script_editor_plugin.cpp +++ b/editor/script/script_editor_plugin.cpp @@ -4461,17 +4461,19 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) { script_back = memnew(Button); script_back->set_theme_type_variation(SceneStringName(FlatButton)); - script_back->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_history_back)); - menu_hb->add_child(script_back); - script_back->set_disabled(true); script_back->set_tooltip_text(TTRC("Go to previous edited document.")); + script_back->set_shortcut(ED_GET_SHORTCUT("script_editor/history_previous")); + script_back->set_disabled(true); + menu_hb->add_child(script_back); + script_back->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_history_back)); script_forward = memnew(Button); script_forward->set_theme_type_variation(SceneStringName(FlatButton)); - script_forward->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_history_forward)); - menu_hb->add_child(script_forward); - script_forward->set_disabled(true); script_forward->set_tooltip_text(TTRC("Go to next edited document.")); + script_forward->set_shortcut(ED_GET_SHORTCUT("script_editor/history_next")); + script_forward->set_disabled(true); + menu_hb->add_child(script_forward); + script_forward->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_history_forward)); menu_hb->add_child(memnew(VSeparator));