diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp index 168fe5a7ace..18a251a306b 100644 --- a/editor/editor_command_palette.cpp +++ b/editor/editor_command_palette.cpp @@ -357,3 +357,13 @@ Ref ED_SHORTCUT_AND_COMMAND(const String &p_path, const String &p_name EditorCommandPalette::get_singleton()->add_shortcut_command(p_command_name, p_path, shortcut); return shortcut; } + +Ref ED_SHORTCUT_ARRAY_AND_COMMAND(const String &p_path, const String &p_name, const PackedInt32Array &p_keycodes, String p_command_name) { + if (p_command_name.is_empty()) { + p_command_name = p_name; + } + + Ref shortcut = ED_SHORTCUT_ARRAY(p_path, p_name, p_keycodes); + EditorCommandPalette::get_singleton()->add_shortcut_command(p_command_name, p_path, shortcut); + return shortcut; +} diff --git a/editor/editor_command_palette.h b/editor/editor_command_palette.h index 7eb9ff74045..b34c4ddf971 100644 --- a/editor/editor_command_palette.h +++ b/editor/editor_command_palette.h @@ -105,5 +105,6 @@ public: }; Ref ED_SHORTCUT_AND_COMMAND(const String &p_path, const String &p_name, Key p_keycode = Key::NONE, String p_command = ""); +Ref ED_SHORTCUT_ARRAY_AND_COMMAND(const String &p_path, const String &p_name, const PackedInt32Array &p_keycodes, String p_command = ""); #endif // EDITOR_COMMAND_PALETTE_H