Skip to content

useAppHotkeys

ts
function useAppHotkeys(): ComputedRef<Readonly<Record<string, AppHotkey<string, AppHotkeyBinding>>>>;

Defined in: useAppHotkeys.ts:38

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, AppHotkeyBinding>>>>

Example

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