TanStack Hotkeys provides devtools for debugging and monitoring all your registered hotkeys in real-time. The devtools integrate seamlessly within the TanStack Devtools multi-panel UI.
By default, the TanStack Devtools and TanStack Hotkeys Devtools will only be included in development mode. This helps keep your production bundle size minimal. If you need to include devtools in production builds (e.g., for debugging production issues), you can use the alternative "production" imports.
The Hotkeys devtools panel provides:
Install the devtools packages for your framework:
npm install @tanstack/react-devtools @tanstack/react-hotkeys-devtools
import { TanStackDevtools } from '@tanstack/react-devtools'
import { hotkeysDevtoolsPlugin } from '@tanstack/react-hotkeys-devtools'
function App() {
return (
<div>
{/* Your app content */}
<TanStackDevtools
plugins={[hotkeysDevtoolsPlugin()]}
/>
</div>
)
}
The devtools panel will appear as a tab in the TanStack Devtools UI, alongside any other TanStack devtools plugins you may have installed (e.g., Query devtools, Pacer devtools).
By default, devtools are excluded from production builds to minimize bundle size. The default imports will return no-op implementations in production:
// This will be a no-op in production builds
import { hotkeysDevtoolsPlugin } from '@tanstack/react-hotkeys-devtools'
If you need to include devtools in production builds (e.g., for debugging production issues), use the production-specific imports:
// This will include full devtools even in production builds
import { hotkeysDevtoolsPlugin } from '@tanstack/react-hotkeys-devtools/production'