/** * Keyboard event utilities for accessibility */ /** * Checks if Enter or Space was pressed (for button-like behavior) * * @example * ```svelte * * ``` */ export declare function isActivationKey(event: KeyboardEvent): boolean; /** * Checks if Escape was pressed */ export declare function isEscape(event: KeyboardEvent): boolean; /** * Checks if Arrow key was pressed */ export declare function isArrow(event: KeyboardEvent): boolean; /** * Checks if Home or End was pressed */ export declare function isHomeEnd(event: KeyboardEvent): boolean; /** * Checks if Page Up or Page Down was pressed */ export declare function isPageUpDown(event: KeyboardEvent): boolean; /** * Prevents default behavior for activation keys (Space key scrolling) * * @example * ```svelte *
{ * keyboard.preventActivation(e); * if (keyboard.isActivationKey(e)) { * // Handle activation * } * }} * > * Custom Button *
* ``` */ export declare function preventActivation(event: KeyboardEvent): void; /** * Gets the direction from an arrow key event */ export declare function getArrowDirection(event: KeyboardEvent): 'up' | 'down' | 'left' | 'right' | null; /** * Keyboard event handler utility object */ export declare const keyboard: { isActivationKey: typeof isActivationKey; isEscape: typeof isEscape; isArrow: typeof isArrow; isHomeEnd: typeof isHomeEnd; isPageUpDown: typeof isPageUpDown; preventActivation: typeof preventActivation; getArrowDirection: typeof getArrowDirection; };