anomalyco / anomalyco/opencode
[Bug] Mouse wheel dead in the TUI inside the VS Code integrated terminal since 1.105, root cause is xterm not opencode
@kommander is already working on this.
Since Aug 14, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Description
The mouse wheel is dead in the TUI inside the VS Code integrated terminal. Arrow keys work, but scrolling the wheel does nothing. This started with VS Code 1.105.
The root cause is not opencode. The wheel events are silently swallowed by xterm.js, the terminal emulator bundled in VS Code, in the alt buffer. The regression was introduced in xterm 5.6.0-beta.119. I verified this with byte-level A/B testing between VS Code 1.104 (beta.118) and 1.105 (beta.119): a raw-mode pty listener plus CDP-injected wheel events. Pixel deltas under roughly 50px produce zero bytes on the pty, so the app never sees them. This affects trackpads, smooth wheels and low-sensitivity mice; fast-scrolling mice can pass the threshold, which is why it is so easy to miss.
Analysis and fix already submitted upstream:
- xterm.js issue with full evidence: https://github.com/xtermjs/xterm.js/issues/6105
- xterm.js fix PR: https://github.com/xtermjs/xterm.js/pull/6104
Opening this here so opencode users hitting it in VS Code have a searchable reference, and a place to pick up the fix once VS Code ships a newer xterm.
Plugins
None
OpenCode version
Latest (dev build), run inside the VS Code integrated terminal
Steps to reproduce
- VS Code 1.105 or later on Windows, open the integrated terminal
- Start opencode (TUI)
- Hover the list and scroll the mouse wheel
- Trackpad / smooth wheel / low-sensitivity mouse: scroll does nothing
Screenshot and/or share link
Not applicable, see byte-level evidence in the linked xterm.js issue
Operating System
Windows 11
Terminal
VS Code integrated terminal (bundled xterm)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.