# createHotkeyBindings

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

```ts
function createHotkeyBindings(adapterOptions?): object;
```

Defined in: [adapter.ts:94](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/adapter.ts#L94)

Reconciles adapter registrations while retaining handles for option updates.
Adapters for frameworks that delegate key events, such as React, pass
`{ afterDelegatedHandlers: true }`.

## Parameters

### adapterOptions?

`Pick`\<`HotkeyOptions`, `"afterDelegatedHandlers"`\> = `{}`

## Returns

### destroy()

```ts
destroy(): void;
```

#### Returns

`void`

### update()

```ts
update(definitions, commonOptions?): void;
```

Registers new definitions, updates existing ones in place, and removes
stale ones. `HotkeyManager.register` validates each hotkey, so
definitions with no hotkey (undefined, null, empty string, or empty
sequence), an invalid hotkey, or a null target register nothing, and
are tried again on the next update.

#### Parameters

##### definitions

readonly [`HotkeyDefinition`](../type-aliases/HotkeyDefinition.md)[]

##### commonOptions?

`HotkeyCommonOptions` = `{}`

#### Returns

`void`
