diff --git a/apps/desktop/src/context/CallContext.tsx b/apps/desktop/src/context/CallContext.tsx index 39a3ef9..a316843 100644 --- a/apps/desktop/src/context/CallContext.tsx +++ b/apps/desktop/src/context/CallContext.tsx @@ -2004,14 +2004,16 @@ export function CallProvider({ children }: { children: ReactNode }) { const syncGlobalShortcuts = () => { if (!isTauriRuntime()) return; + // Only register an OS-level shortcut if the user explicitly opted in. + // Window-scoped firing happens via the `onKey` listener above and works + // for every enabled binding regardless of the `global` flag. + const enabledAndGlobal = (b: VoiceHotkeys[HotkeyKind]) => b.enabled && b.global; const desired: Record = { - mute: settings.mute.enabled ? bindingToTauriShortcut(settings.mute) : null, - deafen: settings.deafen.enabled ? bindingToTauriShortcut(settings.deafen) : null, - hangup: settings.hangup.enabled ? bindingToTauriShortcut(settings.hangup) : null, - screenShare: settings.screenShare.enabled - ? bindingToTauriShortcut(settings.screenShare) - : null, - video: settings.video.enabled ? bindingToTauriShortcut(settings.video) : null, + mute: enabledAndGlobal(settings.mute) ? bindingToTauriShortcut(settings.mute) : null, + deafen: enabledAndGlobal(settings.deafen) ? bindingToTauriShortcut(settings.deafen) : null, + hangup: enabledAndGlobal(settings.hangup) ? bindingToTauriShortcut(settings.hangup) : null, + screenShare: enabledAndGlobal(settings.screenShare) ? bindingToTauriShortcut(settings.screenShare) : null, + video: enabledAndGlobal(settings.video) ? bindingToTauriShortcut(settings.video) : null, }; for (const kind of KINDS) { const want = desired[kind];