TanStack
Hotkeys API Reference

simplifyHotkey

ts
function simplifyHotkey<T>(hotkey): T extends HotkeySequence ? Hotkey : T;

Defined in: parse.ts:33

Collapses a one-step sequence to its chord without otherwise changing the hotkey. Registration APIs treat ['Mod+S'] exactly like 'Mod+S'.

Type Parameters

T

T extends RegisterableHotkey

Parameters

hotkey

T

Returns

T extends HotkeySequence ? Hotkey : T