fix(terminal): block mouse events leaking to PTY#100
Merged
Conversation
Motion events (mouse movement) were leaking as X10 sequences causing garbage text. Now explicitly blocks all motion events at entry. - Block MouseActionMotion events immediately - Always forward scroll wheel (apps handle internally) - Only forward button press when mouseEnabled=true
Mouse motion, scroll, and click events were being forwarded to the PTY as X10 escape sequences, causing garbage text in apps that don't enable mouse tracking. - Block motion events immediately on entry - Block scroll wheel (no scrollback buffer exists) - Block button clicks unless app enables mouse tracking - Scrollback is a separate feature tracked in #95
Block all mouse events unless app has enabled mouse tracking. Without tracking, X10 sequences appear as garbage text. Scroll requires scrollback buffer (tracked in #95).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive fix for mouse events leaking to PTY as garbage text.
Changes
Root Cause
vt10x has no scrollback buffer and apps like Claude Code don't enable mouse tracking. Forwarding mouse events as X10 sequences caused visible garbage in the input.
Note
Scrollback/scroll functionality requires implementing a scrollback buffer - tracked in #95.
Test Plan