Repository navigation
Description
Current Behavior
Applications that request mouse reporting receive no mouse input in local Wave terminal blocks on Windows. Keyboard input is unaffected.
I noticed this with Claude Code's fullscreen renderer (/tui fullscreen), where clicking a side pane's close control does nothing. The same Claude Code build and session closes the pane correctly in Windows Terminal on the same machine.
Expected Behavior
Mouse clicks and wheel events should be forwarded to applications that have enabled mouse reporting (DECSET ?1000/?1002/?1003/?1006), as they are in Windows Terminal.
Isolation
I wrote a probe that reads the console input buffer directly via ReadConsoleInputW (bypassing the C runtime, which returns nothing once the console is in raw VT mode). It sets ENABLE_MOUSE_INPUT, clears ENABLE_QUICK_EDIT, and writes \e[?1000h\e[?1002h\e[?1003h\e[?1006h first. Clicking, scrolling and typing during each phase — the typing acting as a control to prove the probe is observing the console:
MOUSE_EVENT (VT input off) |
mouse via VT (VT input on) | key events | |
|---|---|---|---|
| Wave 0.14.5 | 0 | none | 30 / 33 |
| Windows Terminal | 46 | yes — \e[<0;108;40M, \e[<64;108;40M |
13 / 996 |
Keyboard reaches the process in Wave; mouse never does.
Narrowing further, all against the same remote host, running htop and clicking column headers:
| path | ConPTY in path | result |
|---|---|---|
| Local shell in Wave | yes | no mouse |
ssh user@host typed into a local Wave shell |
yes (the ssh client itself is local) | no mouse |
| Same host via Wave's own connection feature | no | mouse works |
Mouse reporting works whenever ConPTY is absent from the path, so the frontend/xterm.js mouse handling appears to be functioning correctly. The failure is specific to the local Windows ConPTY path.
Steps To Reproduce
- On Windows, open a local terminal block in Wave.
- Run any mouse-driven TUI —
htopunder WSL, or Claude Code with/tui fullscreen. - Click a clickable element. Nothing happens.
- For contrast, open the same host via a Wave connection to a Linux machine and repeat: clicks work.
Possible Cause
CreatePseudoConsole is called with dwFlags = 0 in the pty fork Wave uses (photostorm/pty, pty_windows.go, via the replace directive in go.mod):
if err := procCreatePseudoConsole(
windows.Handle(consoleR.Fd()),
windows.Handle(consoleW.Fd()),
0, // dwFlags
&consoleHandle); err != nil {In default console-host mode, ConPTY interprets the application's output rather than forwarding it, so the application's mouse-mode DECSET sequences never reach xterm.js. xterm.js only begins emitting mouse reports once it observes those sequences in the output stream, so it never starts, and the application receives nothing. Windows Terminal is unaffected because it is itself the console host and receives Win32 mouse events directly.
An undocumented PSEUDOCONSOLE_PASSTHROUGH_MODE flag exists, but I would offer it as a lead rather than a fix: it is not in Microsoft's documentation, third-party projects report it as honored only on Windows 11 22000+/22H2 and later, and 0x8 is declared as PSEUDOCONSOLE_GLYPH_WIDTH_GRAPHEMES in some ConPTY builds. On Windows 10 19045 it may simply be unavailable, so a fix that works here might instead require enabling mouse reporting for local ConPTY sessions by another route.
This may also be the underlying cause of the mouse-wheel reports in #3077, #3350 and #2215 — with no mouse reports reaching the application, nothing can drive an application's own scrolling.
Wave Version
0.14.5
Platform
Windows
OS Version/Distribution
Windows 10 Pro 19045
Architecture
x64
Anything else?
Happy to attach the probe script if it would be useful for reproducing the measurements above.
Activity