Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

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

未關閉 適合新手
#2,596 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@AatmanAJ 已經在處理了。

開始於 2026年10月15日。

  • #2627 來自 @AatmanAJ —— 未關閉

評估

難度
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
  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: 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 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

CapSoftware/Cap 的其他 Issue

查看 CapSoftware/Cap 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。