import type { MaybeRef } from './_shared'; /** * Listen for specific key strokes. * Calls the handler when the specified key is pressed. * * @param key - Key(s) to listen for, or a filter function * @param handler - Callback when key is pressed * @param options - Configuration options * @returns Cleanup function to remove the listener */ export declare function onKeyStroke(key: KeyFilter, handler: (event: KeyboardEvent) => void, options?: OnKeyStrokeOptions): () => void; /** * Listen for keydown events on specific keys. * Alias for onKeyStroke with eventName: 'keydown'. */ export declare function onKeyDown(key: KeyFilter, handler: (event: KeyboardEvent) => void, options?: Omit): () => void; /** * Listen for keyup events on specific keys. * Alias for onKeyStroke with eventName: 'keyup'. */ export declare function onKeyUp(key: KeyFilter, handler: (event: KeyboardEvent) => void, options?: Omit): () => void; export declare interface OnKeyStrokeOptions { eventName?: 'keydown' | 'keyup' | 'keypress' target?: MaybeRef } declare type KeyFilter = string | string[] | ((_event: KeyboardEvent) => boolean);