Terminal loses text selection whenever a TUI enables mouse reporting — no way to opt out in the browser
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript, vscode
研究方向
先追蹤 code-server 的終端整合及其對隨附的 @xterm/xterm 6.1.0-beta.291 建置版本的使用情況,然後比較如何設定 mouseEventsRequireAlt。查看終端 FAQ,了解 Shift+drag 這個替代方案。當瀏覽器使用者能在滑鼠回報仍可用的情況下保留終端選取內容,或限制與 workaround 已被記錄時,即視為完成。
由索引模型根據 Issue 內容生成。
描述
What happens
Any TUI that enables mouse reporting (CSI ? 1000 h) takes the click away from xterm.js, so a plain drag in the terminal no longer creates a selection. On the desktop that is annoying; in code-server it removes the last reliable path to the OS clipboard, because the DOM selection is what the browser's own copy relies on — the VS Code copy commands go through an async IPC hop that loses the clipboard user-gesture.
Concretely: with a full-screen TUI running (e.g. Claude Code with tui: fullscreen), users cannot copy terminal text out of the browser at all, unless they know that Shift+drag forces a selection.
Measured
Loaded the exact @xterm/xterm build shipped by code-server (6.1.0-beta.291) standalone and drove it with real mouse events:
| Mouse tracking armed | plain drag | Shift + drag |
|---|---|---|
| none | selection | selection |
?1000h ?1006h |
nothing | selection |
?1000h ?1002h ?1003h ?1006h |
nothing | selection |
Ask
xterm.js already has the option that solves this — mouseEventsRequireAlt, which keeps tracking armed but only claims the click while a modifier is held. It is not referenced anywhere in the VS Code build that code-server ships, so it stays at its default.
I have opened an upstream request for VS Code to expose it as a terminal setting: https://github.com/microsoft/vscode/issues/330052. Filing here as well because the browser case is materially worse than the desktop one, and because code-server may want to set the option (or surface a preference) ahead of upstream.
At minimum, documenting Shift+drag as the escape hatch in the terminal FAQ would already help.
- 主要語言
- TypeScript
- 星號
- 79.4k
- 分支
- 6.9k
- 平均合併
- 2 天 13 小時
- 30 天內合併 PR
- 39
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
coder/code-server 的其他 Issue
-
security
難度 2/5 1-3 小時 新手友好度 74/100
coder/code-server#8013 · 3 則留言 ·
-
enhancement
難度 5/5 一週以上 新手友好度 35/100
coder/code-server#7976 · 2 則留言 ·
-
enhancement
難度 5/5 一週以上 新手友好度 35/100
coder/code-server#7962 · 3 則留言 ·
-
bug needs-investigation
難度 4/5 3-5 天 新手友好度 55/100
coder/code-server#7955 · 1 則留言 ·
-
enhancement
難度 5/5 一週以上 新手友好度 42/100
coder/code-server#7948 · 1 則留言 · 2 個 reaction ·
查看 coder/code-server 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
-
area:tools bug good first issue help wanted priority:P2
難度 2/5 1-3 小時 新手友好度 90/100
TaewoooPark/Motifcode#14 ·
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
newrelic-experimental/preflight#793 · 1 則留言 ·
-
bug 🐞
難度 2/5 1-3 小時 新手友好度 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) 未關閉
難度 2/5 1-3 小時 新手友好度 84/100
BasedHardware/omi#15320 ·