Function waitKey

  • waitKey(msgOrTimeout?: string | number, timeout?: number): Promise<void>
  • A Promise that presents an optional message on the console and waits for a period of time for keyboard input to resume.

    Returns

    A Promise to await on.

    Parameters

    • Optional msgOrTimeout: string | number

      The message to log to the user console or a timeout (seconds)

    • Optional timeout: number

      The number of milliseconds to wait before resuming, a value < 1 will wait until keyboard input event before resuming.

    Returns Promise<void>