export type KeyboardLayout = 'text' | 'numeric' | 'email'; /** What a key press means. `char` carries the (already shifted) text to insert. */ export type KeyAction = { type: 'char'; value: string; } | { type: 'backspace'; } | { type: 'space'; } | { type: 'enter'; } | { type: 'shift'; }; export type ShiftState = 'off' | 'once' | 'lock'; export type KeyDef = { kind: 'char'; value: string; shifted?: string; grow?: number; } | { kind: 'shift' | 'backspace' | 'enter' | 'space'; grow?: number; }; export declare const TEXT_ROWS: KeyDef[][]; export declare const EMAIL_ROWS: KeyDef[][]; export declare function numericRows(decimal: boolean): KeyDef[][]; export declare function rowsFor(layout: KeyboardLayout, decimal?: boolean): KeyDef[][]; /** Text a char key produces under the current shift state. */ export declare function charFor(key: Extract, shift: ShiftState): string; /** off -> once -> lock -> off. */ export declare function nextShift(s: ShiftState): ShiftState; /** Apply an action to a string (append-only caret model: kiosks have no caret). */ export declare function applyKeyAction(value: string, action: KeyAction): string; //# sourceMappingURL=keyboard-layouts.d.ts.map