Repository navigation
Web player intercepts ⌘⇧M and blocks Chrome profile-menu shortcut #2596
Copy link
Copy link
Open
Description
Description
Cap's web video player intercepts ⌘⇧M (Command+Shift+M) on macOS, preventing Chrome's open profile menu shortcut from working when the player has focus. The player treats the modified shortcut as its plain M mute/unmute command and cancels the browser's default action.
Reproduction
- Open a Cap share page in Google Chrome on macOS, for example https://cap.so/s/mdvxms2gfmkgc0e.
- Focus the video player or one of its controls.
- Press ⌘⇧M.
Actual: Cap consumes the shortcut and toggles mute instead of allowing Chrome's profile menu to open.
Expected: Browser shortcuts containing Command should pass through. Plain M should continue to toggle mute.
Additional Context
- Affected component: Cap web share-page player (not the desktop recording app).
- Browser / OS: Google Chrome on macOS; the original reporter's exact versions were not collected.
- Live-page diagnostic: With the player focused, dispatching a cancelable
keydownwithkey: "M",metaKey: true, andshiftKey: truechanged the video'smutedstate fromfalsetotrueand setdefaultPrevented: true. This verifies the page handler consumes the modified key event; the diagnostic used a synthetic event, not a native Chrome profile-menu interaction. - Likely cause: the player's keyboard handler switches on
event.key.toLowerCase()and callspreventDefault()formwithout checking Command/Control/Option modifiers. Source:.Cap/apps/web/app/s/[videoId]/_components/video/media-player.tsx
Lines 504 to 553 in 3403665
const onKeyDown = React.useCallback( (event: React.KeyboardEvent<HTMLDivElement>) => { if (disabled) return; rootImplProps.onKeyDown?.(event); if (event.defaultPrevented) return; const mediaElement = mediaRef.current; if (!mediaElement) return; const isMediaFocused = document.activeElement === mediaElement; const isPlayerFocused = document.activeElement?.closest('[data-slot="media-player"]') !== null; if (!isMediaFocused && !isPlayerFocused) return; if (autoHide) onControlsShow(); switch (event.key.toLowerCase()) { case " ": case "k": event.preventDefault(); dispatch({ type: mediaElement.paused ? MediaActionTypes.MEDIA_PLAY_REQUEST : MediaActionTypes.MEDIA_PAUSE_REQUEST, }); break; case "f": event.preventDefault(); dispatch({ type: document.fullscreenElement ? MediaActionTypes.MEDIA_EXIT_FULLSCREEN_REQUEST : MediaActionTypes.MEDIA_ENTER_FULLSCREEN_REQUEST, }); break; case "m": { event.preventDefault(); if (isVideo) { onVolumeIndicatorTrigger(); } dispatch({ type: mediaElement.muted ? MediaActionTypes.MEDIA_UNMUTE_REQUEST : MediaActionTypes.MEDIA_MUTE_REQUEST, }); break; - Suggested fix: ignore Command/Control/Alt-modified events before processing plain player shortcuts, while retaining intentional Shift-based shortcuts such as playback-speed controls. Please also check other letter shortcuts for the same browser-shortcut collision.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
linear commentedon Oct 14, 2026
CAP-847