Class KeyBinding

Represents a key combination that can trigger a keyboard shortcut.

Implements

  • KeyCombination

Constructors

Properties

altKey: boolean

Inherit Doc

controlOrMeta: boolean

Inherit Doc

ctrlKey: boolean

Inherit Doc

key: string

Inherit Doc

metaKey: boolean

Inherit Doc

shiftKey: undefined | boolean

If undefined, the state of the shift key is ignored.

Methods

  • Returns true if and only if keyEvent should trigger this shortcut.

    Parameters

    • keyEvent: Partial<KeyCombination>

    Returns boolean

  • Accepts a string in the form modifier1+modifier2+...+key (e.g. Ctrl+Shift+a) and returns the corresponding KeyboardShortcut.

    Parameters

    • shortcutStr: string

    Returns KeyBinding

Generated using TypeDoc

OpenSource licenses