Getting Started

Installation

TanStack Hotkeys is compatible with various front-end frameworks. Install the corresponding adapter for your framework using your preferred package manager:

sh
npm i @tanstack/react-hotkeys

Each framework package re-exports everything from the core @tanstack/hotkeys package, so there is no need to install the core package separately.

Note

If you are not using a framework, you can install the core @tanstack/hotkeys package directly for use with vanilla JavaScript.

Devtools

Developer tools are available using TanStack Devtools. Install the devtools adapter and the Hotkeys devtools plugin as dev dependencies to inspect registered hotkeys and monitor key state.

sh
npm i @tanstack/react-devtools
npm i @tanstack/react-hotkeys-devtools

See the devtools documentation for more information on how to set up and use the Hotkeys devtools.