Hi! On Sun, Feb 23, 2025 at 10:13:42AM +0100, Günther Noack wrote: > These previously undocumented selection modes for the Linux console > are implemented in drivers/tty/vt/selection.c. > > Cc: Jared Finder <jared@xxxxxxxxxx> > Cc: Hanno Böck <hanno@xxxxxxxxx> > Cc: Jann Horn <jannh@xxxxxxxxxx> > Cc: Jiri Slaby <jirislaby@xxxxxxxxxx> > Cc: jwilk@xxxxxxxxx > Signed-off-by: Günther Noack <gnoack3000@xxxxxxxxx> > --- > man/man2const/TIOCLINUX.2const | 48 ++++++++++++++++++++++++++++++---- > 1 file changed, 43 insertions(+), 5 deletions(-) > > diff --git a/man/man2const/TIOCLINUX.2const b/man/man2const/TIOCLINUX.2const > index c0acdd0ea..27758584e 100644 > --- a/man/man2const/TIOCLINUX.2const > +++ b/man/man2const/TIOCLINUX.2const > @@ -65,11 +65,49 @@ are the ending > column and row. > (Upper left corner is row=column=1.) > .I sel_mode > -is 0 for character-by-character selection, > -1 for word-by-word selection, > -or 2 for line-by-line selection. > -The indicated screen characters are highlighted and saved > -in a kernel buffer. > +may be one of the following operations: > +.RS > +.TP > +.B TIOCL_SELCHAR > +Select character-by-character. > +The indicated screen characters are highlighted > +and saved in a kernel buffer. > +.TP > +.B TIOCL_SELWORD > +Select word-by-word. > +The indicated screen characters are highlighted > +and saved in a kernel buffer. > +.TP > +.B TIOCL_SELLINE > +Select line-by-line. > +The indicated screen characters are highlighted > +and saved in a kernel buffer. It might be interesting to split this into two patches: 1) A first one that fixes existing wording, line breaks, etc, and gives names to the values 0,1,2. 2) And a second one that adds new documentation. > +.TP > +.B TIOCL_SELPOINTER > +Show the pointer at position > +.RI ( xe ", " ye ). I'd use a non-breaking space \~, which also has the benefit of not needing quotes: .RI ( xe ,\~ ye ). > +.TP > +.B TIOCL_SELCLEAR > +Remove the current selection highlight, if any, > +from the console holding the selection. > +.TP > +.B TIOCL_SELMOUSEREPORT > +Report > +.RI ( xs ", " ys ) . > +as the current mouse location. > +In this selection mode, > +the lower 4 bits of > +.I sel_mode > +.RB ( TIOCL_SELBUTTONMASK ) > +may additionally be set to indicate the desired button press and > +modifier key information for the mouse event. > +.\" https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Normal-tracking-mode Please always enclose URIs in <>. (See uri(7).) > +.IP > +If mouse reporting is not enabled for the terminal, > +this operation yields an > +.B EINVAL > +error. > +.RE Have a lovely night! Alex > .IP > Since Linux 6.7, using this subcode requires the > .B CAP_SYS_ADMIN > -- > 2.48.1 > -- <https://www.alejandro-colomar.es/>
Attachment:
signature.asc
Description: PGP signature