React Hotkeys

JSON →
library 2.0.0 ·javascript
verified May 27, 2026

React Hotkeys is a declarative library for managing keyboard shortcuts and focus within React applications. The current stable version is 2.0.0, representing a complete internal rewrite that removed the dependency on Mousetrap and now directly leverages React's SyntheticEvent system. This change significantly improved integration and predictable behavior within the React ecosystem. The library offers both component-based APIs (`<HotKeys>`, `<GlobalHotKeys>`, `<IgnoreKeys>`) and Higher-Order Components (`withHotKeys`, `withIgnoreKeys`) to define and handle hotkeys. Key features include support for standard browser key names and Mousetrap-like syntax, the ability to define global or context-specific hotkeys, dynamic hotkey configuration at runtime, and tools to display available shortcuts to users. It ships with comprehensive TypeScript types and is optimized for performance in large applications, with over 2000 automated tests ensuring reliability. Release cadence tends to be active during major version development, followed by maintenance releases.

total hits 19
actors 7 distinct systems
last hit 11h ago human
GPTBot
5
MetaBot
4
Script
1
ClaudeBot
1
Search engines
3
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇬🇧 United Kingdom · 🇸🇬 Singapore · 🇩🇪 Germany