import { ShortcutKey, ShortcutConfig } from '../types/index.js'; import { Key } from 'ink'; export declare class ShortcutManager { private reservedKeys; constructor(); private validateShortcut; private isReservedKey; getShortcuts(): ShortcutConfig; private getRawShortcutCodes; /** * Modifier bit mask of a shortcut, in the encoding shared by the extended * keyboard sequences: 1 shift, 2 alt, 4 ctrl. */ private getModifierMask; /** * Read the modifier parameter of an extended keyboard sequence, which * terminals report as `1 + `, and drop the keyboard's lock state * from it. An absent parameter means "no modifiers"; anything unparseable * yields null, which matches no shortcut. */ private parseModifiers; /** * Match the extended keyboard sequences a terminal can send for a * Ctrl+ shortcut. They carry the modifiers as a number, so they are * parsed instead of compared against pre-built strings: that number also * reports the Caps Lock and Num Lock state, which is not part of the * keypress and would otherwise keep the shortcut from ever matching * (https://github.com/kbwo/ccmanager/issues/327). */ private matchesExtendedKeySequence; matchesShortcut(shortcutName: keyof ShortcutConfig, input: string, key: Key): boolean; getShortcutDisplay(shortcutName: keyof ShortcutConfig): string; getShortcutCode(shortcut: ShortcutKey): string | null; matchesRawInput(shortcutName: keyof ShortcutConfig, input: string): boolean; } export declare const shortcutManager: ShortcutManager;