[dev] st mouse support beyond column 223

From: Egmont Koblinger <egmont_AT_gmail.com>
Date: Fri, 25 Jan 2013 00:44:24 +0100

Hi guys,

The original mouse protocol for terminals encodes the coordinates as a
single byte (plus 32) hence only allows coordinates up to 223.

Xterm's SGR 1006 extension changes to a different format which allows
arbitrary coordinates. This extension is getting widely adopted across
terminals (e.g. xterm, vte, konsole, iterm2, putty...), as well as
applications (vim, emacs...). Tmux has a patch too:

Please see my patch, it adds support for this extension. Furthermore, if
the extension is turned off, it modifies the behavior of post-223 clicks:
it makes it report nothing rather than bogus coordinates.

(To make the story more complicated, there was a first extension (1005)
made by xterm, which is terribly broken, then a second one (1015) by urxvt,
which is kinda okay, and this is the third one. It looks pretty much that
this is going to be the "winning" one. For the sake of simplicity I only
added support for this latter, but it might be very easy to support 1015
too. On the application front, currently Midnight Commander uses this 1015
extension, but I will ask them (send them patch) to switch to the newer
1006 mode. Let me know if you'd prefer to support 1006 too, it can be
added in practically no time.)

I hope you like my patch, let me know if you have any questions.


Received on Fri Jan 25 2013 - 00:44:24 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 25 2013 - 00:48:04 CET