yuvrajkarna2717/react-hook-granth
[Feature]: Add useKeyboard hook for keyboard shortcuts
Aperta
#10 aperta il 6 dic 2025
enhancementgood first issuehelp wanted
Metriche repository
- Star
- (3 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Hook Name
useKeyboard
Feature Description
Description: Create a hook for handling keyboard shortcuts and key combinations in React components.
Requirements:
- Single key and key combinations
- Modifier keys support (Ctrl, Alt, Shift)
- Prevent default behavior option
- Multiple shortcuts per component
Use Case
It handles keyboard shortcuts and key combinations in React components.
Proposed API
useKeyboard('Escape', handleEscape);
useKeyboard(['Ctrl', 'S'], handleSave);