Web player intercepts ⌘⇧M and blocks Chrome profile-menu shortcut
維護者通常 1 天內回覆
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 80/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
- 領域
- frontend
研究方向
從 apps/web/app/s/[videoId]/_components/video/media-player.tsx 開始,大約第 504-553 行,那裡的 keydown 處理函式會根據 event.key.toLowerCase() 進行 switch,並對 'm' 呼叫 preventDefault()。先檢查那裡如何處理修飾鍵,然後新增一個針對 Command、Control 和 Alt 的提前 return,讓瀏覽器快捷鍵可以正常通過。單獨的 M 鍵仍用於靜音,基於 Shift 的倍速快捷鍵應繼續運作。完成標準是:設定了 metaKey 的 keydown 不會被 preventDefault 阻擋,且在分享頁面上單獨按 M 仍能切換靜音。該 issue 也要求檢查同一處理函式中的其他字母快捷鍵。
由索引模型根據 Issue 內容生成。
描述
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: https://github.com/CapSoftware/Cap/blob/34036657845bf063c875e66a10ad537afa415f35/apps/web/app/s/%5BvideoId%5D/_components/video/media-player.tsx#L504-L553. - 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.
- 主要語言
- Rust
- 星號
- 23.2k
- 分支
- 2k
- 平均合併
- 1 天 5 小時
- 30 天內合併 PR
- 130
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CapSoftware/Cap 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
CapSoftware/Cap#2384 · 1 則留言 ·
維護者通常 1 天內回覆
-
Dashboard pagination causes full page reloads on self-hosted Cap可能已有人在做 @Dewin 於 29 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 88/100
CapSoftware/Cap#2305 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
CapSoftware/Cap#1714 · 3 則留言 ·
維護者通常 1 天內回覆
-
Linux: forced WEBKIT_DISABLE_DMABUF_RENDERER=1 makes the main window transparent on WebKitGTK 2.54 (only repainted regions show)可能已有人在做 @AatmanAJ 於 1 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 25/100
CapSoftware/Cap#2624 · 2 則留言 ·
維護者通常 1 天內回覆
-
macOS: main-thread panic in tauri-runtime-wry 2.8.1 freezes Cap mid Instant recording; the crashed recording then can't be recovered or reuploaded可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 4/5 3-5 天 新手友好度 18/100
CapSoftware/Cap#2606 · 3 則留言 ·
維護者通常 1 天內回覆
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
needs: triage type: bug
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆
-
area:docs documentation P3
難度 1/5 1 小時以內 新手友好度 88/100
Raaif-Yousuf/Wingman#837 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 80/100
維護者通常 1 天內回覆
-
priority: medium
難度 2/5 1-3 小時 新手友好度 68/100
storytold/photocraft#6759 ·
維護者通常 1 天內回覆