HotkeyBinding
interface exported by @mwillbanks/tuil-hotkeys.
interface
Public interface exported by @mwillbanks/tuil-hotkeys.
export interface HotkeyBinding extends HotkeyMetadata {
readonly keys: string;
readonly scope?: HotkeyScope;
readonly scopeId?: string;
readonly priority?: number;
readonly enabled?: boolean | (() => boolean);
readonly handler: (event: HotkeyEvent) => void | Promise<void>;
}Members
| Member | Type | Required | Description | Related types |
|---|---|---|---|---|
keys | string | Yes | The keys member uses the string contract. | — |
scope | HotkeyScope | undefined | No | The scope member uses the HotkeyScope | undefined contract. | HotkeyScope |
scopeId | string | undefined | No | The scopeId member uses the string | undefined contract. | — |
priority | number | undefined | No | The priority member uses the number | undefined contract. | — |
enabled | boolean | (() => boolean) | undefined | No | The enabled member uses the boolean | (() => boolean) | undefined contract. | — |
handler | (event: HotkeyEvent) => void | Promise<void> | Yes | The handler member uses the (event: HotkeyEvent) => void | Promise<void> contract. | HotkeyEvent |
title | string | undefined | No | The title member uses the string | undefined contract. | — |
description | string | undefined | No | The description member uses the string | undefined contract. | — |
category | string | undefined | No | The category member uses the string | undefined contract. | — |
commandId | string | undefined | No | The commandId member uses the string | undefined contract. | — |
visibleInHelp | boolean | undefined | No | The visibleInHelp member uses the boolean | undefined contract. | — |
platforms | readonly NodeJS.Platform[] | undefined | No | The platforms member uses the readonly NodeJS.Platform[] | undefined contract. | — |
Parameters
This declaration has no public members.
Returns
This declaration does not return a value.
Throws
No thrown errors are documented for this declaration.
Related types
Source
View the secondary source reference