tanstack-hotkeys

Installation
SKILL.md

TanStack Hotkeys

Overview

TanStack Hotkeys is a type-safe keyboard shortcuts library for React with template-string bindings, cross-platform Mod key abstraction (Cmd on macOS, Ctrl on Windows/Linux), and SSR-friendly utilities. It provides hooks for single hotkeys, multi-key sequences, shortcut recording, and real-time key state tracking, plus platform-aware display formatting.

When to use: Adding keyboard shortcuts to React apps, recording user-defined hotkeys, detecting held modifier keys, displaying platform-specific shortcut labels, implementing Vim-style key sequences.

When NOT to use: Non-React apps without a wrapper (core package exists but React is the primary target), complex input handling that needs full keymap management (consider a dedicated keymap library).

Quick Reference

Pattern API Key Points
Single hotkey useHotkey Mod abstracts Cmd/Ctrl; auto-prevents default on combos
Multi-key sequence useHotkeySequence Vim-style sequences like g g; configurable timeout
Record shortcuts useHotkeyRecorder User-defined shortcuts; start/stop/cancel recording
Detect key held useKeyHold Boolean for specific key; optimized re-renders
Track all held keys useHeldKeys Array of currently pressed key names
Related skills
Installs
63
GitHub Stars
11
First Seen
Feb 22, 2026