diff --git a/apps/desktop/src/renderer/hotkeys/hooks/useHotkey/useHotkey.ts b/apps/desktop/src/renderer/hotkeys/hooks/useHotkey/useHotkey.ts index 8c1fe184b07..33fd696bf77 100644 --- a/apps/desktop/src/renderer/hotkeys/hooks/useHotkey/useHotkey.ts +++ b/apps/desktop/src/renderer/hotkeys/hooks/useHotkey/useHotkey.ts @@ -16,7 +16,12 @@ export function useHotkey( callbackRef.current = callback; useHotkeys( keys ?? "", - (e, _h) => callbackRef.current(e), + (e, _h) => { + if (options?.preventDefault !== false) { + e.preventDefault(); + } + callbackRef.current(e); + }, { enableOnFormTags: true, enableOnContentEditable: true, ...options }, [keys], );