[PATCH v0 0/5] vt: Add SRG mouse reporting features

From: Tammo Block
Date: Fri Jun 26 2020 - 03:26:56 EST


Hi everybody,

this patchset adds xterm like mouse reporting features to the kernel console.

The linux virtual console has support for mouse reporting since 1994 or so,
but the kernel only supports the original X10 ("9") and X11 ("1000") style
standard protocols. To support more protocols these patches expand the kernel
structures in a downwards compatible way, see the last patch for detailed
documentation and [1] or [2] for a list and description of alls the bits
of the various protocols, as well as their limitations.

This new feature offers the following advantages :

1.) XTerm already supports all of this and as most (all?) TUI software with
mouse support is compatible and tested with xterm, they will also work
with the kernel console. Programs will work out of the box with this
(if the mouse daemon supports it) and there is no need to change them.
2.) All protocols also work via ssh while the gpm protocol does not, because
gpm uses a local socket (/dev/gpmdata) to communicate with the clients.
3.) Even the Microsoft Console does support these xterm like protocols, we
should not let the linux console fall behind! ;-)

TTBOMK the *only* user of any of the mouse reporting interface today is
"consolation" [3]. The well known GPM does not support mouse reporting at all
(yet), see [4] for details. Of course the mouse daemons have to be adapted
too, but they will continue to work as before if they are not adapted.

[4] also originally gave the reason for these patches.

Kind regards,
Tammo


[1] https://terminalguide.namepad.de/mouse/
[2] https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
[3] https://salsa.debian.org/consolation-team/consolation/
[4] https://github.com/telmich/gpm/issues/29


Tammo Block (5):
Change/add data structures for SRG mouse reporting
Make it possible to enable/disable SRG mouse reporting
Check for SRG protocol and move bit masking
Add support for SRG report output format
Add Documentation for console mouse reporting

.../admin-guide/console-mouse-reporting.rst | 82 +++++++++++++++++++
Documentation/admin-guide/index.rst | 1 +
drivers/tty/vt/selection.c | 6 +-
drivers/tty/vt/vt.c | 39 +++++++--
include/linux/console_struct.h | 3 +-
include/uapi/linux/tiocl.h | 24 ++++--
6 files changed, 138 insertions(+), 17 deletions(-)
create mode 100644 Documentation/admin-guide/console-mouse-reporting.rst

--
2.27.0