Skip to content

addHotkey

addHotkey<T>(map, key, command, precedence): () => void

Defined in: extensions/commands/utils.ts:162

Registers a command for the specified key to the hotkey map.

T

HotkeyMap<T>

Map to add the command to.

string

Key the command will run for.

Hotkey<T>

Command for the specified key.

number = 2

Positive integer denoting the precedence of the command where 0 is the highest precedence. Defaults to 2.

Function to remove the hotkey.

(): void

void