# HotkeySequenceRecorderOptions

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

Defined in: [hotkey-recorder.ts:204](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L204)

Options for recording up to `maxSteps` chords. A one-step recording commits
as a chord string; two or more steps commit as a sequence.

## Extends

- `HotkeyRecorderBaseOptions`

## Properties

### cancelOnBlur?

```ts
optional cancelOnBlur?: boolean;
```

Defined in: [hotkey-recorder.ts:160](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L160)

Whether to cancel recording when the window loses focus, as when the user
switches apps or tabs, opens browser devtools, or clicks into an iframe.
Keys pressed elsewhere never reach the page. Focus moving to another
element on the page doesn't cancel. Default: true

#### Inherited from

```ts
HotkeyRecorderBaseOptions.cancelOnBlur
```

***

### commitKeys?

```ts
optional commitKeys?: HotkeyRecorderCommitKeys;
```

Defined in: [hotkey-recorder.ts:218](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L218)

Whether plain Enter commits the recorded steps. Default: 'enter'

***

### detectConflicts?

```ts
optional detectConflicts?: boolean | HotkeyConflictOptions;
```

Defined in: [hotkey-recorder.ts:81](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L81)

Opt in to live-registry conflicts, including sequence prefixes. Default: false.

#### Inherited from

```ts
HotkeyRecorderBaseOptions.detectConflicts
```

***

### idleTimeoutMs?

```ts
optional idleTimeoutMs?: number;
```

Defined in: [hotkey-recorder.ts:220](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L220)

Commit automatically after this many milliseconds without a new step. Disabled when unset or 0.

***

### ignoreInputs?

```ts
optional ignoreInputs?: boolean;
```

Defined in: [hotkey-recorder.ts:171](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L171)

Whether to ignore keyboard events from input-like elements (text inputs,
textarea, select, contenteditable) while recording. When true, typing in
inputs passes through normally (Escape still cancels). Defaults to true.

#### Inherited from

```ts
HotkeyRecorderBaseOptions.ignoreInputs
```

***

### maxSteps

```ts
maxSteps: number;
```

Defined in: [hotkey-recorder.ts:206](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L206)

Maximum number of chords to record. Reaching it commits automatically. Use `Infinity` for no limit.

***

### onCancel?

```ts
optional onCancel?: () => void;
```

Defined in: [hotkey-recorder.ts:153](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L153)

Optional callback when recording is cancelled: Escape, Tab without
`recordTab`, or the window losing focus with `cancelOnBlur`

#### Returns

`void`

#### Inherited from

```ts
HotkeyRecorderBaseOptions.onCancel
```

***

### onClear?

```ts
optional onClear?: () => void;
```

Defined in: [hotkey-recorder.ts:165](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L165)

Optional callback when the recording is cleared: Backspace/Delete with no
modifiers and no recorded steps

#### Returns

`void`

#### Inherited from

```ts
HotkeyRecorderBaseOptions.onClear
```

***

### onRecord

```ts
onRecord: (hotkey, context) => void;
```

Defined in: [hotkey-recorder.ts:216](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L216)

Callback when a hotkey is successfully recorded. `context` is the one
`validate` received, with the key press that recorded each step.

#### Parameters

##### hotkey

[`Hotkey`](../type-aliases/Hotkey.md)

##### context

[`HotkeyRecorderValidationContext`](../type-aliases/HotkeyRecorderValidationContext.md)

#### Returns

`void`

***

### onReject?

```ts
optional onReject?: (rejection) => void;
```

Defined in: [hotkey-recorder.ts:83](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L83)

Rejected candidates leave recording active.

#### Parameters

##### rejection

[`RecorderRejection`](RecorderRejection.md)

#### Returns

`void`

#### Inherited from

```ts
HotkeyRecorderBaseOptions.onReject
```

***

### platform?

```ts
optional platform?: HotkeyPlatform;
```

Defined in: [hotkey-recorder.ts:79](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L79)

Platform used for Mod and AltGraph handling. Defaults to platform detection.

#### Inherited from

```ts
HotkeyRecorderBaseOptions.platform
```

***

### recordBy?

```ts
optional recordBy?: RecorderKeyMode;
```

Defined in: [hotkey-recorder.ts:77](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L77)

How the pressed key is written. Default: `'auto'`.

#### Inherited from

```ts
HotkeyRecorderBaseOptions.recordBy
```

***

### recordTab?

```ts
optional recordTab?: boolean;
```

Defined in: [hotkey-recorder.ts:178](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L178)

Whether to record Tab and Shift+Tab. By default they cancel recording and
move focus, so keyboard users can leave the recorder. Tab with Control,
Alt, or Meta isn't affected. When true, tell users that Escape cancels.
Default: false

#### Inherited from

```ts
HotkeyRecorderBaseOptions.recordTab
```

***

### validate?

```ts
optional validate?: (hotkey, context) => string | boolean;
```

Defined in: [hotkey-recorder.ts:208](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-recorder.ts#L208)

Return true to accept, or false or a message to reject while staying in recording mode. The message is passed to `onReject`.

#### Parameters

##### hotkey

[`Hotkey`](../type-aliases/Hotkey.md)

##### context

[`HotkeyRecorderValidationContext`](../type-aliases/HotkeyRecorderValidationContext.md)

#### Returns

`string` \| `boolean`
