Index

Classes

Variables

Functions

Variables

Let modeState

modeState: GobbleState

Functions

init

  • init(numKeysOrTerminator: string, endCommand: string, ...args: string[]): void
  • Init gobble mode. After parsing the defined number of input keys, or until provided terminator key, execute endCmd with attached parsed input. Escape cancels the mode and returns to normal mode.

    Parameters

    • numKeysOrTerminator: string
    • endCommand: string
    • Rest ...args: string[]

    Returns void

parser

  • parser(keys: MinimalKey[]): { 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