-
Notifications
You must be signed in to change notification settings - Fork 43
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 wheel is not supported in application mouse tracking modes #62
Comments
Ok, thanks. It is nice to see this tool is getting better each day. |
Done. X11 mouse tracking protocol I have also updated the release for linux. |
NASA's Mars 2020 Perseverance Rover Landing live broadcast begins 🤞 |
Do you think the modes Now when an application requests any of these modes, it uses mode |
No, mode The problem I've encountered with your multiplexer is not that it uses mode See this recommendation (as you know, this is still a draft but these recommendations are based on real usages.) It even recommends a precedence among these modes, which works very well in real life scenarios. |
Thank you, now it's all clear 😊 The X11 is a default mouse reporting protocol.
|
Yes, this basically sums up the modes. But there is one thing that is usually overlooked: The default mouse coordinates mode on terminals limit the resolution to 256x256 cells, as it uses a byte oriented protocol. There were other coordinate formats to surpass this limits (mode '1005 - UTF8 |
That's right, coordinates are already being cut I'm worried about the following question ( Could this be due to the use of some public ANSI VT sequence parsing algorithm that does not allow negative numbers? I need to use negative numbers when working with the mouse, when the cursor goes out of the window when dragging. I don't know if I should do my own new mouse tracking mode or just allow negative numbers. Example: EDIT:
This standard does not provide for the minus sign as Parameter Bytes. But everyone assumes that the CSI numeric parameters are a series of semicolon-separated literal numbers, not bytes Therefore, it is possible to violate (use negative numbers) this standard without spoiling the expected behavior. |
I suggest you read, if not already did, the DEC STD070 document, aka "the bible". It explicitly defines the wire formats (ESC,CSI, DCS, OSC, APC, SOS, PM), albeit inconsistent with the later documents or its revisions on some points. See especially the page 3-23 Extension layer (#124 and on in pdf). You'll hopefully find the answer for this question. It explains the specs.
Minus or hypen (0x2d) is reserved. It is in the range of intermediary bytes. (0x20-0x2f) for Still, if you are going to define a new command, which I highly recommend avoid using |
OTOH, in theory you can use negative numbers in a new E.g. let's assume that we request from the host app a sum of two signed integers,
If this function is going to be used internally, as I wrote on my previous message, then you should replace P.S While the |
Thanks a lot for the link to the DEC STD070 document and helpful thoughts! With CSI sequences everything is very clear - negative numbers in CSI cannot be used in general. BUT, from
This means there will be no side effects when the SGR mouse report with a minus sign is received, no extraneous characters in the input, just the whole sequence will be discarded, which is great. Now I really want to add a minus sign to the SGR mouse reporting protocol. Now I really don't want to come up with a new sequence for this, and I'm tempted to take the risk and break the existing order. Apps that can't interpret the minus sign, they also won't know the new mouse protocol if I have to reinvent it, so this functionality won't be available to them anyway. |
It's not completely clear to me what the consequences/side effects may be, but so far everything looks optimistic. Probably the biggest problem is that applications can assume that the terminal always emits valid sequences, and with this in mind, make some optimizations. |
A sub-mode is required to enable sending negative coordinates in SGR reports. For example, the and extraneous characters appear in the input. EDIT:
I will now test all popular terminals for side effects when using this sub-mode. |
The idea with sub-modes did not work. It is going to be a
|
Now negative parameters will only be sent to applications that explicitly ask for it using I've updated the releases. |
@o-sdn-o , As you can see, not all terminals and apps implement the sequences and follow the rules strictly. :) In an ideal world, unrecognized or irregular sequences would be ignored by all terminal emulators or apps. In practice, however, they simply breaks some of them; even valid but unrecognized sequences break them (e.g initial implementation of DEC's I will have the time to check the release tomorrow, and provide more feedback. Cheers |
Everything here seems to be done and works fine, but if something is wrong, I'll reopen this issue. |
When a window got focus in application mouse tracking modes, it should also allow mouse wheel events.
To reproduce simply run a CLI app, such as
htop
, orvim
and try using mouse wheel. It does nothing.For more info on mouse wheel support, see: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Wheel-mice
Tested terminals: xterm, gnome-terminal, kitty
Tested terminal widgets: vte, TerminalCtrl (Ultimate++ terminal widget)
Tested platform: Linux 5.10, Gnome 3.38.
The text was updated successfully, but these errors were encountered: