TanStack
App Hotkeys API Reference

useAppHotkeys

ts
function useAppHotkeys(): ComputedRef<Readonly<Record<string, AppHotkey<string, HotkeyChord | HotkeySequence | null>>>>;

Defined in: useAppHotkeys.ts:35

Returns a computed ref of the effective app hotkeys from HotkeysProvider, typed by Register: each declaration with the user's custom hotkey applied.

Returns

ComputedRef<Readonly<Record<string, AppHotkey<string, HotkeyChord | HotkeySequence | null>>>>

Example

ts
const hotkeys = useAppHotkeys()
useHotkey(() => hotkeys.value['doc.save'], () => save())