/** * A key recorder, used for tracking key events. * * @param {EventTarget} ownerWindow A starting `window` element * @param {Function} handleEvent A condition on which event is handled. * @param {Function} beforeKeyDown A hook fired before the `keydown` event is handled. * @param {Function} afterKeyDown A hook fired after the `keydown` event is handled * @param {Function} callback `KeyEvent`'s listener's callback function * @param {Function} [dispatchGlobalShortcutsWhenTableBlocked] When `handleEvent` blocks the normal shortcut pipeline, * if set, it is called as `(event, pressedKeys)` after the same IME / `key` guards as the table path, so * `scope: 'global'` shortcut contexts can still run (for example **F6** into the Notification region while the * instance is not listening). * @returns {object} */ export declare function useRecorder(ownerWindow: Window, handleEvent: (event: KeyboardEvent) => boolean, beforeKeyDown: (event: KeyboardEvent) => void | boolean, afterKeyDown: (event: KeyboardEvent) => void, callback: (event: KeyboardEvent, keys: string[]) => boolean, dispatchGlobalShortcutsWhenTableBlocked?: ((event: KeyboardEvent, keys: string[]) => boolean) | null): { mount: () => void; unmount: () => void; isPressed: (key: string) => boolean; releasePressedKeys: () => void; };