Skip to content

Hotkey

Defined in: src/core/hotkeys.ts:46

A registered hotkey (the HotkeyOptions plus assigned id and resolved key).

optional context?: string | readonly string[]

Defined in: src/core/hotkeys.ts:36

App context(s) this hotkey is active in. Omitted means global (active in every context). Matched against HotkeyRegistry.context.

HotkeyOptions.context


optional description?: string

Defined in: src/core/hotkeys.ts:29

One-line explanation shown next to the name.

HotkeyOptions.description


optional enabled?: () => boolean

Defined in: src/core/hotkeys.ts:38

Extra gate evaluated at dispatch and list time (e.g. “has selection”).

boolean

HotkeyOptions.enabled


readonly group: string

Defined in: src/core/hotkeys.ts:54

Resolved group name (defaults to “General”).

HotkeyOptions.group


handler: (ev) => void

Defined in: src/core/hotkeys.ts:42

Called when the key is pressed.

KeyEvent

void

HotkeyOptions.handler


optional hidden?: boolean

Defined in: src/core/hotkeys.ts:40

Keep the hotkey functional but omit it from the palette listing.

HotkeyOptions.hidden


readonly id: number

Defined in: src/core/hotkeys.ts:48

Unique registration id.


readonly key: string

Defined in: src/core/hotkeys.ts:50

Canonical normalized key, e.g. "ctrl+shift+p".

HotkeyOptions.key


readonly keyLabel: string

Defined in: src/core/hotkeys.ts:52

Display form of the key, e.g. "Ctrl+Shift+P".


name: string

Defined in: src/core/hotkeys.ts:27

Short human name shown in the palette, e.g. “Save file”.

HotkeyOptions.name