hotkeys
Description
Optional. Allows specifying custom hotkeys for Editor actionsUsage
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 enabledfalse– default hotkey is disabled
(e?: KeyboardEvent) => void: a function that receives the keyboard event (KeyboardEvent) and performs a custom action
- boolean:
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".
| Hotkey | Description |
|---|---|
Ctrl+S | Saves changes |
Escape | Closes a dialog or cancels an action |
Delete | Deletes an item |
Example
<Editor hotkeys={{ delete: false }} />