TanStack
Hotkeys API Reference

HotkeyCallbackContextFor

ts
type HotkeyCallbackContextFor<T> = [PlatformHotkeyEntries<T>] extends [never] ? HotkeyCallbackContext : PlatformHotkeyEntries<T> extends infer TEntry ? TEntry extends readonly [RegisterableHotkeyChord] ? HotkeyChordCallbackContext : TEntry extends RegisterableHotkeySequence ? HotkeySequenceCallbackContext : HotkeyChordCallbackContext : never;

Defined in: hotkey.types.ts:578

The callback context for a hotkey: chord context for chords (including one-step tuples), sequence context for sequences, and either when the kind is not known statically. A hotkey per platform takes the kinds of its entries.

Type Parameters

T

T