-
-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mouse reporting/tracking and mouse encoding/coordinates behave incorrectly #1633
Comments
Thanks for the details! What other type of behaviour, aside from any-event*, should we implement? I'm just trying to avoid implementing 4-5 behaviours that no-one uses anymore :) So which ones exactly, aside from the *Which I think would be cool to implement for focused panes who requested it! |
(Sorry about my rambling, it was a long few weeks. :) ) Widest coverage of modern applications would be modes 1000, 1002, 1003, 1005, and 1006. BTW these can all be tested quickly in vttest under menu 11.8.5 "XTERM mouse features". (Funny, digging though issues I see this: #1013 (comment) lol ) For the actual events being sent, just these are sufficient:
zellij likely already has all the information for these, it would just be minor code change to filter some events depending on mode. For encoding, these two are good:
Besides the format of the string (integers as byte values vs integers printed to ASCII), the key difference between these encodings is that: UTF-8 encoding just reports a generic "release" for any combination of buttons that are released; while SGR encoding encodes the specific button that is released. (Note that I am deliberately omitting the xterm default encoding of X10 compatibility mode (9) because it can generate invalid UTF-8 sequences. For zellij to support both UTF-8 and X10 encoding, it would have to be able to write both raw and UTF-8 bytes to the remote side at any time, which depending on architecture can be unpleasant as it breaks the nice "everything is the same encoding underneath the VT layer". I think that today's terminals should assume consistent encoding first, and then bypass that if an actual user shows up with that request.) Here is an example on the encoding side where the events are filtered and then encoded to any of these above.
It would! :) |
Fixed, thanks again! |
zellij mouse modes have the following issues. (See reference: https://www.invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-X10-compatibility-mode) (Sorry a bit scatterbrained, hopefully the gist makes it...)
grid.rs needs to add a mouse encoding (which can be just SGR (1003 h) and X10 or NONE (1003 l) in today's world) which is distinct from the mouse events to report (button down only (9), button down and up (1002), button down/up and motions (1003)).
(It would be really sweet if any-event (1003) was also supported, then a moving text mouse cursor could work happily. But that's a feature request, not a bug. :) )
The text was updated successfully, but these errors were encountered: