Index

Classes

Variables

Functions

Variables

Let modeState

modeState: GobbleState

Functions

init

  • init(numChars: number, endCommand: string): void
  • Init gobble mode. After parsing the defined number of input keys, execute endCmd with attached parsed input. Escape cancels the mode and returns to normal mode.

    Parameters

    • numChars: number
    • endCommand: string

    Returns void

parser

  • parser(keys: KeyEventLike[]): { exstr: string; keys: undefined[] } | { exstr: string; isMatch: boolean; keys: undefined[] }
  • Receive keypress. If applicable, execute a command.

    Parameters

    Returns { exstr: string; keys: undefined[] } | { exstr: string; isMatch: boolean; keys: undefined[] }

reset

  • reset(): void