Fix mouseEventsRequireAlt by stripping alt from PTY mouse reports.

Alt is only used locally to gate passthrough; applications like tmux ignore alt-modified SGR sequences.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Daniel Imms
2026-05-27 16:11:35 -07:00
co-authored by Cursor
parent 7711d780c2
commit f8e9a81d0e
4 changed files with 53 additions and 3 deletions
+2 -1
View File
@@ -139,7 +139,8 @@ declare module '@xterm/headless' {
/**
* When enabled and the terminal is in mouse events mode, mouse click, drag,
* and move events are only sent to the underlying application when the alt
* key is held. Wheel events are not affected. This allows normal text
* key is held. The alt key is not included in the mouse reports sent to the
* application. Wheel events are not affected. This allows normal text
* selection by default while still supporting application mouse interaction
* and scrolling when holding alt. When enabled, this takes precedence over
* `macOptionClickForcesSelection`.
+2 -1
View File
@@ -209,7 +209,8 @@ declare module '@xterm/xterm' {
/**
* When enabled and the terminal is in mouse events mode, mouse click, drag,
* and move events are only sent to the underlying application when the alt
* key is held. Wheel events are not affected. This allows normal text
* key is held. The alt key is not included in the mouse reports sent to the
* application. Wheel events are not affected. This allows normal text
* selection by default while still supporting application mouse interaction
* and scrolling when holding alt. When enabled, this takes precedence over
* `macOptionClickForcesSelection`.