Skip to content

fix(unix): support X1/X2 mouse buttons in SGR parsing - #1117

Open
MaxAsif wants to merge 1 commit into
crossterm-rs:masterfrom
MaxAsif:feature/mouse-x1-x2-buttons
Open

fix(unix): support X1/X2 mouse buttons in SGR parsing#1117
MaxAsif wants to merge 1 commit into
crossterm-rs:masterfrom
MaxAsif:feature/mouse-x1-x2-buttons

Conversation

@MaxAsif

@MaxAsif MaxAsif commented Aug 24, 2026

Copy link
Copy Markdown

SGR mouse sequences for the X1/X2 (back/forward) buttons encode button numbers 8/9 by setting bit 7 of Cb, but parse_cb() only handled button numbers 0-7 and returned a parse error for anything else. Add MouseButton::X1/X2 and handle button numbers 8/9 for Down and Drag.

Fixes #1114

SGR mouse sequences for the X1/X2 (back/forward) buttons encode
button numbers 8/9 by setting bit 7 of Cb, but parse_cb() only
handled button numbers 0-7 and returned a parse error for anything
else. Add MouseButton::X1/X2 and handle button numbers 8/9 for
Down and Drag.

Fixes crossterm-rs#1114
@MaxAsif
MaxAsif requested a review from TimonPost as a code owner August 24, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support X1/X2 (back/forward) mouse buttons

1 participant