Skip to main content

hotkeys

Description

Optional. Allows specifying custom hotkeys for Editor actions

Usage

hotkeys?: false | { [key: string]: ((e?: KeyboardEvent) => void) | boolean };

Parameters

The property can take the following values:

  • false – disables all hotkeys
  • An object where:
    • key – a string representing a keyboard shortcut, e.g., "ctrl+n", "Delete", "ctrl+shift+f"
    • value – can be one of the following:
      • boolean:
        • true (default) – default hotkey is enabled
        • false – default hotkey is disabled
      • (e?: KeyboardEvent) => void: a function that receives the keyboard event (KeyboardEvent) and performs a custom action

Default hotkeys

These hotkeys only work if the corresponding buttons in the Editor are enabled and have the proper id values: "save", "close", or "delete".

HotkeyDescription
Ctrl+SSaves changes
EscapeCloses a dialog or cancels an action
DeleteDeletes an item

Example

<Editor hotkeys={{ delete: false }} />