Re: [PATCH] console_codes.4: document more xterm codes

Alejandro Colomar <[email protected]> Wed, 29 Jul 2026 17:21:21 +0200
Newsgroups org.kernel.vger.linux-man
Message-ID <amoaOGTxHY1YqhXF@devuan>
Hi Jan,

> Date: 2026-07-18 17:36:31+0200
> From: Jan Engelhardt <[email protected]>
>
> Signed-off-by: Jan Engelhardt <[email protected]>

Thanks!  I've applied the patch.  I've amended it to use semantic
newlines (see man-pages(7)) with the following small changes:

	diff --git i/man/man4/console_codes.4 w/man/man4/console_codes.4
	index 9507a760e07b..faf12a66cd82 100644
	--- i/man/man4/console_codes.4
	+++ w/man/man4/console_codes.4
	@@ -792,14 +792,17 @@ .SS Comparisons with other terminals
	 ESC ] 104 ; \f[I]num\f[] ST    Reset color for mode 4;\f[I]num\f[]
	 ESC ] 105 ; \f[I]num\f[] ST    Reset color for mode 5;\f[I]num\f[]
	 ESC ] 106 ; \f[I]num\f[] ; \f[I]val\f[] ST     T{
	-Exactly equal to 6;\f[I]num\f[];\f[I]val\f[]. (no "reset" logic)
	+Exactly equal to 6;\f[I]num\f[];\f[I]val\f[].
	+(no "reset" logic)
	 T}
	 ESC ] 110 ST   T{
	-Reset color for mode 10. (Codes 111-119 map to resetting modes 11-19,
	-respectively.)
	+Reset color for mode 10.
	+Codes 111-119 map to resetting modes 11-19,
	+respectively.
	 T}
	 ESC ] \f[I]mode\f[] ; ? ST     T{
	-Query the respective property/color/etc. (modes 4,5,10-19,50)
	+Query the respective property/color/etc.
	+(modes 4,5,10-19,50)
	 T}
	 .TE
	 .P


Have a lovely day!
Alex

