import type { ReaderState } from './reader.state.js'; import type { RepaintCtx, repaint as _repaint, schedulePaint as _schedulePaint } from './reader.repaint.js'; import type { applySelection as _applySelection } from './reader.selection.js'; import type { KeyInfo, ReadWithAutocompleteOpts } from './types.js'; export interface KeypressCallbacks { onSubmit(): void; onAbort(err: Error): void; onEof(): void; } export interface KeypressCtx { opts: ReadWithAutocompleteOpts; stdout: NodeJS.WriteStream; repaintCtx: RepaintCtx; callbacks: KeypressCallbacks; pasteWindowMs: number; } export declare function handleKeypress(char: string | undefined, key: KeyInfo, st: ReaderState, kCtx: KeypressCtx, repaintFn: typeof _repaint, schedulePaintFn: typeof _schedulePaint, applySelectionFn: typeof _applySelection): void;