Skip to content

vt: Add SRG mouse reporting features

Tammo Block lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v0 Latest5 patches 5 repliesIn review

Patches in v0 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Change/add data structures for SRG mouse reportinginclude/linux/console_struct.h include/uapi/linux/tiocl.h+18 -91 reply
2/5Make it possible to enable/disable SRG mouse reportingdrivers/tty/vt/vt.c+11 -21 reply
3/5Check for SRG protocol and move bit maskingdrivers/tty/vt/selection.c drivers/tty/vt/vt.c+5 -50 replies
4/5Add support for SRG report output formatdrivers/tty/vt/vt.c+23 -31 reply
5/5Add Documentation for console mouse reportingDocumentation/admin-guide/console-mouse-reporting.rst Documentation/admin-guide/index.rst+83 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v0 yet.

Read the v0 thread

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

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
Signature · 1 line
2.27.0