> ---
>  man/man4/console_codes.4 | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/man/man4/console_codes.4 b/man/man4/console_codes.4
> index 10d2e3b5f..9507a760e 100644
> --- a/man/man4/console_codes.4
> +++ b/man/man4/console_codes.4
> @@ -754,7 +754,30 @@ T}
>  ESC ] 1 ; \f[I]txt\f[] ST	Set icon name to \f[I]txt\f[].
>  ESC ] 2 ; \f[I]txt\f[] ST	Set window title to \f[I]txt\f[].
>  ESC ] 4 ; \f[I]num\f[] ; \f[I]txt\f[] ST	Set color \f[I]num\f[] (0-255) to \f[I]txt\f[].
> +ESC ] 5 ; 0 ; \f[I]txt\f[] ST	Set the color for bold substitution to \f[I]txt\f[].
> +ESC ] 5 ; 1 ; \f[I]txt\f[] ST	Set the color for underline substitution to \f[I]txt\f[].
> +ESC ] 5 ; 2 ; \f[I]txt\f[] ST	Set the color for blinking substitution to \f[I]txt\f[].
> +ESC ] 5 ; 3 ; \f[I]txt\f[] ST	Set the color for reverse substitution to \f[I]txt\f[].
> +ESC ] 5 ; 4 ; \f[I]txt\f[] ST	Set the color for italic substitution to \f[I]txt\f[].
> +ESC ] 6 ; 0 ; \f[I]val\f[] ST	Toggle bold rendition: 0=bold, 1=substitute by color.
> +ESC ] 6 ; 1 ; \f[I]val\f[] ST	Toggle underscore rendition: 0=underscore, 1=color.
> +ESC ] 6 ; 2 ; \f[I]val\f[] ST	Toggle blinking rendition: 0=blinking, 1=color.
> +ESC ] 6 ; 3 ; \f[I]val\f[] ST	Toggle reverse rendition: 0=reverse, 1=color.
> +ESC ] 6 ; 4 ; \f[I]val\f[] ST	Toggle italic rendition: 0=italic, 1=color.
>  ESC ] 10 ; \f[I]txt\f[] ST	Set the foreground text color to \f[I]txt\f[].
> +ESC ] 11 ; \f[I]txt\f[] ST	Set the background color to \f[I]txt\f[].
> +ESC ] 12 ; \f[I]txt\f[] ST	Set the text cursor color to \f[I]txt\f[].
> +ESC ] 13 ; \f[I]txt\f[] ST	Set the mouse cursor foreground color to \f[I]txt\f[].
> +ESC ] 14 ; \f[I]txt\f[] ST	Set the mouse cursor background color to \f[I]txt\f[].
> +ESC ] 15 ; \f[I]txt\f[] ST	Set the Tektronix foreground color to \f[I]txt\f[].
> +ESC ] 16 ; \f[I]txt\f[] ST	Set the Tektronix background color to \f[I]txt\f[].
> +ESC ] 17 ; \f[I]txt\f[] ST	T{
> +Set the background text color for highlighted (selected) text to \f[I]txt\f[].
> +T}
> +ESC ] 18 ; \f[I]txt\f[] ST	Set the Tektronix cursor color to \f[I]txt\f[].
> +ESC ] 19 ; \f[I]txt\f[] ST	T{
> +Set the foreground text color for highlighted (selected) text to \f[I]txt\f[].
> +T}
>  ESC ] 46 ; \f[I]name\f[] ST	T{
>  Change log file to
>  .I name
> @@ -766,6 +789,18 @@ Set font to \f[I]fn\f[]
>  see "allowFontOps" in
>  .BR xterm (1)).
>  T}
> +ESC ] 104 ; \f[I]num\f[] ST	Reset color for mode 4;\f[I]num\f[]
> +ESC ] 105 ; \f[I]num\f[] ST	Reset color for mode 5;\f[I]num\f[]
> +ESC ] 106 ; \f[I]num\f[] ; \f[I]val\f[] ST	T{
> +Exactly equal to 6;\f[I]num\f[];\f[I]val\f[]. (no "reset" logic)
> +T}
> +ESC ] 110 ST	T{
> +Reset color for mode 10. (Codes 111-119 map to resetting modes 11-19,
> +respectively.)
> +T}
> +ESC ] \f[I]mode\f[] ; ? ST	T{
> +Query the respective property/color/etc. (modes 4,5,10-19,50)
> +T}
>  .TE
>  .P
>  It recognizes the following with slightly modified meaning
> -- 
> 2.55.0
> 
> 

-- 
<https://www.alejandro-colomar.es>
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmpqGnEACgkQ64mZXMKQ
wqkaHQ//QUgP/bOZ2M0G0P+zOWRBkCGsudKwVfX1CSoqkUwCdzzclyGpkz32uwU9
quGqA8ERo2Xx3W2mD/aT8GDxCiybpcHK0zgBZLdLPCH6ULuGeYaYuBgTmysI3k0t
DYGL7UuEtWFHluqknpDULk9XdnRq5YnXrQuZL4UE3zeMelI0PGuEId8gKF3LjuaW
OS9lklyb3iRE5XBfP6wR8X7g0g3qowpn/Hnqu/VqBAZ2P+C/E+2oZkrvGKbLkTxR
FL7Jv/dIecgTTV5RwqkFkx20jKsb5ea4sAUjFRvXezDAClrkw+SIf9ykWgpVf5PR
yTUBExMGCxvqsQtAZs7T8BbT64qQRlOx+RRtoHMt1e8lm4a68RbI3PDmMI1+N3LY
6AILUOTmoHwWSACTkZEH/3cUGxqfA3Z1bppAGrVY9a5XNVxQ3rvU1MavEgV1ayo6
K2o0ZIDBigRRF9c+ZFZk4+SMEXaczeM3ouU7tFzCNS8Op/cx3YWHwevPB06Hk9mE
O+FlLEfKP6LHWfRpxZKY2anSa46Utk15CRYIArufdKbK6w8ycLziD/DTXh1ze13w
eEass0Gd2BPTxTe87VSHI9TM7tS8yO9srapBlzpGA+QdgCmoAFv0CH9CJGwULIHU
kGzMUw6U6MEzaIHWJFePw+DWZAHX3898abSot4WEY1/0xrrFNYY=
=p8o1
-----END PGP SIGNATURE-----