/** Modifier key requirements for the shortcut */ export interface KeyboardShortcutOptions { /** Require Meta (⌘ on Mac, ⊞ on Windows). Default: `false` */ meta?: boolean; /** Require Ctrl. Default: `false` */ ctrl?: boolean; /** Require Shift. Default: `false` */ shift?: boolean; /** Require Alt. Default: `false` */ alt?: boolean; /** Whether the shortcut is active. Default: `true` */ enabled?: boolean; /** Prevent default browser behavior. Default: `true` */ preventDefault?: boolean; } /** * Registers a global keyboard shortcut with optional modifier keys. * Automatically ignores events from input, textarea, and contenteditable elements. * * @param {string} key - The key to listen for (e.g., 'k', 'Escape', 'Enter') * @param {(event: KeyboardEvent) => void} callback - Handler called when shortcut fires * @param {KeyboardShortcutOptions} [options] - Modifier keys and behavior options * * @example * useKeyboardShortcut('/', () => searchRef.current?.focus(), { preventDefault: true }); */ export declare function useKeyboardShortcut(key: string, callback: (event: KeyboardEvent) => void, options?: KeyboardShortcutOptions): void;