Skip to content
R

react-hotkeys

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

by chrisuiFree

#231in UI Libraries
0In stores

Description

React HotKeys is a React library for declaring keyboard shortcuts and managing focus areas in a React app. You describe your shortcuts as a…

Highlights

  • Declarative JSX and higher-order component APIs
  • Global and in-focus hotkeys
  • Mousetrap-style key names and combinations
  • Lists available hotkeys for the user to see
  • Maintainers wanted for an unmaintained project

Ratings & Reviews

No ratings yet

Be the first to rate react-hotkeys.

People also visit

R

react-keyboard

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

UI Libraries
Launch
T

@TanStack/hotkeys

Type-Safe keyboard shortcuts library with awesome devtools

UI Libraries
Launch
R

react-keydown

Lightweight keydown wrapper for React components

UI Libraries
Launch
F

focus-trap-react

A React component that traps focus

UI Libraries
Launch
K

kbar

fast, portable, and extensible cmd+k interface for your site

UI Libraries
Launch
R

react-contexify

Add contextmenu to your react component with ease

UI Libraries
Launch

react-hotkeys FAQ

What is React HotKeys used for?

It adds keyboard shortcuts to a React application, and it manages which shortcut handlers are active depending on which part of the page has focus.

Is the library still maintained?

The project's README says it has been more or less unmaintained for over six months and is looking for new maintainers to address outstanding issues.

Can users customize their shortcuts?

Yes. The library supports letting users set their own keyboard shortcuts at runtime, and it can display the list of active hotkeys.

What does it depend on?

Only prop-types, plus a peer dependency on react.

Can I use it with many shortcuts at once?

Yes. It is optimized for larger applications with many hotkeys active at the same time, and several optimizations can be turned off individually.

Do I need to upgrade from version 1?

The README links to upgrade notes for moving from the 1.x releases, so check those before updating an existing app.

What are the best react-hotkeys alternatives?

Popular alternatives to react-hotkeys include react-keyboard, @TanStack/hotkeys and react-keydown. See all react-hotkeys alternatives

Developer Stuff

Badges