/** * Key parser for converting symbolic key names to escape sequences * Based on tmux's key handling approach */ /** * Parse a single key sequence into its terminal escape sequence * * Supports: * - Plain characters: "a", "1", etc. * - Special keys: "Enter", "Tab", "Up", etc. * - Control sequences: "C-c", "^c" * - Meta sequences: "M-x" * - Shift sequences: "S-Tab" (for supported keys) * - Combined modifiers: "C-M-x", "M-S-Left" * - Hex notation: "0x41" for Unicode codepoints * * @param key The key sequence to parse * @returns The escape sequence string */ export declare function parseKeySequence(key: string): string; /** * Parse a key input which can be a string or array of strings * Used by CLI to handle :: prefix notation * * @param input Single string or array of key sequences * @returns The combined escape sequence string */ export declare function parseKeyInput(input: string | string[]): string; /** * Helper function to build input strings for TerminalManager.sendInput() * Converts symbolic key names to escape sequences * * @example * import { buildInput } from './key-parser.js'; * * // Using symbolic key names * const input = buildInput("echo hello", "Left", "Left", "world ", "Enter"); * await manager.sendInput(sessionId, input); * * // Mixed literal text and keys * const input = buildInput("vim test.txt", "Enter", "i", "Hello", "Escape", ":wq", "Enter"); * await manager.sendInput(sessionId, input); * * @param parts Array of strings where each can be literal text or a symbolic key name * @returns Combined string with escape sequences */ export declare function buildInput(...parts: string[]): string; //# sourceMappingURL=key-parser.d.ts.map