UNPKG

@thibault.sh/hooks

Version:

A comprehensive collection of React hooks for browser storage, UI interactions, and more

9 lines (7 loc) 277 B
/** * Hook that detects when a specific key is pressed * @param targetKey - The key to detect (e.g., "Enter", "Escape", "a") * @returns boolean indicating if the key is currently pressed */ declare function useKeyPress(targetKey: string): boolean; export { useKeyPress };