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.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”HotkeyMap<T>
Map to add the command to.
string
Key the command will run for.
command
Section titled “command”Hotkey<T>
Command for the specified key.
precedence
Section titled “precedence”number = 2
Positive integer denoting the precedence of the command where 0
is the highest precedence. Defaults to 2.
Returns
Section titled “Returns”Function to remove the hotkey.
():
void
Returns
Section titled “Returns”void