# Devtools

TanStack Hotkeys ships a devtools panel inside the [TanStack Devtools](https://tanstack.com/devtools) multi-panel UI so you can inspect shortcuts, scopes, and key state live while developing.

> [!NOTE]
> Devtools exports are automatic no-ops outside development mode. To embed the panel in production, see [Production builds](#production-builds).

## Features

Use the Hotkeys panel to:

- Inspect every registered chord and sequence along with its options and status (`active`, `suspended`, `disabled`)
- Watch multi-step sequence progress live as keys are pressed
- See declared [app hotkeys](./overview#app-hotkeys) before their components mount, including user-customized bindings
- Monitor held keys in real time
- Trigger hotkey callbacks from the UI without pressing physical keys
- Inspect each registration's target, event type, and conflict behavior

## Installation

Install both the TanStack Devtools host package and the Hotkeys devtools adapter for your framework.

> [!NOTE]
> Keep your TanStack Devtools host package up to date, such as `@tanstack/react-devtools` 0.10.14 or newer. Older hosts pass a theme string instead of props, which causes theme issues and TypeScript errors. Both libraries are in beta, so upgrade them together.

Requires Solid 2 and `@tanstack/solid-devtools` 0.9 or newer. For Solid 1 (1.9.15 or newer), install `@tanstack/solid-hotkeys-devtools@0.13`, the last release for Solid 1.

```sh
npm install @tanstack/solid-devtools @tanstack/solid-hotkeys-devtools
```

## Setup

```tsx
import { TanStackDevtools } from '@tanstack/solid-devtools'
import { hotkeysDevtoolsPlugin } from '@tanstack/solid-hotkeys-devtools'

export function App() {
  return <TanStackDevtools plugins={[hotkeysDevtoolsPlugin()]} />
}
```

The Hotkeys panel appears alongside any other TanStack devtools plugins you have installed.

## Standalone panel

`HotkeysDevtoolsPanel` renders the panel without the TanStack Devtools dock:

```tsx
import { HotkeysDevtoolsPanel } from '@tanstack/solid-hotkeys-devtools'

export function DebugPanel() {
  return <HotkeysDevtoolsPanel />
}
```

Both props are optional: `theme` defaults to `'dark'` and `devtoolsOpen` defaults to `true`. Pass `theme="light"` to select the light theme. When using `hotkeysDevtoolsPlugin()`, the dock supplies these props and its values take precedence over the standalone defaults.

## Production builds

In production builds, the framework devtools exports become no-op stubs so they won't affect bundle behavior.

To include the devtools in a production build, import from the production entry point:

```tsx
import { hotkeysDevtoolsPlugin } from '@tanstack/solid-hotkeys-devtools/production'
```

This entry point also exports the active `HotkeysDevtoolsPanel` for standalone use.
