Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

EditorCommandPalette

Inherits: ConfirmationDialog < AcceptDialog < Window < Viewport < Node < Object

Godot editor's command palette.

Description

Object that holds all the available Commands and their shortcuts text. These Commands can be accessed through Editor > Command Palette menu.

Command key names use slash delimiters to distinguish sections, for example: "example/command1" then example will be the section name.

var command_palette = EditorInterface.get_command_palette()
# external_command is a function that will be called with the command is executed.
var command_callable = Callable(self, "external_command").bind(arguments)
command_palette.add_command("command", "test/command",command_callable)

Note: This class shouldn't be instantiated directly. Instead, access the singleton using EditorInterface.get_command_palette.

Properties

bool

dialog_hide_on_ok

false (overrides AcceptDialog)

Methods

void

add_command ( String command_name, String key_n