import { Readable } from 'stream'; type KeyHandler = () => void; interface ProcessWrapper { exit: (code?: number) => never; } export declare const KEY_CODES: { UP_ARROW: string; DOWN_ARROW: string; RIGHT_ARROW: string; LEFT_ARROW: string; ENTER: string; SPACE: string; TAB: string; BACKSPACE: string; BACKSPACE_LEGACY: string; DELETE: string; CTRL_C: string; CTRL_D: string; CTRL_A: string; CTRL_E: string; CTRL_K: string; CTRL_U: string; CTRL_W: string; CTRL_L: string; CTRL_N: string; CTRL_P: string; CTRL_F: string; CTRL_B: string; CTRL_J: string; ALT_B: string; ALT_F: string; ALT_D: string; ALT_BACKSPACE: string; SHIFT_ENTER: string; SHIFT_ENTER_ALT: string; HOME: string; HOME_ALT: string; HOME_ALT2: string; END: string; END_ALT: string; END_ALT2: string; PAGE_UP: string; PAGE_DOWN: string; CTRL_LEFT: string; CTRL_RIGHT: string; CTRL_UP: string; CTRL_DOWN: string; ALT_LEFT: string; ALT_RIGHT: string; ALT_UP: string; ALT_DOWN: string; }; /** * Handles keyboard input for interactive prompts. * * **Important**: Only one TerminalKeypress instance should be actively listening * on a given input stream at a time. If you need multiple Inquirerer instances, * call `close()` on the first instance before using the second, or reuse a single * instance for all prompts. * * Multiple instances sharing the same input stream (e.g., process.stdin) will * each receive all keypresses, which can cause duplicate or unexpected behavior. */ export declare class TerminalKeypress { private listeners; private active; private noTty; private input; private proc; private dataHandler; constructor(noTty?: boolean, input?: Readable, proc?: ProcessWrapper); isTTY(): boolean; private setupListeners; on(key: string, callback: KeyHandler): void; off(key: string, callback: KeyHandler): void; clearHandlers(): void; pause(): void; resume(): void; destroy(): void; } export {};