tuil
ReferencePackages@mwillbanks/tuil-hotkeysAPI

HotkeyBinding

interface exported by @mwillbanks/tuil-hotkeys.

View rawEdit

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

MemberTypeRequiredDescriptionRelated types
keysstringYesThe keys member uses the string contract.
scopeHotkeyScope | undefinedNoThe scope member uses the HotkeyScope | undefined contract.HotkeyScope
scopeIdstring | undefinedNoThe scopeId member uses the string | undefined contract.
prioritynumber | undefinedNoThe priority member uses the number | undefined contract.
enabledboolean | (() => boolean) | undefinedNoThe enabled member uses the boolean | (() => boolean) | undefined contract.
handler(event: HotkeyEvent) => void | Promise<void>YesThe handler member uses the (event: HotkeyEvent) => void | Promise<void> contract.HotkeyEvent
titlestring | undefinedNoThe title member uses the string | undefined contract.
descriptionstring | undefinedNoThe description member uses the string | undefined contract.
categorystring | undefinedNoThe category member uses the string | undefined contract.
commandIdstring | undefinedNoThe commandId member uses the string | undefined contract.
visibleInHelpboolean | undefinedNoThe visibleInHelp member uses the boolean | undefined contract.
platformsreadonly NodeJS.Platform[] | undefinedNoThe 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.

Source

View the secondary source reference

Package

@mwillbanks/tuil-hotkeys

On this page