TanStack
Hotkeys API Reference

ProvideHotkeysOptions

Defined in: hotkeys-provider.ts:29

Options for provideHotkeys.

Properties

appHotkeys?

ts
optional appHotkeys?: Readonly<Record<string, AppHotkey<string, HotkeyChord | HotkeySequence | null>>>;

Defined in: hotkeys-provider.ts:35

Every app hotkey, from defineAppHotkeys. Listed by injectAppHotkeyList whether or not they are registered.


customHotkeys?

ts
optional customHotkeys?: 
  | CustomHotkeys<Readonly<Record<string, AppHotkey<string, HotkeyChord | HotkeySequence | null>>>>
  | null;

Defined in: hotkeys-provider.ts:40

Starting custom hotkeys, such as saved data. Read once; the provider owns the state afterwards. Invalid entries are ignored with a warning.


defaultOptions?

ts
optional defaultOptions?: HotkeysProviderOptions;

Defined in: hotkeys-provider.ts:30


onCustomHotkeysChange?

ts
optional onCustomHotkeysChange?: (customHotkeys) => void;

Defined in: hotkeys-provider.ts:42

Called with the custom hotkeys after every change, ready to save.

Parameters

customHotkeys

CustomHotkeys

Returns

void