TanStack
Hotkeys API Reference

HotkeySequenceOptions

Defined in: hotkey-manager.ts:79

Options for a sequence such as ['G', 'G'].

Extends

Properties

appHotkeyId?

ts
optional appHotkeyId?: string;

Defined in: hotkey-manager.ts:69

Id of the app hotkey this registration implements. Adapters set this when registering an app hotkey from defineAppHotkeys.

Inherited from

HotkeyOptions.appHotkeyId


conflictBehavior?

ts
optional conflictBehavior?: ConflictBehavior;

Defined in: hotkey-manager.ts:47

Behavior when this hotkey conflicts with an existing registration on the same target. Defaults to 'warn'

Inherited from

HotkeyOptions.conflictBehavior


enabled?

ts
optional enabled?: boolean;

Defined in: hotkey-manager.ts:53

Soft-disable: when false, the callback does not run but the registration stays in HotkeyManager (and in devtools). Toggling this should update the existing handle via setOptions rather than unregistering. Defaults to true.

Inherited from

HotkeyOptions.enabled


eventType?

ts
optional eventType?: "keyup" | "keydown";

Defined in: hotkey-manager.ts:55

The event type to listen for. Defaults to 'keydown'

Inherited from

HotkeyOptions.eventType


ignoreInputs?

ts
optional ignoreInputs?: boolean;

Defined in: hotkey-manager.ts:57

Whether to ignore hotkeys when keyboard events originate from input-like elements (text inputs, textarea, select, contenteditable — button-type inputs like type=button/submit/reset are not ignored). Defaults based on the hotkey (the first step of a sequence): true for single keys and Shift/Alt combos; false for Ctrl/Meta shortcuts and Escape

Inherited from

HotkeyOptions.ignoreInputs


meta?

ts
optional meta?: HotkeyMeta;

Defined in: hotkey-manager.ts:67

Optional metadata (name, description, custom fields via declaration merging)

Inherited from

HotkeyOptions.meta


platform?

ts
optional platform?: "mac" | "windows" | "linux";

Defined in: hotkey-manager.ts:59

The target platform for resolving 'Mod'

Inherited from

HotkeyOptions.platform


preventDefault?

ts
optional preventDefault?: boolean;

Defined in: hotkey-manager.ts:61

Prevent the default browser action when the hotkey matches. Defaults to true

Inherited from

HotkeyOptions.preventDefault


stopPropagation?

ts
optional stopPropagation?: boolean;

Defined in: hotkey-manager.ts:63

Stop event propagation when the hotkey matches. Defaults to true

Inherited from

HotkeyOptions.stopPropagation


target?

ts
optional target?: Target | null;

Defined in: hotkey-manager.ts:65

The DOM element to attach the event listener to. Defaults to document.

Inherited from

HotkeyOptions.target


timeout?

ts
optional timeout?: number;

Defined in: hotkey-manager.ts:81

Maximum time between steps in milliseconds. Default: 1000