Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Terminal loses text selection whenever a TUI enables mouse reporting — no way to opt out in the browser

オープン
#7,938 コメント 3 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript, vscode

調査の方向性

まず code-server のターミナル統合と、同梱されている @xterm/xterm 6.1.0-beta.291 ビルドの使用箇所を追跡し、次に mouseEventsRequireAlt をどのように設定できるかを比較します。Shift+drag という回避策についてターミナル FAQ を確認してください。ブラウザーのユーザーがマウスレポートを利用できる状態を保ちながらターミナルの選択を維持できるか、または制限と workaround が文書化されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug code-server needs-investigation
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時間
マージ済み PR(30日)
39

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/code-server のほかの issue

coder/code-server の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。