import type { MaybeComputedRef } from "./Types";
export type KeyPredicate = (event: KeyboardEvent) => boolean;
export type KeyFilter = true | string | string[] | KeyPredicate;
export type KeyStrokeEventName = "keydown" | "keypress" | "keyup";
export interface UseKeyboardOptions {
    eventName?: KeyStrokeEventName;
    target?: MaybeComputedRef<EventTarget>;
    passive?: boolean;
}
export declare function useKeyboard(key: KeyFilter, handler: (event: KeyboardEvent) => void, options?: UseKeyboardOptions): () => void;
export declare function useKeyboard(handler: (event: KeyboardEvent) => void, options?: UseKeyboardOptions): () => void;
/**
 * Listen for keyboard keys being stroked.
 */
export declare function useKeyboard(key: KeyFilter, handler: (event: KeyboardEvent) => void, options?: UseKeyboardOptions): () => void;
export declare function useKeyboard(handler: (event: KeyboardEvent) => void, options?: UseKeyboardOptions): () => void;
/**
 * Listen to the keydown event of the given key.
 *
 * @param key
 * @param handler
 * @param options
 */
export declare function onKeyDown(key: KeyFilter, handler: (event: KeyboardEvent) => void, options?: Omit<UseKeyboardOptions, "eventName">): () => void;
/**
 * Listen to the keypress event of the given key.
 *
 * @param key
 * @param handler
 * @param options
 */
export declare function onKeyPressed(key: KeyFilter, handler: (event: KeyboardEvent) => void, options?: Omit<UseKeyboardOptions, "eventName">): () => void;
/**
 * Listen to the keyup event of the given key.
 *
 * @param key
 * @param handler
 * @param options
 */
export declare function onKeyUp(key: KeyFilter, handler: (event: KeyboardEvent) => void, options?: Omit<UseKeyboardOptions, "eventName">): () => void;
