Messages in this thread | | | Subject | Re: [PATCH v0 5/5] Add Documentation for console mouse reporting | From | Jiri Slaby <> | Date | Fri, 26 Jun 2020 13:00:00 +0200 |
| |
On 26. 06. 20, 9:23, Tammo Block wrote: > This patch adds a description of the kernel interface(s) used for mouse > reporting and compares the old and new bitmask layout.
<irony> Documentation for the vt code? Phew. </irony>
Thanks for doing this.
> Signed-off-by: Tammo Block <tammo.block@gmail.com> > --- > .../admin-guide/console-mouse-reporting.rst | 82 +++++++++++++++++++ > Documentation/admin-guide/index.rst | 1 + > 2 files changed, 83 insertions(+) > create mode 100644 Documentation/admin-guide/console-mouse-reporting.rst > > diff --git a/Documentation/admin-guide/console-mouse-reporting.rst b/Documentation/admin-guide/console-mouse-reporting.rst > new file mode 100644 > index 000000000000..799288295655 > --- /dev/null > +++ b/Documentation/admin-guide/console-mouse-reporting.rst ... > +SRG protocol > +++++++++++++ > + > +For the SRG style protocol (xterm style, DECSET 1005 *is* set) the upper 11 > +bits of sel_mode are used like this: > + > +- 6 : Always 1, identifies SRG protocol / TIOCL_SELSRGREPORT > +- 7 : Unused, should be 0. Ignored by kernel (future extensions) > +- 8 : Set on button release events / TIOCL_SELSRGRELEASE > +- 9-16 : The SRG byte, send to userspace as is / TIOCL_SELSRGMASK
To me -- a non-native -- it looks like s/send/sent/?
> +The SRG (upper) byte > +++++++++++++++++++++ > + > +The layout of the *upper byte* ("SRG") is identical to the SRG data layout, > +for protocol "1005", as described in detail in the xterm [1]_ or > +terminalguide [2]_ home pages. Short summary: > + > + - 1,2 : Buttons, lower bits (see notes below) > + - 3-5 : Modifier keys (Shift, Alt and Ctrl) > + - 6 : Mouse movement only, no button status change > + - 7-8 : Buttons, upper bits (for buttons 4-15) > + > +Notes > ++++++ > + > +Button numbers are encoded like this: > + > +- 0-2 : Left, middle and right button > +- 3 : No button pressed / Button release > +- 4-15 : More buttons, e.g. 4 and 5 are scroll wheel > + > +Please note that button releases should only be reported for buttons 0-2. > + > +Also note that coordinates (xs,ys,xe,ye) are zero based for the TIOCL_SETSEL > +syscall but one based for the escape sequences send by the kernel, so the
again "sent".
thanks, -- js suse labs
| |