TanStack
Hotkeys API Reference

HotkeysProviderProps

Defined in: packages/svelte-hotkeys/src/HotkeysCtx.ts:70

Options for setHotkeysContext and props for HotkeysProvider.

Extends

Properties

appHotkeys?

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

Defined in: packages/svelte-hotkeys/src/HotkeysCtx.ts:58

Every app hotkey, from defineAppHotkeys. Listed by getAppHotkeyList whether or not they are registered. It can start as undefined and arrive later, such as from a lazy import.

Inherited from

HotkeysContextOptions.appHotkeys


children

ts
children: Snippet;

Defined in: packages/svelte-hotkeys/src/HotkeysCtx.ts:71


customHotkeys?

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

Defined in: packages/svelte-hotkeys/src/HotkeysCtx.ts:65

The user's saved custom hotkeys. When the value changes, such as after saved data loads or the user signs in, it replaces the current custom hotkeys. undefined leaves them unchanged; null clears them. Unknown ids and invalid entries are ignored.

Inherited from

HotkeysContextOptions.customHotkeys


defaultOptions?

ts
optional defaultOptions?: HotkeysProviderOptions;

Defined in: packages/svelte-hotkeys/src/HotkeysCtx.ts:52

Merged with the parent context's defaults.

Inherited from

HotkeysContextOptions.defaultOptions


onCustomHotkeysChange?

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

Defined in: packages/svelte-hotkeys/src/HotkeysCtx.ts:67

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

Parameters

customHotkeys

CustomHotkeys

Returns

void

Inherited from

HotkeysContextOptions.onCustomHotkeysChange