
Description
TanStack Hotkeys is a type-safe keyboard shortcuts library for the web, currently in beta. You define shortcuts as template strings such as Mod+Shift+S or Escape, or as parsed objects when you need full control. A cross-platform Mod key maps to Cmd on macOS and Ctrl on Windows and Linux. The options cover keydown or keyup events, preventDefault, stopPropagation, conditional enabling and requireReset. The library includes validation and matching, Vim-style key sequences, key-state tracking, recorder UI helpers and framework adapters. A singleton Hotkey Manager and utilities for cheatsheet interfaces are also included, and the package is designed to stay friendly to server-side rendering. The README lists adapters for several frameworks, including Alpine, Ember, Octane, React, Preact, Solid, Angular, Vue, Lit and Svelte. The project welcomes issues and pull requests, has a Discord community and points to CONTRIBUTING.md for setup. Documentation is linked from the README. It is aimed at web developers who build keyboard-driven interfaces.…
Highlights
- Type-safe shortcuts such as Mod+Shift+S
- Cross-platform Mod key for Cmd and Ctrl
- Vim-style key sequences and key-state tracking
- Framework adapters for React, Vue, Svelte, Angular and more
- Singleton manager and cheatsheet helpers
Ratings & Reviews
No ratings yet
Be the first to rate @TanStack/hotkeys.
People also visit

react-hotkeys
A declarative library for handling hotkeys and focus within a React application

react-keyboard
A declarative library for handling hotkeys and focus within a React application

vue-global-events
A component to handle global events (like shortcuts) using Vue’s event modifiers
@TanStack/hotkeys FAQ
What is TanStack Hotkeys?
A type-safe keyboard shortcuts library for the web. The README says it is in beta.
How do I write a shortcut?
Use a template string such as Mod+Shift+S or Escape, or a parsed object for full control.
What does Mod mean?
It maps to Cmd on macOS and Ctrl on Windows and Linux.
Which frameworks are supported?
The README lists adapters for Alpine, Ember, Octane, React, Preact, Solid, Angular, Vue, Lit and Svelte.
Is it ready for production?
The README says it is in beta and still actively developed, and it asks for feedback and contributions.
What are the best @TanStack/hotkeys alternatives?
Popular alternatives to @TanStack/hotkeys include react-hotkeys, react-keyboard and react-keydown. See all @TanStack/hotkeys alternatives














