function useCustomHotkeys(): UseCustomHotkeysResult;Defined in: useAppHotkeys.ts:121
Reads and changes the user's custom hotkeys. Changes apply to every registered app hotkey immediately and are passed to the provider's onCustomHotkeysChange, ready to save.
const { setCustomHotkey, findConflicts } = useCustomHotkeys()
const recorder = useHotkeyRecorder({
maxSteps: Infinity,
validate: (hotkey, context) =>
findConflicts('doc.save', hotkey, context).length === 0 ||
'Already in use',
onRecord: (hotkey, context) => setCustomHotkey('doc.save', hotkey, context),
})