export type KeyBinding = { keys: string[]; help: string; hint?: string; when?: () => boolean; run: () => Action | void; }; export type CursorMoves = { by: (delta: number) => void; toTop: () => void; toBottom: () => void; /** Rows in one page, read when the key is pressed. */ page: () => number; /** Rows in half a page, at least one. */ halfPage: () => number; }; export declare function findBinding(bindings: KeyBinding[], key: string): KeyBinding | undefined; export declare function runKey(bindings: KeyBinding[], key: string, fallback: Action): Action; export declare function helpFrom(bindings: KeyBinding[]): string[]; export declare function hintsFrom(bindings: KeyBinding[]): string; export declare function duplicateKeys(bindings: KeyBinding[]): string[]; /** The movement keys every Agency TUI shares. A full page on Ctrl+F and * the Page keys, half a page on Ctrl+D and Ctrl+U — the tree view's * behavior today (`treeView.ts:216-221`), now the rule everywhere. */ export declare function cursorBindings(moves: CursorMoves): KeyBinding[];