Skip to content

fix(web): let Cmd, Ctrl and Alt shortcuts pass through the share player - #2627

Open
AatmanAJ wants to merge 3 commits into
CapSoftware:mainfrom
AatmanAJ:fix/web-player-modifier-shortcuts
Open

AatmanAJ wants to merge 3 commits into
CapSoftware:mainfrom
AatmanAJ:fix/web-player-modifier-shortcuts

Conversation

@AatmanAJ

@AatmanAJ AatmanAJ commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2596.

Problem

The share-page player's key handler matched on event.key alone and called preventDefault(). So ⌘⇧M, Chrome's profile-menu shortcut, muted the video and Chrome never saw it. Other combinations such as ⌘K and ⌘F, and Ctrl/Alt variants, were swallowed the same way.

Fix

onKeyDown and onKeyUp return early when Meta, Ctrl or Alt is held, unless AltGr is held. Windows and Linux report AltGr as Ctrl+Alt, and some layouts (Czech, Hungarian) type < and > with it, so the playback-speed shortcuts keep working there. Shift still reaches the handler, because Shift+Arrow is used to seek audio.

Testing

  • Share page, player focused: ⌘⇧M opens Chrome's profile menu and leaves mute unchanged
  • Plain M, K, Space, F and the arrow keys still work
  • With a Czech or Hungarian layout, AltGr+< / > still change playback speed

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

The share player now lets Cmd, Ctrl and Alt shortcuts pass through without triggering player actions.

  • Modified shortcuts pass through the focused video player.

Reviews (1) · Last reviewed commit: "fix(web): keep AltGr shortcuts working i..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Skipped Skipped Oct 25, 2026 2:38pm UTC

@vercel
vercel Bot temporarily deployed to Preview – cap-status October 15, 2026 19:31 Inactive
@richiemcilroy

Copy link
Copy Markdown
Member

Thanks for this. One thing before we can take it: on Windows and Linux, AltGr is reported as Ctrl+Alt, and on some keyboard layouts (Czech and Hungarian, for example) < and > are typed with AltGr. With this change the playback speed shortcuts would stop working for those users.

Could you skip the early return when AltGr is held, in both onKeyDown and onKeyUp? Something like:

if ((event.metaKey || event.ctrlKey || event.altKey) && !event.getModifierState("AltGraph")) return;

Please also merge main (the branch is a long way behind) and mark the PR ready for review. Once that's in, we'll run the Greptile review, and it needs 5/5 plus green CI to merge.

@vercel
vercel Bot temporarily deployed to Preview – cap-status October 25, 2026 14:38 Inactive
@AatmanAJ
AatmanAJ marked this pull request as ready for review October 25, 2026 14:38
@AatmanAJ

Copy link
Copy Markdown
Contributor Author

Good catch, thanks. Both handlers now skip the early return when getModifierState("AltGraph") is true, so AltGr+</> still reach the speed shortcuts. I've merged main and marked this ready.

This branch was previously deployed

1 inactive deployment
Preview – cap-status — dbbd54bf Deployed Oct 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants