Skip to main content
Access via:io.hotkeys

Hotkeys API.

4 Methods

isRegistered()⚓︎

(hotkey: string) => boolean

Whether the current app has registered a hotkey.

Parameters (1)

Name Type Required Description
hotkey⚓︎ string

The name of the hotkey you want to check.

register()⚓︎

(hotkey: string | HotkeyInfo, callback: HotkeyCallback) => Promise<void>

Registers a hotkey. All registered hotkeys within the framework must be unique.

Parameters (2)

Name Type Required Description
hotkey⚓︎ string | HotkeyInfo

The key or key combination (as a string or as a HotkeyInfo object) that will be registered.

callback⚓︎ HotkeyCallback

Callback function that will be invoked when the hotkey is activated.

unregister()⚓︎

(hotkey: string) => Promise<void>

Unregisters a hotkey. Notifications will no longer be received about this hotkey.

Parameters (1)

Name Type Required Description
hotkey⚓︎ string

The hotkey to unregister.

unregisterAll()⚓︎

() => Promise<void>

Unregisters all hotkeys registered by the current app.