Title: Terminal loses text selection whenever a TUI enables mouse reporting — no way to opt out in the browser · Issue #7938 · coder/code-server · GitHub
Open Graph Title: Terminal loses text selection whenever a TUI enables mouse reporting — no way to opt out in the browser · Issue #7938 · coder/code-server
X Title: Terminal loses text selection whenever a TUI enables mouse reporting — no way to opt out in the browser · Issue #7938 · coder/code-server
Description: 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 relia...
Open Graph Description: 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; ...
X Description: 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; ...
Opengraph URL: https://github.com/coder/code-server/issues/7938
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Terminal loses text selection whenever a TUI enables mouse reporting — no way to opt out in the browser","articleBody":"\u003c!-- Type: Feature Request / upstream tracking. Repo: coder/code-server -->\n\n### What happens\n\nAny 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.\n\nConcretely: 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.\n\n### Measured\n\nLoaded the exact `@xterm/xterm` build shipped by code-server (6.1.0-beta.291) standalone and drove it with real mouse events:\n\n| Mouse tracking armed | plain drag | `Shift` + drag |\n|---|---|---|\n| none | selection | selection |\n| `?1000h ?1006h` | nothing | selection |\n| `?1000h ?1002h ?1003h ?1006h` | nothing | selection |\n\n### Ask\n\nxterm.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.\n\nI 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.\n\nAt minimum, documenting `Shift`+drag as the escape hatch in the terminal FAQ would already help.","author":{"url":"https://github.com/dede34fr","@type":"Person","name":"dede34fr"},"datePublished":"2026-08-10T18:46:13Z","url":"https://github.com/coder/code-server/issues/7938"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3f6f7071-eed1-ddf3-baf9-673627e7d50c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E6B8:1B4D88:1B138:23457:6B042EF1 |
| html-safe-nonce | 7e5c5727ee439cf0bb4a3bd3e36ee861067e379a7747443203588d0683d2b7bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkI4OjFCNEQ4ODoxQjEzODoyMzQ1Nzo2QjA0MkVGMSIsInZpc2l0b3JfaWQiOiI3MTM5NzgyMTk1NzMwMzA2NDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5c7933340d621a4c54117a2a3db4f3fac09071c4408e0e22c44480c4e2d23415 |
| hovercard-subject-tag | issue:5113306733 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/code-server/7938/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cbada6173bfa344af094ee67d0dcf7dafcd4c8acf1515082afb68f44815aba85/coder/code-server/issues/7938 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cbada6173bfa344af094ee67d0dcf7dafcd4c8acf1515082afb68f44815aba85/coder/code-server/issues/7938 |
| og:image:alt | 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; ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dede34fr |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/code-server git https://github.com/coder/code-server.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 172953845 |
| octolytics-dimension-repository_nwo | coder/code-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 172953845 |
| octolytics-dimension-repository_network_root_nwo | coder/code-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width