/** * useKeyboardFeatures Hook * * Unified hook that integrates premium keyboard features: * - Macro recording and playback * - Jump list navigation (Ctrl+O/Ctrl+I) * - Accessibility features (sticky keys, slow keys) * * @since v1.58.6 */ import type { Tier } from '../../core/types/auth.js'; import { type AccessibilityConfig, type ProcessedKeyResult } from '../keyboard/index.js'; import type { MacroPlaybackState, MacroRecorderState } from '../keyboard/macro-types.js'; export interface KeyboardFeaturesConfig { /** User's subscription tier */ tier: Tier; /** Enable accessibility features */ accessibilityEnabled?: boolean; /** Accessibility configuration */ accessibilityConfig?: Partial; /** Enable macro recording */ macrosEnabled?: boolean; /** Enable jump list navigation */ jumpListEnabled?: boolean; } export interface KeyboardFeaturesState { /** Currently recording macro register (null if not recording) */ recordingRegister: string | null; /** Currently playing macro register (null if not playing) */ playingRegister: string | null; /** * Full recorder state (Phase 4 service-integration audit, v2.11.66) — * exposed so MacroIndicator chrome can render the rich REC/PLAY badge with * register, step count, progress, and loop counter. */ recorderState: MacroRecorderState | null; /** Full playback state (see recorderState above). */ playbackState: MacroPlaybackState | null; /** Whether accessibility is enabled */ accessibilityEnabled: boolean; /** Active sticky modifiers */ stickyModifiers: string[]; /** Jump list can go back */ canJumpBack: boolean; /** Jump list can go forward */ canJumpForward: boolean; } export interface UseKeyboardFeaturesReturn { /** Current state */ state: KeyboardFeaturesState; /** Start recording a macro to a register (q, w, e, r) */ startRecording: (register: string) => boolean; /** Stop recording the current macro */ stopRecording: () => void; /** Play a macro from a register */ playRegister: (register: string) => Promise; /** Record a keypress during macro recording */ recordKeypress: (key: string, modifiers?: ('ctrl' | 'alt' | 'shift' | 'meta')[]) => void; /** Record an action during macro recording */ recordAction: (action: string, params?: Record) => void; /** Check if currently recording */ isRecording: () => boolean; /** Record a navigation for jump list */ recordNavigation: (view: string, index: number, label: string, itemId?: string) => void; /** Jump back in navigation history (Ctrl+O) */ jumpBack: () => { view: string; index: number; label: string; itemId?: string; } | null; /** Jump forward in navigation history (Ctrl+I) */ jumpForward: () => { view: string; index: number; label: string; itemId?: string; } | null; /** Toggle accessibility on/off */ toggleAccessibility: () => void; /** Update accessibility config */ updateAccessibilityConfig: (config: Partial) => void; /** Get current accessibility config */ getAccessibilityConfig: () => AccessibilityConfig; /** Process a key through accessibility filters */ processKey: (key: string, type: 'keydown' | 'keyup', modifiers: string[]) => ProcessedKeyResult; /** Announce for screen readers */ announce: (message: string) => void; } export declare function useKeyboardFeatures(config: KeyboardFeaturesConfig): UseKeyboardFeaturesReturn; //# sourceMappingURL=useKeyboardFeatures.d.ts.map