@shopify/cli-kit
    Preparing search index...

    Function keypress

    • Waits for a key to be pressed. Ctrl+C rejects with AbortSilentError, which terminates the process.

      Raw mode is set back to the state it had before the call. A command that keeps stdin raw for its own single-key shortcuts (for example theme dev) keeps them.

      Chunks are read as text: an active Ink renderer calls stdin.setEncoding('utf8'), and then stdin emits strings instead of Buffers.

      Parameters

      • stdin: ReadStream & {} = process.stdin

        The stream to read from.

      • uiDebugOptions: UIDebugOptions = defaultUIDebugOptions

        Debug options; skipTTYCheck allows a non-TTY stdin.

      • options: KeypressOptions = {}

        The keys that end the wait.

      Returns Promise<void>

      A promise that resolves when an accepted key is pressed.