JohannesKlauss/react-hotkeys-hook
React hook for using keyboard shortcuts in components. observed · 2026-08-28
Health v2 · maintenance only
96/100
- Activity 99
- Release rhythm 90
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 26.0
- age_days: 2834
- days_rel: 68
- days_push: 8
- n_releases_24m: 13
Adoption not part of the score
3511 stars · 167 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A small, dependency-free React hook (useHotkeys) for declaratively binding keyboard shortcuts in components. It supports modifier combinations, key sequences, scopes, focus traps, and custom user-recorded hotkeys with first-class TypeScript types.
Use cases
- add keyboard shortcuts to a react component
- implement a ctrl+k command palette in react
- bind vim-style key sequences in a web app
- enable shortcuts only when a modal or editor is focused
- let users record their own custom hotkeys
- group and toggle hotkeys with scopes to avoid conflicts
When to choose
- you use React and want declarative, per-component keyboard shortcuts
- you need scopes, sequences, or focus-trapped hotkeys without heavy setup
- you want a tiny (~3KB) zero-dependency, well-typed library
When to avoid
- you're not using React (use a framework-agnostic hotkey library)
- you need global OS-level or Electron app shortcuts rather than in-browser keys
- you need a full shortcut-management UI or complex keymap serialization out of the box
Facets
library · maturity active
ui-components developer-tools frontend web-development developer-tools browser cross-platform react react-hooks keyboard-shortcuts hotkeys typescript keybindings nodejs
2 sources
- readme: https://github.com/JohannesKlauss/react-hotkeys-hook · fetched 2026-08-28 · 16e7be4a9c3c
- homepage: https://react-hotkeys-hook.vercel.app/ · fetched 2026-08-29 · b1b8e4c0847d
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| JohannesKlauss/react-hotkeys-hook | main | 96 |
For agents
markdown · JSON · MCP: product_card(name="JohannesKlauss/react-hotkeys-hook")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem