Skip to content

Web player intercepts ⌘⇧M and blocks Chrome profile-menu shortcut #2596

Open

Description

@goleary

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

  1. Open a Cap share page in Google Chrome on macOS, for example https://cap.so/s/mdvxms2gfmkgc0e.
  2. Focus the video player or one of its controls.
  3. 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 keydown with key: "M", metaKey: true, and shiftKey: true changed the video's muted state from false to true and set defaultPrevented: 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 calls preventDefault() for m without checking Command/Control/Option modifiers. Source:
    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.

Activity

  1. linear commented on Oct 14, 2026

    @linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions