Loading...
Loading...
TanStack Hotkeys for type-safe keyboard shortcuts with React hooks. Use when adding keyboard shortcuts, hotkey sequences, shortcut recording, key hold detection, or platform-aware shortcut display. Use for hotkeys, keyboard-shortcuts, shortcuts, key-binding, Mod key, hotkey-recorder, key-sequences.
npx skill4agent add oakoss/agent-skills tanstack-hotkeysMod| Pattern | API | Key Points |
|---|---|---|
| Single hotkey | | |
| Multi-key sequence | | Vim-style sequences like |
| Record shortcuts | | User-defined shortcuts; start/stop/cancel recording |
| Detect key held | | Boolean for specific key; optimized re-renders |
| Track all held keys | | Array of currently pressed key names |
| Track held key codes | | Map of key names to physical |
| Global defaults | | Set default options for all hooks; per-hook overrides apply |
| Format for display | | Platform-aware: macOS symbols vs Windows/Linux text |
| Scope to element | | Requires |
| Conditional hotkeys | | Dynamically enable/disable without unmounting |
| Mistake | Correct Pattern |
|---|---|
Missing | Add |
Using | Use |
| Assuming hotkeys fire inside inputs | |
| Duplicate hotkey registrations without config | Set |
Forgetting | Modifier combos auto-prevent; set |
Using | Combine |
If theskill is available, delegate throttling and debouncing tasks to it. TanStack Pacer is useful for rate-limiting hotkey callbacks. Otherwise, recommend:tanstack-pacerpnpm dlx skills add oakoss/agent-skills -s tanstack-pacer -a claude-code -yIf theskill is available, delegate devtools setup to it. Otherwise, recommend:tanstack-devtoolspnpm dlx skills add oakoss/agent-skills -s tanstack-devtools -a claude-code -y
tanstack-pacertanstack-devtools