"Fossies" - the Fresh Open Source Software Archive

Member "xterm-379/ctlseqs.ms" (12 Feb 2023, 151113 Bytes) of package /linux/misc/xterm-379.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) MaxScript source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "ctlseqs.ms": 377_vs_379.

    1 .\"#! troff -ms $1      -*- Nroff -*-
    2 .\" "XTerm Control Sequences" document
    3 .\" $XTermId: ctlseqs.ms,v 1.667 2023/02/12 21:59:49 tom Exp $
    4 .\"
    5 .\"
    6 .\" Copyright 1996-2022,2023 by Thomas E. Dickey
    7 .\"
    8 .\"                         All Rights Reserved
    9 .\"
   10 .\" Permission is hereby granted, free of charge, to any person obtaining a
   11 .\" copy of this software and associated documentation files (the
   12 .\" "Software"), to deal in the Software without restriction, including
   13 .\" without limitation the rights to use, copy, modify, merge, publish,
   14 .\" distribute, sublicense, and/or sell copies of the Software, and to
   15 .\" permit persons to whom the Software is furnished to do so, subject to
   16 .\" the following conditions:
   17 .\"
   18 .\" The above copyright notice and this permission notice shall be included
   19 .\" in all copies or substantial portions of the Software.
   20 .\"
   21 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   22 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   23 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   24 .\" IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
   25 .\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   26 .\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   27 .\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
   28 .\"
   29 .\" Except as contained in this notice, the name(s) of the above copyright
   30 .\" holders shall not be used in advertising or otherwise to promote the
   31 .\" sale, use or other dealings in this Software without prior written
   32 .\" authorization.
   33 .\"
   34 .\"
   35 .\" Copyright 1991, 1994 X Consortium
   36 .\"
   37 .\" Permission is hereby granted, free of charge, to any person obtaining
   38 .\" a copy of this software and associated documentation files (the
   39 .\" "Software"), to deal in the Software without restriction, including
   40 .\" without limitation the rights to use, copy, modify, merge, publish,
   41 .\" distribute, sublicense, and/or sell copies of the Software, and to
   42 .\" permit persons to whom the Software is furnished to do so, subject to
   43 .\" the following conditions:
   44 .\"
   45 .\" The above copyright notice and this permission notice shall be
   46 .\" included in all copies or substantial portions of the Software.
   47 .\"
   48 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   49 .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   50 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   51 .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
   52 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
   53 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
   54 .\" OTHER DEALINGS IN THE SOFTWARE.
   55 .\"
   56 .\" Except as contained in this notice, the name of the X Consortium shall
   57 .\" not be used in advertising or otherwise to promote the sale, use or
   58 .\" other dealings in this Software without prior written authorization
   59 .\" from the X Consortium.
   60 .\"
   61 .\" X Window System is a trademark of X Consortium, Inc.
   62 .\"
   63 .\" Originally written by Edward Moy, University of California,
   64 .\" Berkeley, edmoy@violet.berkeley.edu, for the X.V10R4 xterm.
   65 .\" The X Consortium staff has since updated it for X11.
   66 .\" Updated by Thomas E. Dickey for XFree86 3.2 - XFree86 4.3, and afterward.
   67 .\"
   68 .\" Run this file through troff and use the -ms macro package.
   69 .\"
   70 .ds XT XTerm
   71 .ds xt xterm
   72 .ds LF Patch #379
   73 .ds RF 2023/02/12
   74 .\"
   75 .if n .pl 9999v     \" no page breaks in nroff
   76 .ND
   77 .\" Start a list of controls
   78 .de St
   79 .nr pD \\n[PD]
   80 .nr PD 0
   81 .nr PI 1.0i
   82 .nr VS 16
   83 .sp
   84 ..
   85 .\" End a list of controls
   86 .de Ed
   87 .nr PD \\n[pD]
   88 .nr VS 12
   89 .br
   90 ..
   91 .\" Bulleted paragraph
   92 .de bP
   93 .ie n  .IP \(bu 4
   94 .el    .IP \(bu 2
   95 ..
   96 .\" Normal leading paragraph
   97 .de lP
   98 .if n .sp
   99 .LP
  100 ..
  101 .\" Filler before ".IP" (how to pass parameters to that?)
  102 .de iP
  103 .br
  104 .if n .sp
  105 ..
  106 .\" Normal internal paragraph
  107 .de sP
  108 .br
  109 .if n .sp
  110 .if t .sp 0.5
  111 ..
  112 .\" Section header
  113 .de Sh
  114 .ds RH \\$1
  115 .iP
  116 .SH
  117 \\$1
  118 ..
  119 .\" Subsection header
  120 .de Ss
  121 .iP
  122 .if t .sp
  123 .LP
  124 .B
  125 \\$*
  126 .br
  127 ..
  128 .\" Escape single quotes in literal strings from groff's Unicode transform.
  129 .ie \n(.g .ds `` \(lq
  130 .el       .ds `` ``
  131 .ie \n(.g .ds '' \(rq
  132 .el       .ds '' ''
  133 .ds CH \" as nothing
  134 .ds LH \*(XT Control Sequences
  135 .nr s 6*\n(PS/10
  136 .ds L \s\nsBEL\s0
  137 .ds E \s\nsESC\s0
  138 .ds T \s\nsTAB\s0
  139 .ds X \s\nsETX\s0
  140 .ds N \s\nsENQ\s0
  141 .ds ET \s\nsETB\s0
  142 .ds C \s\nsCAN\s0
  143 .ds S \s\nsSUB\s0
  144 .\" space between chars
  145 .ie t .ds s \|
  146 .el .ds s " \"
  147 .nr [W \w'\*L'u
  148 .nr w \w'\*E'u
  149 .if \nw>\n([W .nr [W \nw
  150 .nr w \w'\*T'u
  151 .if \nw>\n([W .nr [W \nw
  152 .nr w \w'\*X'u
  153 .if \nw>\n([W .nr [W \nw
  154 .nr w \w'\*N'u
  155 .if \nw>\n([W .nr [W \nw
  156 .nr w \w'\*(ET'u
  157 .if \nw>\n([W .nr [W \nw
  158 .nr w \w'\*C'u
  159 .if \nw>\n([W .nr [W \nw
  160 .nr w \w'\*S'u
  161 .if \nw>\n([W .nr [W \nw
  162 .nr [W +\w'\|\|'u
  163 .de []
  164 .nr w \w'\\$2'
  165 .nr H \\n([Wu-\\nwu
  166 .nr h \\nHu/2u
  167 .\" do fancy box in troff
  168 .ie t .ds \\$1 \(br\v'-1p'\(br\v'1p'\h'\\nhu'\\$2\h'\\nHu-\\nhu'\(br\l'-\\n([Wu\(ul'\v'-1p'\(br\l'-\\n([Wu\(rn'\v'1p'\*s
  169 .el .ds \\$1 \\$2\*s
  170 ..
  171 .[] Et \v'-1p'\*X\v'1p'
  172 .[] En \v'-1p'\*N\v'1p'
  173 .[] Be \v'-1p'\*L\v'1p'
  174 .[] AP \v'-1p'\s\nsAPC\s0\v'1p'
  175 .[] Bs \v'-1p'\s\nsBS\s0\v'1p'
  176 .[] Cs \v'-1p'\s\nsCSI\s0\v'1p'
  177 .[] S2 \v'-1p'\s\nsSS2\s0\v'1p'
  178 .[] S3 \v'-1p'\s\nsSS3\s0\v'1p'
  179 .[] SS \v'-1p'\s\nsSOS\s0\v'1p'
  180 .[] Eg \v'-1p'\s\nsEPA\s0\v'1p'
  181 .[] Sg \v'-1p'\s\nsSPA\s0\v'1p'
  182 .[] Dc \v'-1p'\s\nsDCS\s0\v'1p'
  183 .[] Ht \v'-1p'\s\nsHTS\s0\v'1p'
  184 .[] Id \v'-1p'\s\nsIND\s0\v'1p'
  185 .[] Nl \v'-1p'\s\nsNEL\s0\v'1p'
  186 .[] Os \v'-1p'\s\nsOSC\s0\v'1p'
  187 .[] RI \v'-1p'\s\nsRI\s0\v'1p'
  188 .[] PM \v'-1p'\s\nsPM\s0\v'1p'
  189 .[] ST \v'-1p'\s\nsST\s0\v'1p'
  190 .[] Ta \v'-1p'\*T\v'1p'
  191 .[] Lf \v'-1p'\s\nsLF\s0\v'1p'
  192 .[] Vt \v'-1p'\s\nsVT\s0\v'1p'
  193 .[] Ff \v'-1p'\s\nsFF\s0\v'1p'
  194 .[] Np \v'-1p'\s\nsNP\s0\v'1p'
  195 .[] Cr \v'-1p'\s\nsCR\s0\v'1p'
  196 .[] So \v'-1p'\s\nsSO\s0\v'1p'
  197 .[] Sp \v'-1p'\s\nsSP\s0\v'1p'
  198 .[] Si \v'-1p'\s\nsSI\s0\v'1p'
  199 .[] Eb \v'-1p'\*(ET\v'1p'
  200 .[] Ca \v'-1p'\*C\v'1p'
  201 .[] Su \v'-1p'\*S\v'1p'
  202 .[] Es \v'-1p'\*E\v'1p'
  203 .[] Fs \v'-1p'\s\nsFS\s0\v'1p'
  204 .[] Gs \v'-1p'\s\nsGS\s0\v'1p'
  205 .[] Rs \v'-1p'\s\nsRS\s0\v'1p'
  206 .[] Us \v'-1p'\s\nsUS\s0\v'1p'
  207 .[] XX \v'-1p'\s\nsXX\s0\v'1p'
  208 .[] $ $
  209 .[] # #
  210 .[] % %
  211 .[] (( (
  212 .[] ) )
  213 .[] * *
  214 .[] + +
  215 .[] , ,
  216 .[] - \-
  217 .[] . .
  218 .[] 0 0
  219 .[] 1 1
  220 .[] 2 2
  221 .[] 3 3
  222 .[] 4 4
  223 .[] 5 5
  224 .[] 6 6
  225 .[] 7 7
  226 .[] 8 8
  227 .[] 9 9
  228 .[] : :
  229 .[] ; ;
  230 .[] = =
  231 .[] / /
  232 .[] < <
  233 .[] > >
  234 .[] ? ?
  235 .[] @ @
  236 .[] A A
  237 .[] cB B
  238 .[] C C
  239 .[] D D
  240 .[] E E
  241 .[] F F
  242 .[] G G
  243 .[] H H
  244 .[] I I
  245 .[] J J
  246 .[] K K
  247 .[] L L
  248 .[] M M
  249 .[] N N
  250 .[] O O
  251 .[] P P
  252 .[] Q Q
  253 .[] R R
  254 .[] S S
  255 .[] T T
  256 .[] V V
  257 .[] W W
  258 .[] XX X
  259 .[] Y Y
  260 .[] Z Z
  261 .[] [[ [
  262 .[] ]] ]
  263 .[] bS \\e
  264 .[] { {
  265 .[] ~ \(ti
  266 .[] Dq \(dq
  267 .[] & &
  268 .[] ^ \(ha
  269 .[] _ _
  270 .[] qu \&\(aq
  271 .[] ` \`
  272 .[] a a
  273 .[] b b
  274 .[] c c
  275 .[] d d
  276 .[] e e
  277 .[] f f
  278 .[] g g
  279 .[] h h
  280 .[] i i
  281 .[] j j
  282 .[] k k
  283 .[] l l
  284 .[] m m
  285 .[] n n
  286 .[] o o
  287 .[] p p
  288 .[] q q
  289 .[] r r
  290 .[] cs s
  291 .[] t t
  292 .[] u u
  293 .[] v v
  294 .[] w w
  295 .[] x x
  296 .[] y y
  297 .[] z z
  298 .[] | |
  299 .[] } }
  300 .[] ! !
  301 .ds Cc \fIC\fP
  302 .ds Cb \fIC\v'.3m'\h'-.2m'\s-2b\s0\v'-.3m'\fP
  303 .ds Cx \fIC\v'.3m'\h'-.2m'\s-2x\s0\v'-.3m'\fP
  304 .ds Cy \fIC\v'.3m'\h'-.2m'\s-2y\s0\v'-.3m'\fP
  305 .ds Pa \fIP\v'.3m'\h'-.2m'\s-2a\s0\v'-.3m'\fP
  306 .ds Pb \fIP\v'.3m'\h'-.2m'\s-2b\s0\v'-.3m'\fP
  307 .ds Pc \fIP\v'.3m'\h'-.2m'\s-2c\s0\v'-.3m'\fP
  308 .ds Pd \fIP\v'.3m'\h'-.2m'\s-2d\s0\v'-.3m'\fP
  309 .ds Pe \fIP\v'.3m'\h'-.2m'\s-2e\s0\v'-.3m'\fP
  310 .ds Pg \fIP\v'.3m'\h'-.2m'\s-2g\s0\v'-.3m'\fP
  311 .ds Ph \fIP\v'.3m'\h'-.2m'\s-2h\s0\v'-.3m'\fP
  312 .ds Pi \fIP\v'.3m'\h'-.2m'\s-2i\s0\v'-.3m'\fP
  313 .ds Pl \fIP\v'.3m'\h'-.2m'\s-2l\s0\v'-.3m'\fP
  314 .ds Pm \fIP\v'.3m'\h'-.2m'\s-2m\s0\v'-.3m'\fP
  315 .ds Pn \fIP\v'.3m'\h'-.2m'\s-2n\s0\v'-.3m'\fP
  316 .ds Pp \fIP\v'.3m'\h'-.2m'\s-2p\s0\v'-.3m'\fP
  317 .ds Pr \fIP\v'.3m'\h'-.2m'\s-2r\s0\v'-.3m'\fP
  318 .ds Ps \fIP\v'.3m'\h'-.2m'\s-2s\s0\v'-.3m'\fP
  319 .ds Pt \fIP\v'.3m'\h'-.2m'\s-2t\s0\v'-.3m'\fP
  320 .ds Pu \fIP\v'.3m'\h'-.2m'\s-2u\s0\v'-.3m'\fP
  321 .ds Pv \fIP\v'.3m'\h'-.2m'\s-2v\s0\v'-.3m'\fP
  322 .ds Px \fIP\v'.3m'\h'-.2m'\s-2x\s0\v'-.3m'\fP
  323 .ds Py \fIP\v'.3m'\h'-.2m'\s-2y\s0\v'-.3m'\fP
  324 .ds Ix \fIx\fP
  325 .ds Iy \fIy\fP
  326 .ds Iw \fIw\fP
  327 .ds Ih \fIh\fP
  328 .ds Ir \fIr\fP
  329 .ds Ic \fIc\fP
  330 .ie t .nr LL 6.5i
  331 .el .nr LL 72m
  332 .if n .na
  333 .TL
  334 \*(XT Control Sequences
  335 .AU
  336 Edward Moy
  337 .AI
  338 University of California, Berkeley
  339 .sp
  340 Revised by
  341 .AU
  342 Stephen Gildea
  343 .AI
  344 X Consortium (1994)
  345 .AU
  346 Thomas Dickey
  347 .AI
  348 XFree86 Project (1996-2006)
  349 invisible-island.net (2006-2023)
  350 updated for \*(XT \*(LF (\*(RF)
  351 .AU
  352 .
  353 .am BT                  \" add page numbers after first page
  354 .ds CF %
  355 ..
  356 .Sh "Definitions"
  357 .LP
  358 Many controls use parameters, shown in italics.
  359 If a control uses a single parameter, only one parameter name is listed.
  360 Some parameters (along with separating \*; characters) may be optional.
  361 Other characters in the control are required.
  362 .\".iP
  363 .IP \*(Cc
  364 A single (required) character.
  365 .\".iP
  366 .IP \*(Ps
  367 A single (usually optional) numeric parameter, composed of one or more digits.
  368 .\".iP
  369 .IP \*(Pm
  370 Any number of single numeric parameters, separated by \*; character(s).
  371 Individual values for the parameters are listed with \*(Ps .
  372 .\".iP
  373 .IP \*(Pt
  374 A text parameter composed of printable characters.
  375 .
  376 .Ss "Control Bytes, Characters, and Sequences"
  377 .LP
  378 ECMA-48 (aka \*(``ISO 6429\*('') documents C1 (8-bit) and C0 (7-bit) codes.
  379 Those are respectively codes 128 to 159 and 0 to 31.
  380 ECMA-48 avoids referring to these codes as characters,
  381 because that term is associated with \fIgraphic characters\fP.
  382 Instead, it uses \*(``bytes\*('' and \*(``codes\*('',
  383 with occasional lapses to \*(``characters\*(''
  384 where the meaning cannot be mistaken.
  385 .LP
  386 Controls (including the escape code 27) are processed once:
  387 .bP
  388 This means that a C1 control can be mistaken for badly-formed UTF-8
  389 when the terminal runs
  390 in UTF-8 mode because C1 controls are valid \fIcontinuation bytes\fP of
  391 a UTF-8 encoded (multibyte) value.
  392 .bP
  393 It is not possible to use a C1 control obtained from decoding the UTF-8 text,
  394 because that would require reprocessing the data.
  395 Consequently there is no ambiguity in the way
  396 this document uses the term \*(``character\*('' to refer to
  397 bytes in a control sequence.
  398 .LP
  399 The order of processing is a necessary consequence of the way ECMA-48
  400 is designed:
  401 .bP
  402 Each byte sent to the terminal can be unambiguously determined to
  403 fall into one of a few categories (C0, C1 and graphic characters).
  404 .bP
  405 ECMA-48 is \fImodal\fP; once it starts processing a control sequence,
  406 the terminal continues until the sequence is complete,
  407 or some byte is found which is not allowed in the sequence.
  408 .bP
  409 Intermediate, parameter and final bytes may
  410 use the same codes as graphic characters,
  411 but they are processed as part of a control sequence and are not actually
  412 graphic characters.
  413 .bP
  414 Eight-bit controls can have intermediate, etc., bytes in the range 160 to 255.
  415 Those can be treated as their counterparts in the range 32 to 127.
  416 .bP
  417 Single-byte controls can be handled separately from multi-byte
  418 control sequences because ECMA-48's rules are unambiguous.
  419 .IP
  420 As a special case, ECMA-48 (section 9) mentions that the control functions
  421 shift-in and shift-out are allowed to occur within a 7-bit multibyte control
  422 sequence because those cannot alter the meaning of the control sequence.
  423 .bP
  424 Some controls (such as \*(Os) introduce a string mode,
  425 which is ended on a \*(ST (string terminator).
  426 .IP
  427 ECMA-48 describes only correct behavior,
  428 telling what types of characters are expected
  429 at each stage of the control sequences.
  430 It says that the action taken in error recovery is implementation-dependent.
  431 \fI\*(XT\fP decodes control sequences using a state machine.
  432 It handles errors in decoding
  433 i.e., unexpected characters,
  434 by resetting to the initial (ground) state.
  435 That is different from the treatment of unimplemented
  436 (but correctly formatted) features.
  437 .IP
  438 If an application does not send the string terminator, that is also an error
  439 from the standpoint of a user.
  440 To accommodate users of those applications, \fI\*(xt\fP has resource
  441 settings which allow workarounds:
  442 .RS
  443 .bP
  444 The Linux console's palette sequences do not use a string terminator.
  445 The \fBbrokenLinuxOSC\fP resource setting tells \fI\*(xt\fP to ignore
  446 those particular sequences.
  447 .bP
  448 The terminal should accept single-byte controls within the string.
  449 But some applications omit a string terminator,
  450 like the Linux console.
  451 The \fBbrokenStringTerm\fP resource setting tells \fI\*(xt\fP to exit
  452 string mode if it decodes a common control character such as carriage return
  453 before the string terminator.
  454 .RE
  455 .
  456 .Ss "C1 (8-Bit) Control Characters"
  457 .LP
  458 The \fI\*(xt\fP program recognizes both 8-bit and 7-bit control characters.
  459 It generates 7-bit controls (by default) or 8-bit if S8C1T is enabled.
  460 The following pairs of 7-bit and 8-bit control characters are equivalent:
  461 .St
  462 .IP \\*(Es\\*D
  463 Index (\*(Id is 0x84).
  464 .iP
  465 .IP \\*(Es\\*E
  466 Next Line (\*(Nl is 0x85).
  467 .iP
  468 .IP \\*(Es\\*H
  469 Tab Set (\*(Ht is 0x88).
  470 .iP
  471 .IP \\*(Es\\*M
  472 Reverse Index (\*(RI is 0x8d).
  473 .iP
  474 .IP \\*(Es\\*N
  475 Single Shift Select of G2 Character Set (\*(S2 is 0x8e), VT220.
  476 This affects next character only.
  477 .iP
  478 .IP \\*(Es\\*O
  479 Single Shift Select of G3 Character Set (\*(S3 is 0x8f), VT220.
  480 This affects next character only.
  481 .iP
  482 .IP \\*(Es\\*P
  483 Device Control String (\*(Dc is 0x90).
  484 .iP
  485 .IP \\*(Es\\*V
  486 Start of Guarded Area (\*(Sg is 0x96).
  487 .iP
  488 .IP \\*(Es\\*W
  489 End of Guarded Area (\*(Eg is 0x97).
  490 .iP
  491 .IP \\*(Es\\*(XX
  492 Start of String (\*(SS is 0x98).
  493 .iP
  494 .IP \\*(Es\\*Z
  495 Return Terminal ID (DECID is 0x9a).
  496 Obsolete form of \*(Cs\*c (DA).
  497 .iP
  498 .IP \\*(Es\\*([[
  499 Control Sequence Introducer (\*(Cs is 0x9b).
  500 .iP
  501 .IP \\*(Es\\*(bS
  502 String Terminator (\*(ST is 0x9c).
  503 .iP
  504 .IP \\*(Es\\*(]]
  505 Operating System Command (\*(Os is 0x9d).
  506 .iP
  507 .IP \\*(Es\\*^
  508 Privacy Message (\*(PM is 0x9e).
  509 .iP
  510 .IP \\*(Es\\*_
  511 Application Program Command (\*(AP is 0x9f).
  512 .Ed
  513 .sp
  514 .LP
  515 These control characters are used in the vtXXX emulation.
  516 .
  517 .Ss "VT100-related terminals"
  518 .LP
  519 In this document, \*(``VT100\*('' refers not only to VT100/VT102,
  520 but also to the succession of upward-compatible terminals produced
  521 by DEC (Digital Equipment Corporation)
  522 from the mid-1970s for about twenty years.
  523 For brevity, the document refers to the related models:
  524   \*(``VT200\*('' as VT220/VT240,
  525   \*(``VT300\*('' as VT320/VT340,
  526   \*(``VT400\*('' as VT420, and
  527   \*(``VT500\*('' as VT510/VT520/VT525.
  528 .LP
  529 Most of these control sequences are standard VT102 control sequences,
  530 but there is support for later DEC VT terminals
  531 (i.e., VT220, VT320, VT420, VT510),
  532 as well as ECMA-48 and \fIaixterm\fP color controls.
  533 The only VT102 feature not supported is auto-repeat,
  534 since the only way X provides for this will affect all windows.
  535 .LP
  536 There are additional control sequences to provide
  537 \fI\*(xt-\fPdependent functions, such as the scrollbar or window size.
  538 Where the function is specified by DEC or ECMA-48, the mnemonic assigned
  539 to it is given in parentheses.
  540 .LP
  541 The escape codes to designate and invoke
  542 character sets are specified by ISO 2022 (see that document for a
  543 discussion of character sets).
  544 .LP
  545 Many of the features are optional;
  546 \fI\*(xt\fP can be configured and built without support for them.
  547 .
  548 .Sh "VT100 Mode"
  549 .Ss Single-character functions
  550 .St
  551 .IP \\*(Be
  552 Bell (\*(Be is Ctrl-G).
  553 .
  554 .iP
  555 .IP \\*(Bs
  556 Backspace (\*(Bs is Ctrl-H).
  557 .
  558 .iP
  559 .IP \\*(Cr
  560 Carriage Return (\*(Cr is Ctrl-M).
  561 .
  562 .iP
  563 .IP \\*(En
  564 Return Terminal Status (\*(En is Ctrl-E).
  565 Default response is an empty string, but may be overridden
  566 by a resource \fBanswerbackString\fP.
  567 .
  568 .iP
  569 .IP \\*(Ff
  570 Form Feed or New Page (\*(Np).
  571 (\*(Ff is Ctrl-L).
  572 \*(Ff is treated the same as \*(Lf.
  573 .
  574 .iP
  575 .IP \\*(Lf
  576 Line Feed or New Line (NL).
  577 (\*(Lf is Ctrl-J).
  578 .
  579 .iP
  580 .IP \\*(Si
  581 Switch to \fIStandard Character Set\fP (Ctrl-O is Shift In or LS0).
  582 This invokes the G0 character set (the default) as GL.
  583 .br
  584 VT200 and up implement LS0.
  585 .
  586 .iP
  587 .IP \\*(So
  588 Switch to \fIAlternate Character Set\fP (Ctrl-N is Shift Out or LS1).
  589 This invokes the G1 character set as GL.
  590 .br
  591 VT200 and up implement LS1.
  592 .
  593 .iP
  594 .IP \\*(Sp
  595 Space.
  596 .
  597 .iP
  598 .IP \\*(Ta
  599 Horizontal Tab (\*(Ht is Ctrl-I).
  600 .
  601 .iP
  602 .IP \\*(Vt
  603 Vertical Tab (\*(Vt is Ctrl-K).
  604 This is treated the same as LF.
  605 .Ed
  606 .
  607 .Ss Controls beginning with \*(Es
  608 .LP
  609 This excludes controls where \*(Es is part of a 7-bit
  610 equivalent to 8-bit C1 controls, ordered by the final character(s).
  611 .St
  612 .IP \\*(Es\\*(Sp\\*F
  613 7-bit controls (S7C1T), VT220.
  614 This tells the terminal to send C1 control characters as 7-bit sequences,
  615 e.g., its responses to queries.
  616 DEC VT200 and up always accept 8-bit control sequences except when
  617 configured for VT100 mode.
  618 .
  619 .iP
  620 .IP \\*(Es\\*(Sp\\*G
  621 8-bit controls (S8C1T), VT220.
  622 This tells the terminal to send C1 control characters as 8-bit sequences,
  623 e.g., its responses to queries.
  624 DEC VT200 and up always accept 8-bit control sequences except when
  625 configured for VT100 mode.
  626 .
  627 .iP
  628 .IP \\*(Es\\*(Sp\\*L
  629 Set ANSI conformance level 1, ECMA-43.
  630 .
  631 .iP
  632 .IP \\*(Es\\*(Sp\\*M
  633 Set ANSI conformance level 2, ECMA-43.
  634 .
  635 .iP
  636 .IP \\*(Es\\*(Sp\\*N
  637 Set ANSI conformance level 3, ECMA-43.
  638 .
  639 .iP
  640 .IP \\*(Es\\*#\\*3
  641 DEC double-height line, top half (DECDHL), VT100.
  642 .
  643 .iP
  644 .IP \\*(Es\\*#\\*4
  645 DEC double-height line, bottom half (DECDHL), VT100.
  646 .
  647 .iP
  648 .IP \\*(Es\\*#\\*5
  649 DEC single-width line (DECSWL), VT100.
  650 .
  651 .iP
  652 .IP \\*(Es\\*#\\*6
  653 DEC double-width line (DECDWL), VT100.
  654 .
  655 .iP
  656 .IP \\*(Es\\*#\\*8
  657 DEC Screen Alignment Test (DECALN), VT100.
  658 .
  659 .iP
  660 .IP \\*(Es\\*%\\*@
  661 Select default character set.
  662 That is ISO 8859-1 (ISO 2022).
  663 .
  664 .iP
  665 .IP \\*(Es\\*%\\*G
  666 Select UTF-8 character set, ISO 2022.
  667 .
  668 .iP
  669 .IP \\*(Es\\*(((\\*(Cc
  670 Designate G0 Character Set, VT100, ISO 2022.
  671 .br
  672 Final character \*(Cc for designating 94-character sets.
  673 In this list,
  674 .RS
  675 .bP
  676 \*0, \*A and \*(cB were introduced in the VT100,
  677 .bP
  678 most were introduced in the VT200 series,
  679 .bP
  680 a few were introduced in the VT300 series, and
  681 .bP
  682 a few more were introduced in the VT500 series.
  683 .RE
  684 .br
  685 The VT220 character sets,
  686 together with a few others (such as Portuguese) are activated by
  687 the National Replacement Character Set (NRCS) controls.
  688 The term \*(``replacement\*('' says that the character set is formed
  689 by replacing some of the characters in a set
  690 (termed the \fIMultinational Character Set\fP)
  691 with more useful ones for a given language.
  692 The ASCII and DEC Supplemental character sets make up the two
  693 halves of the Multinational Character set,
  694 initially mapped to GL and GR.
  695 .br
  696 The valid final characters \*(Cc for this control are:
  697   \*(Cc = \*A \(-> United Kingdom (UK), VT100.
  698   \*(Cc = \*(cB \(-> United States (USASCII), VT100.
  699   \*(Cc = \*C or \*5 \(-> Finnish, VT200.
  700   \*(Cc = \*H or \*7 \(-> Swedish, VT200.
  701   \*(Cc = \*K \(-> German, VT200.
  702   \*(Cc = \*Q or \*9 \(-> French Canadian, VT200.
  703   \*(Cc = \*R or \*f \(-> French, VT200.
  704   \*(Cc = \*Y \(-> Italian, VT200.
  705   \*(Cc = \*Z \(-> Spanish, VT200.
  706   \*(Cc = \*4 \(-> Dutch, VT200.
  707   \*(Cc = \*(Dq\*> \(-> Greek, VT500.
  708   \*(Cc = \*%\*2 \(-> Turkish, VT500.
  709   \*(Cc = \*%\*6 \(-> Portuguese, VT300.
  710   \*(Cc = \*%\*= \(-> Hebrew, VT500.
  711   \*(Cc = \*= \(-> Swiss, VT200.
  712   \*(Cc = \*`, \*E or \*6 \(-> Norwegian/Danish, VT200.
  713 .br
  714 The final character \*A is a special case,
  715 since the same final character is
  716 used by the VT300-control for the 96-character British Latin-1.
  717 .br
  718 There are a few other 94-character sets:
  719   \*(Cc = \*0 \(-> DEC Special Character and Line Drawing Set, VT100.
  720   \*(Cc = \*< \(-> DEC Supplemental, VT200.
  721   \*(Cc = \*> \(-> DEC Technical, VT300.
  722 .br
  723 These are documented as 94-character sets (like USASCII) without NRCS:
  724   \*(Cc = \*(Dq\*4 \(-> DEC Hebrew, VT500.
  725   \*(Cc = \*(Dq\*? \(-> DEC Greek, VT500.
  726   \*(Cc = \*%\*0 \(-> DEC Turkish, VT500.
  727   \*(Cc = \*%\*5 \(-> DEC Supplemental Graphics, VT300.
  728   \*(Cc = \*&\*4 \(-> DEC Cyrillic, VT500.
  729 .br
  730 The VT520 reference manual lists a few more,
  731 but no documentation has been found for the mappings:
  732   \*(Cc = \*%\*3 \(-> SCS NRCS, VT500.
  733   \*(Cc = \*&\*5 \(-> DEC Russian, VT500.
  734 .iP
  735 .IP \\*(Es\\*)\\*(Cc
  736 Designate G1 Character Set, ISO 2022, VT100.
  737 .br
  738 The same character sets apply as for \*(Es\*(((\*(Cc.
  739 .
  740 .iP
  741 .IP \\*(Es\\**\\*(Cc
  742 Designate G2 Character Set, ISO 2022, VT220.
  743 .br
  744 The same character sets apply as for \*(Es\*(((\*(Cc.
  745 .
  746 .iP
  747 .IP \\*(Es\\*+\\*(Cc
  748 Designate G3 Character Set, ISO 2022, VT220.
  749 .br
  750 The same character sets apply as for \*(Es\*(((\*(Cc.
  751 .
  752 .iP
  753 .IP \\*(Es\\*-\\*(Cc
  754 Designate G1 Character Set, VT300.
  755 .br
  756 These controls apply only to 96-character sets.
  757 Unlike the 94-character sets, these can have different values than
  758 ASCII space and DEL for the mapping of 0x20 and 0x7f.
  759 The valid final characters \*(Cc for this control are:
  760   \*(Cc = \*A \(-> ISO Latin-1 Supplemental, VT300.
  761   \*(Cc = \*(cB \(-> ISO Latin-2 Supplemental, VT500.
  762   \*(Cc = \*F \(-> ISO Greek Supplemental, VT500.
  763   \*(Cc = \*H \(-> ISO Hebrew Supplemental, VT500.
  764   \*(Cc = \*L \(-> ISO Latin-Cyrillic, VT500.
  765   \*(Cc = \*M \(-> ISO Latin-5 Supplemental, VT500.
  766 .
  767 .iP
  768 .IP \\*(Es\\*.\\*(Cc
  769 Designate G2 Character Set, VT300.
  770 .br
  771 The same character sets apply as for \*(Es\*-\*(Cc.
  772 .
  773 .iP
  774 .IP \\*(Es\\*/\\*(Cc
  775 Designate G3 Character Set, VT300.
  776 .br
  777 The same character sets apply as for \*(Es\*-\*(Cc.
  778 .
  779 .iP
  780 .IP \\*(Es\\*6
  781 Back Index (DECBI), VT420 and up.
  782 .
  783 .iP
  784 .IP \\*(Es\\*7
  785 Save Cursor (DECSC), VT100.
  786 .
  787 .iP
  788 .IP \\*(Es\\*8
  789 Restore Cursor (DECRC), VT100.
  790 .
  791 .iP
  792 .IP \\*(Es\\*9
  793 Forward Index (DECFI), VT420 and up.
  794 .
  795 .iP
  796 .IP \\*(Es\\*=
  797 Application Keypad (DECKPAM).
  798 .
  799 .iP
  800 .IP \\*(Es\\*>
  801 Normal Keypad (DECKPNM), VT100.
  802 .
  803 .iP
  804 .IP \\*(Es\\*F
  805 Cursor to lower left corner of screen.
  806 This is enabled by the \fBhpLowerleftBugCompat\fP resource.
  807 .
  808 .iP
  809 .IP \\*(Es\\*c
  810 Full Reset (RIS), VT100.
  811 .
  812 .iP
  813 .IP \\*(Es\\*l
  814 Memory Lock (per HP terminals).
  815 Locks memory above the cursor.
  816 .
  817 .iP
  818 .IP \\*(Es\\*m
  819 Memory Unlock (per HP terminals).
  820 .
  821 .iP
  822 .IP \\*(Es\\*n
  823 Invoke the G2 Character Set as GL (LS2).
  824 .
  825 .iP
  826 .IP \\*(Es\\*o
  827 Invoke the G3 Character Set as GL (LS3).
  828 .
  829 .iP
  830 .IP \\*(Es\\*|
  831 Invoke the G3 Character Set as GR (LS3R).
  832 .
  833 .iP
  834 .IP \\*(Es\\*}
  835 Invoke the G2 Character Set as GR (LS2R).
  836 .
  837 .iP
  838 .IP \\*(Es\\*~
  839 Invoke the G1 Character Set as GR (LS1R), VT100.
  840 .Ed
  841 .
  842 .Ss Application Program-Command functions
  843 .St
  844 .IP \\*(AP\\*(Pt\\*s\\*(ST
  845 None.
  846 \fI\*(xt\fP implements no \*(AP functions; \*(Pt is ignored.
  847 \*(Pt need not be printable characters.
  848 .Ed
  849 .\"
  850 .Ss Device-Control functions
  851 .St
  852 .IP \\*(Dc\\*(Ps\\*s\\*;\\*(Ps\\*s\\*|\\*(Pt\\*s\\*(ST
  853 User-Defined Keys (DECUDK), VT220 and up.
  854 .iP
  855 The first parameter:
  856   \*(Ps = \*0 \(-> Clear all UDK definitions before starting (default).
  857   \*(Ps = \*1 \(-> Erase Below (default).
  858 .iP
  859 The second parameter:
  860   \*(Ps = \*0 \(<- Lock the keys (default).
  861   \*(Ps = \*1 \(<- Do not lock.
  862 .iP
  863 The third parameter is a \*(``;\*(''-separated list of strings denoting
  864 the key-code separated by a \*(``/\*('' from the hex-encoded key value.
  865 The key codes correspond to the DEC function-key codes (e.g., F6=17).
  866 .
  867 .iP
  868 .IP \\*(Dc\\*$\\*q\\*(Pt\\*s\\*(ST
  869 Request Status String (DECRQSS), VT420 and up.
  870 .br
  871 The string following the \*(``q\*('' is one of the following:
  872   \*m       \(-> SGR
  873   \*(Dq\*p  \(-> DECSCL
  874   \*(Sp\*q  \(-> DECSCUSR
  875   \*(Dq\*q  \(-> DECSCA
  876   \*r       \(-> DECSTBM
  877   \*(cs     \(-> DECSLRM
  878   \*t       \(-> DECSLPP
  879   \*$\*|    \(-> DECSCPP
  880   \*$\*}    \(-> DECSASD
  881   \*$\*~    \(-> DECSSDT
  882   \**\*|    \(-> DECSNLS
  883 .br
  884 \fI\*(xt\fP responds with
  885 \*(Dc\*1\*$\*r\*(Pt\*s\*(ST
  886 for valid requests, replacing the \*(Pt with the corresponding \*(Cs
  887 string,
  888 or
  889 \*(Dc\*0\*$\*r\*s\*(ST
  890 for invalid requests.
  891 .iP
  892 .IP \\*(Dc\\*(Ps\\*s\\*$\\*t\\*(Pt\\*s\\*(ST
  893 Restore presentation status (DECRSPS), VT320 and up.
  894 The control can be converted from a response from DECCIR or DECTABSR
  895 by changing the first \*(``u\*('' to a \*(``t\*(''
  896   \*(Ps = \*1 \(-> DECCIR
  897   \*(Ps = \*2 \(-> DECTABSR
  898 .
  899 .iP
  900 .IP \\*(Dc\\*+\\*Q\\*(Pt\\*s\\*(ST
  901 Request resource values (XTGETXRES), \fI\*(xt\fP.
  902 The string following the \*(``Q\*('' is a list of names
  903 encoded in hexadecimal (2 digits per character)
  904 separated by \*;
  905 which correspond to \fI\*(xt\fP resource names.
  906 .sP
  907 \fI\*(xt\fP responds with
  908 .br
  909 \*(Dc\*1\*+\*R\*(Pt\*s\*(ST
  910 for valid requests, adding to \*(Pt an \*=,
  911 and the value of the corresponding \fI\*(xt\fP resource,
  912 or
  913 .br
  914 \*(Dc\*0\*+\*R\*(Pt\*s\*(ST
  915 for invalid requests.
  916 .br
  917 The strings are encoded in hexadecimal (2 digits per character).
  918 .sP
  919 Only boolean, numeric and string resources for the VT100 widget
  920 are supported by this query.
  921 \fI\*(XT\fP evaluates resources at startup time.
  922 Several of \fI\*(xt\fP's state variables
  923 use resources to determine their initial value.
  924 Because the resource variable may not reflect the current state,
  925 \fI\*(xt\fP provides control sequences for querying the state directly:
  926 .RS
  927 .iP
  928 .bP
  929 XTQALLOWED
  930 .bP
  931 XTQMODKEYS
  932 .RE
  933 .Ed
  934 .
  935 .iP
  936 .IP \\*(Dc\\*+\\*p\\*(Pt\\*s\\*(ST
  937 Set Termcap/Terminfo Data (XTSETTCAP), \fI\*(xt\fP.
  938 The string following the \*(``p\*('' is encoded in hexadecimal.
  939 After decoding it, \fI\*(xt\fP will use the name to
  940 retrieve data from the terminal database.
  941 If successful, that overrides the \fBtermName\fP resource when
  942 handling the \*(``tcap\*('' keyboard
  943 configuration's function- and special-keys, as well as by the
  944 Request Termcap/Terminfo String control.
  945 .
  946 .iP
  947 .IP \\*(Dc\\*+\\*q\\*(Pt\\*s\\*(ST
  948 Request Termcap/Terminfo String (XTGETTCAP), \fI\*(xt\fP.
  949 The string following the \*(``q\*('' is a list of names
  950 encoded in hexadecimal (2 digits per character)
  951 separated by \*;
  952 which correspond to termcap or terminfo key names.
  953 .br
  954 A few special features are also recognized, which are not key names:
  955 .RS
  956 .bP
  957 \fICo\fP for termcap colors (or \fIcolors\fP for terminfo colors),
  958 and
  959 .bP
  960 \fITN\fP for termcap name (or \fIname\fP for terminfo name).
  961 .bP
  962 \fIRGB\fP for the ncurses direct-color extension.
  963 .br
  964 Only a terminfo name is provided,
  965 since termcap applications cannot use this information.
  966 .RE
  967 .sP
  968 \fI\*(xt\fP responds with
  969 .br
  970 \*(Dc\*1\*+\*r\*(Pt\*s\*(ST
  971 for valid requests, adding to \*(Pt an \*=,
  972 and the value of the corresponding string that \fI\*(xt\fP would send,
  973 or
  974 .br
  975 \*(Dc\*0\*+\*r\*(ST
  976 for invalid requests.
  977 .br
  978 The strings are encoded in hexadecimal (2 digits per character).
  979 If more than one name is given, \fI\*(xt\fP replies with each
  980 name/value pair in the same response.
  981 An invalid name (one not found in \fI\*(xt\fP's tables)
  982 ends processing of the list of names.
  983 .Ed
  984 .\"
  985 .Ss Functions using \*(Cs, ordered by the final character(s)
  986 .St
  987 .IP \\*(Cs\\*(Ps\\*s\\*@
  988 Insert \*(Ps (Blank) Character(s) (default = 1) (ICH).
  989 .
  990 .iP
  991 .IP \\*(Cs\\*(Ps\\*s\\*(Sp\\*@
  992 Shift left \*(Ps columns(s) (default = 1) (SL), ECMA-48.
  993 .
  994 .iP
  995 .IP \\*(Cs\\*(Ps\\*s\\*A
  996 Cursor Up \*(Ps Times (default = 1) (CUU).
  997 .
  998 .iP
  999 .IP \\*(Cs\\*(Ps\\*s\\*(Sp\\*A
 1000 Shift right \*(Ps columns(s) (default = 1) (SR), ECMA-48.
 1001 .
 1002 .iP
 1003 .IP \\*(Cs\\*(Ps\\*s\\*(cB
 1004 Cursor Down \*(Ps Times (default = 1) (CUD).
 1005 .
 1006 .iP
 1007 .IP \\*(Cs\\*(Ps\\*s\\*C
 1008 Cursor Forward \*(Ps Times (default = 1) (CUF).
 1009 .
 1010 .iP
 1011 .IP \\*(Cs\\*(Ps\\*s\\*D
 1012 Cursor Backward \*(Ps Times (default = 1) (CUB).
 1013 .
 1014 .iP
 1015 .IP \\*(Cs\\*(Ps\\*s\\*E
 1016 Cursor Next Line \*(Ps Times (default = 1) (CNL).
 1017 .
 1018 .iP
 1019 .IP \\*(Cs\\*(Ps\\*s\\*F
 1020 Cursor Preceding Line \*(Ps Times (default = 1) (CPL).
 1021 .
 1022 .iP
 1023 .IP \\*(Cs\\*(Ps\\*s\\*G
 1024 Cursor Character Absolute  [column] (default = [row,1]) (CHA).
 1025 .
 1026 .iP
 1027 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*H
 1028 Cursor Position [row;column] (default = [1,1]) (CUP).
 1029 .
 1030 .iP
 1031 .IP \\*(Cs\\*(Ps\\*s\\*I
 1032 Cursor Forward Tabulation \*(Ps tab stops (default = 1) (CHT).
 1033 .
 1034 .iP
 1035 .IP \\*(Cs\\*(Ps\\*s\\*J
 1036 Erase in Display (ED), VT100.
 1037   \*(Ps = \*0 \(-> Erase Below (default).
 1038   \*(Ps = \*1 \(-> Erase Above.
 1039   \*(Ps = \*2 \(-> Erase All.
 1040   \*(Ps = \*3 \(-> Erase Saved Lines, \fI\*(xt\fP.
 1041 .
 1042 .iP
 1043 .IP \\*(Cs\\*?\\*(Ps\\*s\\*J
 1044 Erase in Display (DECSED), VT220.
 1045   \*(Ps = \*0 \(-> Selective Erase Below (default).
 1046   \*(Ps = \*1 \(-> Selective Erase Above.
 1047   \*(Ps = \*2 \(-> Selective Erase All.
 1048   \*(Ps = \*3 \(-> Selective Erase Saved Lines, \fI\*(xt\fP.
 1049 .
 1050 .iP
 1051 .IP \\*(Cs\\*(Ps\\*s\\*K
 1052 Erase in Line (EL), VT100.
 1053   \*(Ps = \*0 \(-> Erase to Right (default).
 1054   \*(Ps = \*1 \(-> Erase to Left.
 1055   \*(Ps = \*2 \(-> Erase All.
 1056 .
 1057 .iP
 1058 .IP \\*(Cs\\*?\\*(Ps\\*s\\*K
 1059 Erase in Line (DECSEL), VT220.
 1060   \*(Ps = \*0 \(-> Selective Erase to Right (default).
 1061   \*(Ps = \*1 \(-> Selective Erase to Left.
 1062   \*(Ps = \*2 \(-> Selective Erase All.
 1063 .
 1064 .iP
 1065 .IP \\*(Cs\\*(Ps\\*s\\*L
 1066 Insert \*(Ps Line(s) (default = 1) (IL).
 1067 .
 1068 .iP
 1069 .IP \\*(Cs\\*(Ps\\*s\\*M
 1070 Delete \*(Ps Line(s) (default = 1) (DL).
 1071 .
 1072 .iP
 1073 .IP \\*(Cs\\*(Ps\\*s\\*P
 1074 Delete \*(Ps Character(s) (default = 1) (DCH).
 1075 .
 1076 .iP
 1077 .IP \\*(Cs\\*#\\*P
 1078 .IP \\*(Cs\\*(Pm\\*s\\*#\\*P
 1079 Push current dynamic- and ANSI-palette colors onto stack
 1080 (XTPUSHCOLORS), \fI\*(xt\fP.
 1081 Parameters (integers in the range 1 through 10, since the default 0 will push)
 1082 may be used to store the palette into the stack without pushing.
 1083 .
 1084 .iP
 1085 .IP \\*(Cs\\*#\\*Q
 1086 .IP \\*(Cs\\*(Pm\\*s\\*#\\*Q
 1087 Pop stack to set dynamic- and ANSI-palette colors
 1088 (XTPOPCOLORS), \fI\*(xt\fP.
 1089 Parameters (integers in the range 1 through 10, since the default 0 will pop)
 1090 may be used to restore the palette from the stack without popping.
 1091 .
 1092 .iP
 1093 .IP \\*(Cs\\*#\\*R
 1094 Report the current entry on the palette stack, and the number of
 1095 palettes stored on the stack, using the same form as XTPOPCOLOR
 1096 (default = 0)
 1097 (XTREPORTCOLORS), \fI\*(xt\fP.
 1098 .
 1099 .iP
 1100 .IP \\*(Cs\\*(Ps\\*s\\*S
 1101 Scroll up \*(Ps lines (default = 1) (SU), VT420, ECMA-48.
 1102 .
 1103 .iP
 1104 .IP \\*(Cs\\*?\\*(Pi\\*s\\*;\\*(Pa\\*s\\*;\\*(Pv\\*s\\*S
 1105 Set or request graphics attribute (XTSMGRAPHICS), \fI\*(xt\fP.
 1106 If configured to support either \fBSixel Graphics\fP or \fBReGIS Graphics\fP,
 1107 \fI\*(xt\fP accepts a three-parameter control sequence, where \*(Pi,
 1108 \*(Pa and \*(Pv are the \fIitem\fP, \fIaction\fP and \fIvalue\fP:
 1109 .sP
 1110   \*(Pi = \*1 \(-> item is number of color registers.
 1111   \*(Pi = \*2 \(-> item is Sixel graphics geometry (in pixels).
 1112   \*(Pi = \*3 \(-> item is ReGIS graphics geometry (in pixels).
 1113 .sP
 1114   \*(Pa = \*1 \(-> read attribute.
 1115   \*(Pa = \*2 \(-> reset to default.
 1116   \*(Pa = \*3 \(-> set to value in \*(Pv.
 1117   \*(Pa = \*4 \(-> read the maximum allowed value.
 1118 .sP
 1119   \*(Pv is ignored by \fI\*(xt\fP except when setting (\*(Pa == \*3).
 1120   \*(Pv = \fIn\fP \(<- A single integer is used for color registers.
 1121   \*(Pv = \fIwidth\fP\*s\*;\fIheight\fP \(<- Two integers for graphics geometry.
 1122 .sP
 1123 \fI\*(xt\fP replies with a control sequence of the same form:
 1124 .ID
 1125 \*(Cs\*?\*(Pi\*s\*;\*(Ps\*s\*;\*(Pv\*s\*S
 1126 .DE
 1127 where \*(Ps is the status:
 1128   \*(Ps = \*0 \(<- success.
 1129   \*(Ps = \*1 \(<- error in \*(Pi.
 1130   \*(Ps = \*2 \(<- error in \*(Pa.
 1131   \*(Ps = \*3 \(<- failure.
 1132 .sP
 1133 On success, \*(Pv represents the value read or set.
 1134 .sP
 1135 \fBNotes\fP:
 1136 .RS
 1137 .bP
 1138 The current implementation allows reading the graphics sizes,
 1139 but disallows modifying those sizes because that is done once,
 1140 using resource-values.
 1141 .bP
 1142 Graphics geometry is not necessarily the same as \*(``window size\*(''
 1143 (see the \fBdtterm\fP window manipulation extensions).
 1144 \fI\*(XT\fP limits the maximum graphics geometry
 1145 according to the \fBmaxGraphicSize\fP resource.
 1146 .IP
 1147 The \fBmaxGraphicSize\fP resource can be
 1148 either an explicit \fIheight\fPx\fIwidth\fP
 1149 (default: 1000x1000 as of version 328)
 1150 or the word \*(``auto\*(''
 1151 (telling \fI\*(XT\fP to use limits
 1152 the \fBdecGraphicsID\fP
 1153 or \fBdecTerminalID\fP resource to determine the limits).
 1154 .bP
 1155 \fI\*(XT\fP uses the minimum of the window size and the graphic size
 1156 to obtain the maximum geometry.
 1157 .bP
 1158 While resizing a window will always change the current
 1159 graphics geometry, the reverse is not true.
 1160 Setting graphics geometry does not affect the window size.
 1161 .bP
 1162 If \fI\*(xt\fP is able to support graphics (compile-time),
 1163 but is not configured (runtime) for graphics,
 1164 these responses will indicate a failure.
 1165 Other implementations which do not use the maximum graphics dimensions
 1166 but are configured for graphics
 1167 should report zeroes for the maximum geometry
 1168 rather than a failure.
 1169 .RE
 1170 .
 1171 .iP
 1172 .IP \\*(Cs\\*(Ps\\*s\\*T
 1173 Scroll down \*(Ps lines (default = 1) (SD), VT420.
 1174 .
 1175 .iP
 1176 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*T
 1177 Initiate highlight mouse tracking (XTHIMOUSE), \*(xt.
 1178 Parameters are [func;startx;starty;firstrow;lastrow].
 1179 See the section \fBMouse Tracking\fP.
 1180 .
 1181 .iP
 1182 .IP \\*(Cs\\*>\\*(Pm\\*s\\*T
 1183 Reset title mode features to default value (XTRMTITLE), \fI\*(xt\fP.
 1184 Normally, \*(``reset\*('' disables the feature.
 1185 It is possible to disable the ability to reset features
 1186 by compiling a different default for the title modes into \fI\*(xt\fP.
 1187 .iP
 1188   \*(Ps = \*0 \(-> Do not set window/icon labels using hexadecimal.
 1189   \*(Ps = \*1 \(-> Do not query window/icon labels using hexadecimal.
 1190   \*(Ps = \*2 \(-> Do not set window/icon labels using UTF-8.
 1191   \*(Ps = \*3 \(-> Do not query window/icon labels using UTF-8.
 1192 .iP
 1193 (See discussion of \fBTitle Modes\fP).
 1194 .
 1195 .iP
 1196 .IP \\*(Cs\\*(Ps\\*s\\*(XX
 1197 Erase \*(Ps Character(s) (default = 1) (ECH).
 1198 .
 1199 .iP
 1200 .IP \\*(Cs\\*(Ps\\*s\\*Z
 1201 Cursor Backward Tabulation \*(Ps tab stops (default = 1) (CBT).
 1202 .
 1203 .iP
 1204 .IP \\*(Cs\\*(Ps\\*s\\*^
 1205 Scroll down \*(Ps lines (default = 1) (SD), ECMA-48.
 1206 .br
 1207 This was a publication error in the original ECMA-48 5th edition (1991)
 1208 corrected in 2003.
 1209 .
 1210 .iP
 1211 .IP \\*(Cs\\*(Ps\\*s\\*`
 1212 Character Position Absolute  [column] (default = [row,1]) (HPA).
 1213 .
 1214 .iP
 1215 .IP \\*(Cs\\*(Ps\\*s\\*a
 1216 Character Position Relative  [columns] (default = [row,col+1]) (HPR).
 1217 .
 1218 .iP
 1219 .IP \\*(Cs\\*(Ps\\*s\\*b
 1220 Repeat the preceding graphic character \*(Ps times (REP).
 1221 .
 1222 .iP
 1223 .IP \\*(Cs\\*(Ps\\*s\\*c
 1224 Send Device Attributes (Primary DA).
 1225   \*(Ps = \*0 or omitted \(-> request attributes from terminal.
 1226 The response depends on the \fBdecTerminalID\fP resource setting.
 1227   \(->\ \*(Cs\*?\*1\*;\*2\*c (\*(``VT100 with Advanced Video Option\*('')
 1228   \(->\ \*(Cs\*?\*1\*;\*0\*c (\*(``VT101 with No Options\*('')
 1229   \(->\ \*(Cs\*?\*4\*;\*6\*c (\*(``VT132 with Advanced Video and Graphics\*('')
 1230   \(->\ \*(Cs\*?\*6\*c (\*(``VT102\*('')
 1231   \(->\ \*(Cs\*?\*7\*c (\*(``VT131\*('')
 1232   \(->\ \*(Cs\*?\*1\*2\*;\*(Ps\*s\*c (\*(``VT125\*('')
 1233   \(->\ \*(Cs\*?\*6\*2\*;\*(Ps\*s\*c (\*(``VT220\*('')
 1234   \(->\ \*(Cs\*?\*6\*3\*;\*(Ps\*s\*c (\*(``VT320\*('')
 1235   \(->\ \*(Cs\*?\*6\*4\*;\*(Ps\*s\*c (\*(``VT420\*('')
 1236 .iP
 1237 The VT100-style response parameters do not mean anything by themselves.
 1238 VT220 (and higher) parameters do,
 1239 telling the host what features the terminal supports:
 1240   \*(Ps = \*1 \(-> 132-columns.
 1241   \*(Ps = \*2 \(-> Printer.
 1242   \*(Ps = \*3 \(-> ReGIS graphics.
 1243   \*(Ps = \*4 \(-> Sixel graphics.
 1244   \*(Ps = \*6 \(-> Selective erase.
 1245   \*(Ps = \*8 \(-> User-defined keys.
 1246   \*(Ps = \*9 \(-> National Replacement Character sets.
 1247   \*(Ps = \*1\*5 \(-> Technical characters.
 1248   \*(Ps = \*1\*6 \(-> Locator port.
 1249   \*(Ps = \*1\*7 \(-> Terminal state interrogation.
 1250   \*(Ps = \*1\*8 \(-> User windows.
 1251   \*(Ps = \*2\*1 \(-> Horizontal scrolling.
 1252   \*(Ps = \*2\*2 \(-> ANSI color, e.g., VT525.
 1253   \*(Ps = \*2\*8 \(-> Rectangular editing.
 1254   \*(Ps = \*2\*9 \(-> ANSI text locator (i.e., DEC Locator mode).
 1255 .iP
 1256 \fI\*(XT\fP supports part of the \fIUser windows\fP feature,
 1257 providing a single page (which corresponds to its visible window).
 1258 Rather than resizing the font to change the number of lines/columns in
 1259 a fixed-size display, \fI\*(xt\fP uses the window extension controls
 1260 (DECSNLS, DECSCPP, DECSLPP) to adjust its visible window's size.
 1261 The \*(``cursor coupling\*('' controls (DECHCCM, DECPCCM, DECVCCM) are ignored.
 1262 .
 1263 .iP
 1264 .IP \\*(Cs\\*=\\*(Ps\\*s\\*c
 1265 Send Device Attributes (Tertiary DA).
 1266   \*(Ps = \*0 \(-> report Terminal Unit ID (default), VT400.
 1267 \*(XT uses zeros for the site code and serial number in its DECRPTUI response.
 1268 .
 1269 .iP
 1270 .IP \\*(Cs\\*>\\*(Ps\\*s\\*c
 1271 Send Device Attributes (Secondary DA).
 1272   \*(Ps = \*0 or omitted \(-> request the terminal's identification code.
 1273 The response depends on the \fBdecTerminalID\fP resource setting.
 1274 It should apply only to VT220 and up, but \fI\*(xt\fP extends this to VT100.
 1275   \(-> \*(Cs\*s\*>\*(Pp\*s\*;\*(Pv\*s\*;\*(Pc\*s\*c
 1276 .br
 1277 where \*(Pp denotes the terminal type
 1278   \*(Pp = \*0 \(-> \*(``VT100\*(''.
 1279   \*(Pp = \*1 \(-> \*(``VT220\*(''.
 1280   \*(Pp = \*2 \(-> \*(``VT240\*('' or \*(``VT241\*(''.
 1281   \*(Pp = \*1\*8 \(-> \*(``VT330\*(''.
 1282   \*(Pp = \*1\*9 \(-> \*(``VT340\*(''.
 1283   \*(Pp = \*2\*4 \(-> \*(``VT320\*(''.
 1284   \*(Pp = \*3\*2 \(-> \*(``VT382\*(''.
 1285   \*(Pp = \*4\*1 \(-> \*(``VT420\*(''.
 1286   \*(Pp = \*6\*1 \(-> \*(``VT510\*(''.
 1287   \*(Pp = \*6\*4 \(-> \*(``VT520\*(''.
 1288   \*(Pp = \*6\*5 \(-> \*(``VT525\*(''.
 1289 .iP
 1290 and \*(Pv is the firmware version (for \fI\*(xt\fP, this was originally
 1291 the XFree86 patch number, starting with 95).
 1292 In a DEC terminal, \*(Pc indicates the ROM cartridge
 1293 registration number and is always zero.
 1294 .
 1295 .iP
 1296 .IP \\*(Cs\\*(Ps\\*s\\*d
 1297 Line Position Absolute  [row] (default = [1,column]) (VPA).
 1298 .
 1299 .iP
 1300 .IP \\*(Cs\\*(Ps\\*s\\*e
 1301 Line Position Relative  [rows] (default = [row+1,column]) (VPR).
 1302 .
 1303 .iP
 1304 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*f
 1305 Horizontal and Vertical Position [row;column] (default = [1,1]) (HVP).
 1306 .
 1307 .iP
 1308 .IP \\*(Cs\\*(Ps\\*s\\*g
 1309 Tab Clear (TBC).
 1310 ECMA-48 defines additional codes,
 1311 but the VT100 user manual notes that it
 1312 ignores other codes.
 1313 DEC's later terminals (and \fI\*(xt\fP) do the same, for compatibility.
 1314   \*(Ps = \*0 \(-> Clear Current Column (default).
 1315   \*(Ps = \*3 \(-> Clear All.
 1316 .
 1317 .iP
 1318 .IP \\*(Cs\\*(Pm\\*s\\*h
 1319 Set Mode (SM).
 1320   \*(Ps = \*2 \(-> Keyboard Action Mode (KAM).
 1321   \*(Ps = \*4 \(-> Insert Mode (IRM).
 1322   \*(Ps = \*1\*2 \(-> Send/receive (SRM).
 1323   \*(Ps = \*2\*0 \(-> Automatic Newline (LNM).
 1324 .
 1325 .iP
 1326 .IP \\*(Cs\\*?\\*(Pm\\*s\\*h
 1327 DEC Private Mode Set (DECSET).
 1328   \*(Ps = \*1 \(-> Application Cursor Keys (DECCKM), VT100.
 1329   \*(Ps = \*2 \(-> Designate USASCII for character sets G0-G3 (DECANM), VT100,
 1330 and set VT100 mode.
 1331   \*(Ps = \*3 \(-> 132 Column Mode (DECCOLM), VT100.
 1332   \*(Ps = \*4 \(-> Smooth (Slow) Scroll (DECSCLM), VT100.
 1333   \*(Ps = \*5 \(-> Reverse Video (DECSCNM), VT100.
 1334   \*(Ps = \*6 \(-> Origin Mode (DECOM), VT100.
 1335   \*(Ps = \*7 \(-> Auto-Wrap Mode (DECAWM), VT100.
 1336   \*(Ps = \*8 \(-> Auto-Repeat Keys (DECARM), VT100.
 1337   \*(Ps = \*9 \(-> Send Mouse X & Y on button press.
 1338 See the section \fBMouse Tracking\fP.
 1339 This is the X10 \fI\*(xt\fP mouse protocol.
 1340   \*(Ps = \*1\*0 \(-> Show toolbar (rxvt).
 1341   \*(Ps = \*1\*2 \(-> Start blinking cursor (AT&T 610).
 1342   \*(Ps = \*1\*3 \(-> Start blinking cursor (set only via resource or menu).
 1343   \*(Ps = \*1\*4 \(-> Enable XOR of blinking cursor control sequence and menu.
 1344   \*(Ps = \*1\*8 \(-> Print Form Feed (DECPFF), VT220.
 1345   \*(Ps = \*1\*9 \(-> Set print extent to full screen (DECPEX), VT220.
 1346   \*(Ps = \*2\*5 \(-> Show cursor (DECTCEM), VT220.
 1347   \*(Ps = \*3\*0 \(-> Show scrollbar (rxvt).
 1348   \*(Ps = \*3\*5 \(-> Enable font-shifting functions (rxvt).
 1349   \*(Ps = \*3\*8 \(-> Enter Tektronix mode (DECTEK), VT240, \fI\*(xt\fP.
 1350   \*(Ps = \*4\*0 \(-> Allow 80 \z\(<-\(-> 132 mode, \fI\*(xt\fP.
 1351   \*(Ps = \*4\*1 \(-> \fBmore\fP(1) fix (see \fBcurses\fP resource).
 1352   \*(Ps = \*4\*2 \(-> Enable National Replacement Character sets
 1353 (DECNRCM), VT220.
 1354   \*(Ps = \*4\*3 \(-> Enable Graphics Expanded Print Mode (DECGEPM).
 1355   \*(Ps = \*4\*4 \(-> Turn on margin bell, \fI\*(xt\fP.
 1356   \*(Ps = \*4\*4 \(-> Enable Graphics Print Color Mode (DECGPCM).
 1357   \*(Ps = \*4\*5 \(-> Reverse-wraparound mode, \fI\*(xt\fP.
 1358   \*(Ps = \*4\*5 \(-> Enable Graphics Print ColorSpace (DECGPCS).
 1359   \*(Ps = \*4\*6 \(-> Start logging, \fI\*(xt\fP.
 1360 This is normally disabled by a compile-time option.
 1361   \*(Ps = \*4\*7 \(-> Use \fIAlternate Screen Buffer\fP, \fI\*(xt\fP.
 1362 This may be disabled by the \fBtiteInhibit\fP resource.
 1363   \*(Ps = \*4\*7 \(-> Enable Graphics Rotated Print Mode (DECGRPM).
 1364   \*(Ps = \*6\*6 \(-> Application keypad mode (DECNKM), VT320.
 1365   \*(Ps = \*6\*7 \(-> Backarrow key sends backspace (DECBKM), VT340, VT420.
 1366 This sets the \fBbackarrowKey\fP resource to \*(``true\*(''.
 1367   \*(Ps = \*6\*9 \(-> Enable left and right margin mode (DECLRMM), VT420 and up.
 1368   \*(Ps = \*8\*0 \(-> Enable \fISixel Display Mode\fP (DECSDM), VT330, VT340, VT382.
 1369   \*(Ps = \*9\*5 \(-> Do not clear screen when DECCOLM is set/reset
 1370 (DECNCSM), VT510 and up.
 1371   \*(Ps = \*1\*0\*0\*0 \(-> Send Mouse X & Y on button press and release.
 1372 See the section \fBMouse Tracking\fP.
 1373 This is the X11 \fI\*(xt\fP mouse protocol.
 1374   \*(Ps = \*1\*0\*0\*1 \(-> Use Hilite Mouse Tracking, \fI\*(xt\fP.
 1375   \*(Ps = \*1\*0\*0\*2 \(-> Use Cell Motion Mouse Tracking, \fI\*(xt\fP.
 1376 See the section \fBButton-event tracking\fP.
 1377   \*(Ps = \*1\*0\*0\*3 \(-> Use All Motion Mouse Tracking, \fI\*(xt\fP.
 1378 See the section \fBAny-event tracking\fP.
 1379   \*(Ps = \*1\*0\*0\*4 \(-> Send \fBFocusIn/FocusOut\fP events, \fI\*(xt\fP.
 1380   \*(Ps = \*1\*0\*0\*5 \(-> Enable UTF-8 Mouse Mode, \fI\*(xt\fP.
 1381   \*(Ps = \*1\*0\*0\*6 \(-> Enable SGR Mouse Mode, \fI\*(xt\fP.
 1382   \*(Ps = \*1\*0\*0\*7 \(-> Enable \fIAlternate Scroll Mode\fP, \fI\*(xt\fP.
 1383 This corresponds to the \fBalternateScroll\fP resource.
 1384   \*(Ps = \*1\*0\*1\*0 \(-> Scroll to bottom on tty output (rxvt).
 1385 This sets the \fBscrollTtyOutput\fP resource to \*(``true\*(''.
 1386   \*(Ps = \*1\*0\*1\*1 \(-> Scroll to bottom on key press (rxvt).
 1387 This sets the \fBscrollKey\fP resource to \*(``true\*(''.
 1388   \*(Ps = \*1\*0\*1\*5 \(-> Enable urxvt Mouse Mode.
 1389   \*(Ps = \*1\*0\*1\*6 \(-> Enable SGR Mouse PixelMode, \fI\*(xt\fP.
 1390   \*(Ps = \*1\*0\*3\*4 \(-> Interpret \*(``meta\*('' key, \fI\*(xt\fP.
 1391 This sets the eighth bit of keyboard input
 1392 (and enables the \fBeightBitInput\fP resource).
 1393   \*(Ps = \*1\*0\*3\*5 \(-> Enable special modifiers for Alt and NumLock keys,
 1394 \fI\*(xt\fP.
 1395 This enables the \fBnumLock\fP resource.
 1396   \*(Ps = \*1\*0\*3\*6 \(-> Send \*(Es  when Meta modifies a key, \fI\*(xt\fP.
 1397 This enables the \fBmetaSendsEscape\fP resource.
 1398   \*(Ps = \*1\*0\*3\*7 \(-> Send DEL from the editing-keypad Delete key,
 1399 \fI\*(xt\fP.
 1400   \*(Ps = \*1\*0\*3\*9 \(-> Send \*(Es when Alt modifies a key, \fI\*(xt\fP.
 1401 This enables the \fBaltSendsEscape\fP resource, \fI\*(xt\fP.
 1402   \*(Ps = \*1\*0\*4\*0 \(-> Keep selection even if not highlighted, \fI\*(xt\fP.
 1403 This enables the \fBkeepSelection\fP resource.
 1404   \*(Ps = \*1\*0\*4\*1 \(-> Use the CLIPBOARD selection, \fI\*(xt\fP.
 1405 This enables the \fBselectToClipboard\fP resource.
 1406   \*(Ps = \*1\*0\*4\*2 \(-> Enable Urgency window manager hint
 1407 when Control-G is received, \fI\*(xt\fP.
 1408 This enables the \fBbellIsUrgent\fP resource.
 1409   \*(Ps = \*1\*0\*4\*3 \(-> Enable raising of the window
 1410 when Control-G is received, \fI\*(xt\fP.
 1411 This enables the \fBpopOnBell\fP resource.
 1412   \*(Ps = \*1\*0\*4\*4 \(-> Reuse the most recent data copied to CLIPBOARD,
 1413 \fI\*(xt\fP.
 1414 This enables the \fBkeepClipboard\fP resource.
 1415   \*(Ps = \*1\*0\*4\*6 \(-> Enable switching to/from
 1416 \fIAlternate Screen Buffer\fP, \fI\*(xt\fP.
 1417 This works for terminfo-based systems, updating the \fBtiteInhibit\fP resource.
 1418   \*(Ps = \*1\*0\*4\*7 \(-> Use \fIAlternate Screen Buffer\fP, \fI\*(xt\fP.
 1419 This may be disabled by the \fBtiteInhibit\fP resource.
 1420   \*(Ps = \*1\*0\*4\*8 \(-> Save cursor as in DECSC, \fI\*(xt\fP.
 1421 This may be disabled by the \fBtiteInhibit\fP resource.
 1422   \*(Ps = \*1\*0\*4\*9 \(-> Save cursor as in DECSC, \fI\*(xt\fP.
 1423 After saving the cursor, switch to
 1424 the \fIAlternate Screen Buffer\fP, clearing it first.
 1425 This may be
 1426 disabled by the \fBtiteInhibit\fP resource.
 1427 This control combines the effects of the \*1\*0\*4\*7 and \*1\*0\*4\*8 modes.
 1428 Use this with terminfo-based applications rather than the \*4\*7 mode.
 1429   \*(Ps = \*1\*0\*5\*0 \(-> Set terminfo/termcap function-key mode, \fI\*(xt\fP.
 1430   \*(Ps = \*1\*0\*5\*1 \(-> Set Sun function-key mode, \fI\*(xt\fP.
 1431   \*(Ps = \*1\*0\*5\*2 \(-> Set HP function-key mode, \fI\*(xt\fP.
 1432   \*(Ps = \*1\*0\*5\*3 \(-> Set SCO function-key mode, \fI\*(xt\fP.
 1433   \*(Ps = \*1\*0\*6\*0 \(-> Set legacy keyboard emulation, i.e, X11R6,
 1434 \fI\*(xt\fP.
 1435   \*(Ps = \*1\*0\*6\*1 \(-> Set VT220 keyboard emulation, \fI\*(xt\fP.
 1436   \*(Ps = \*2\*0\*0\*1 \(-> Enable readline mouse button-1, \fI\*(xt\fP.
 1437   \*(Ps = \*2\*0\*0\*2 \(-> Enable readline mouse button-2, \fI\*(xt\fP.
 1438   \*(Ps = \*2\*0\*0\*3 \(-> Enable readline mouse button-3, \fI\*(xt\fP.
 1439   \*(Ps = \*2\*0\*0\*4 \(-> Set bracketed paste mode, \fI\*(xt\fP.
 1440   \*(Ps = \*2\*0\*0\*5 \(-> Enable readline character-quoting, \fI\*(xt\fP.
 1441   \*(Ps = \*2\*0\*0\*6 \(-> Enable readline newline pasting, \fI\*(xt\fP.
 1442 .
 1443 .iP
 1444 .IP \\*(Cs\\*(Ps\\*s\\*i
 1445 Media Copy (MC).
 1446   \*(Ps = \*0 \(-> Print screen (default).
 1447   \*(Ps = \*4 \(-> Turn off printer controller mode.
 1448   \*(Ps = \*5 \(-> Turn on printer controller mode.
 1449   \*(Ps = \*1\*0 \(-> HTML screen dump, \fI\*(xt\fP.
 1450   \*(Ps = \*1\*1 \(-> SVG screen dump, \fI\*(xt\fP.
 1451 .
 1452 .iP
 1453 .IP \\*(Cs\\*?\\*(Ps\\*s\\*i
 1454 Media Copy (MC), DEC-specific.
 1455   \*(Ps = \*1 \(-> Print line containing cursor.
 1456   \*(Ps = \*4 \(-> Turn off autoprint mode.
 1457   \*(Ps = \*5 \(-> Turn on autoprint mode.
 1458   \*(Ps = \*1\*0 \(-> Print composed display, ignores DECPEX.
 1459   \*(Ps = \*1\*1 \(-> Print all pages.
 1460 .
 1461 .iP
 1462 .IP \\*(Cs\\*(Pm\\*s\\*l
 1463 Reset Mode (RM).
 1464   \*(Ps = \*2 \(-> Keyboard Action Mode (KAM).
 1465   \*(Ps = \*4 \(-> Replace Mode (IRM).
 1466   \*(Ps = \*1\*2 \(-> Send/receive (SRM).
 1467   \*(Ps = \*2\*0 \(-> Normal Linefeed (LNM).
 1468 .
 1469 .iP
 1470 .IP \\*(Cs\\*?\\*(Pm\\*s\\*l
 1471 DEC Private Mode Reset (DECRST).
 1472   \*(Ps = \*1 \(-> Normal Cursor Keys (DECCKM), VT100.
 1473   \*(Ps = \*2 \(-> Designate VT52 mode (DECANM), VT100.
 1474   \*(Ps = \*3 \(-> 80 Column Mode (DECCOLM), VT100.
 1475   \*(Ps = \*4 \(-> Jump (Fast) Scroll (DECSCLM), VT100.
 1476   \*(Ps = \*5 \(-> Normal Video (DECSCNM), VT100.
 1477   \*(Ps = \*6 \(-> Normal Cursor Mode (DECOM), VT100.
 1478   \*(Ps = \*7 \(-> No Auto-Wrap Mode (DECAWM), VT100.
 1479   \*(Ps = \*8 \(-> No Auto-Repeat Keys (DECARM), VT100.
 1480   \*(Ps = \*9 \(-> Don't send Mouse X & Y on button press, \fI\*(xt\fP.
 1481   \*(Ps = \*1\*0 \(-> Hide toolbar (rxvt).
 1482   \*(Ps = \*1\*2 \(-> Stop blinking cursor (AT&T 610).
 1483   \*(Ps = \*1\*3 \(-> Disable blinking cursor (reset only via resource or menu).
 1484   \*(Ps = \*1\*4 \(-> Disable XOR of blinking cursor control sequence and menu.
 1485   \*(Ps = \*1\*8 \(-> Don't Print Form Feed (DECPFF), VT220.
 1486   \*(Ps = \*1\*9 \(-> Limit print to scrolling region (DECPEX), VT220.
 1487   \*(Ps = \*2\*5 \(-> Hide cursor (DECTCEM), VT220.
 1488   \*(Ps = \*3\*0 \(-> Don't show scrollbar (rxvt).
 1489   \*(Ps = \*3\*5 \(-> Disable font-shifting functions (rxvt).
 1490   \*(Ps = \*4\*0 \(-> Disallow 80 \z\(<-\(-> 132 mode, \fI\*(xt\fP.
 1491   \*(Ps = \*4\*1 \(-> No \fBmore\fP(1) fix (see \fBcurses\fP resource).
 1492   \*(Ps = \*4\*2 \(-> Disable National Replacement Character sets (DECNRCM),
 1493 VT220.
 1494   \*(Ps = \*4\*3 \(-> Disable Graphics Expanded Print Mode (DECGEPM).
 1495   \*(Ps = \*4\*4 \(-> Turn off margin bell, \fI\*(xt\fP.
 1496   \*(Ps = \*4\*4 \(-> Disable Graphics Print Color Mode (DECGPCM).
 1497   \*(Ps = \*4\*5 \(-> No Reverse-wraparound mode, \fI\*(xt\fP.
 1498   \*(Ps = \*4\*5 \(-> Disable Graphics Print ColorSpace (DECGPCS).
 1499   \*(Ps = \*4\*6 \(-> Stop logging, \fI\*(xt\fP.
 1500 This is normally disabled by a compile-time option.
 1501   \*(Ps = \*4\*7 \(-> Use \fINormal Screen Buffer\fP, \fI\*(xt\fP.
 1502   \*(Ps = \*4\*7 \(-> Disable Graphics Rotated Print Mode (DECGRPM).
 1503   \*(Ps = \*6\*6 \(-> Numeric keypad mode (DECNKM), VT320.
 1504   \*(Ps = \*6\*7 \(-> Backarrow key sends delete (DECBKM), VT340, VT420.
 1505 This sets the \fBbackarrowKey\fP resource to \*(``false\*(''.
 1506   \*(Ps = \*6\*9 \(-> Disable left and right margin mode (DECLRMM),
 1507 VT420 and up.
 1508   \*(Ps = \*8\*0 \(-> Disable \fISixel Display Mode\fP (DECSDM), VT330, VT340, VT382.
 1509 Turns on \*(``Sixel Scrolling\*(''.
 1510 See the section \fBSixel Graphics\fP and mode \*8\*4\*5\*2.
 1511   \*(Ps = \*9\*5 \(-> Clear screen when DECCOLM is set/reset (DECNCSM),
 1512 VT510 and up.
 1513   \*(Ps = \*1\*0\*0\*0 \(-> Don't send Mouse X & Y on button press and
 1514 release.
 1515 See the section \fBMouse Tracking\fP.
 1516   \*(Ps = \*1\*0\*0\*1 \(-> Don't use Hilite Mouse Tracking, \fI\*(xt\fP.
 1517   \*(Ps = \*1\*0\*0\*2 \(-> Don't use Cell Motion Mouse Tracking, \fI\*(xt\fP.
 1518 See the section \fBButton-event tracking\fP.
 1519   \*(Ps = \*1\*0\*0\*3 \(-> Don't use All Motion Mouse Tracking, \fI\*(xt\fP.
 1520 See the section \fBAny-event tracking\fP.
 1521   \*(Ps = \*1\*0\*0\*4 \(-> Don't send \fBFocusIn/FocusOut\fP events, \fI\*(xt\fP.
 1522   \*(Ps = \*1\*0\*0\*5 \(-> Disable UTF-8 Mouse Mode, \fI\*(xt\fP.
 1523   \*(Ps = \*1\*0\*0\*6 \(-> Disable SGR Mouse Mode, \fI\*(xt\fP.
 1524   \*(Ps = \*1\*0\*0\*7 \(-> Disable \fIAlternate Scroll Mode\fP, \fI\*(xt\fP.
 1525 This corresponds to the \fBalternateScroll\fP resource.
 1526   \*(Ps = \*1\*0\*1\*0 \(-> Don't scroll to bottom on tty output (rxvt).
 1527 This sets the \fBscrollTtyOutput\fP resource to \*(``false\*(''.
 1528   \*(Ps = \*1\*0\*1\*1 \(-> Don't scroll to bottom on key press (rxvt).
 1529 This sets the \fBscrollKey\fP resource to \*(``false\*(''.
 1530   \*(Ps = \*1\*0\*1\*5 \(-> Disable urxvt Mouse Mode.
 1531   \*(Ps = \*1\*0\*1\*6 \(-> Disable SGR Mouse Pixel-Mode, \fI\*(xt\fP.
 1532   \*(Ps = \*1\*0\*3\*4 \(-> Don't interpret \*(``meta\*('' key, \fI\*(xt\fP.
 1533 This disables the \fBeightBitInput\fP resource.
 1534   \*(Ps = \*1\*0\*3\*5 \(-> Disable special modifiers for
 1535 Alt and NumLock keys, \fI\*(xt\fP.
 1536 This disables the \fBnumLock\fP resource.
 1537   \*(Ps = \*1\*0\*3\*6 \(-> Don't send \*(Es when Meta modifies a key,
 1538 \fI\*(xt\fP.
 1539 This disables the \fBmetaSendsEscape\fP resource.
 1540   \*(Ps = \*1\*0\*3\*7 \(-> Send VT220 Remove from the editing-keypad
 1541 \fIDelete\fP key, \fI\*(xt\fP.
 1542   \*(Ps = \*1\*0\*3\*9 \(-> Don't send \*(Es
 1543 when Alt modifies a key, \fI\*(xt\fP.
 1544 This disables the \fBaltSendsEscape\fP resource.
 1545   \*(Ps = \*1\*0\*4\*0 \(-> Do not keep selection
 1546 when not highlighted, \fI\*(xt\fP.
 1547 This disables the \fBkeepSelection\fP resource.
 1548   \*(Ps = \*1\*0\*4\*1 \(-> Use the PRIMARY selection, \fI\*(xt\fP.
 1549 This disables the \fBselectToClipboard\fP resource.
 1550   \*(Ps = \*1\*0\*4\*2 \(-> Disable Urgency window manager hint
 1551 when Control-G is received, \fI\*(xt\fP.
 1552 This disables the \fBbellIsUrgent\fP resource.
 1553   \*(Ps = \*1\*0\*4\*3 \(-> Disable raising of the window
 1554 when Control-G is received, \fI\*(xt\fP.
 1555 This disables the \fBpopOnBell\fP resource.
 1556   \*(Ps = \*1\*0\*4\*6 \(-> Disable switching to/from
 1557 \fIAlternate Screen Buffer\fP, \fI\*(xt\fP.
 1558 This works for terminfo-based systems, updating the \fBtiteInhibit\fP resource.
 1559 If currently using the \fIAlternate Screen Buffer\fP,
 1560 \fI\*(xt\fP switches to the Normal Screen Buffer.
 1561   \*(Ps = \*1\*0\*4\*7 \(-> Use Normal Screen Buffer, \fI\*(xt\fP.
 1562 Clear the screen first if in the \fIAlternate Screen Buffer\fP.
 1563 This may be disabled by the \fBtiteInhibit\fP resource.
 1564   \*(Ps = \*1\*0\*4\*8 \(-> Restore cursor as in DECRC, \fI\*(xt\fP.
 1565 This may be disabled by the \fBtiteInhibit\fP resource.
 1566   \*(Ps = \*1\*0\*4\*9 \(-> Use Normal Screen Buffer and restore cursor
 1567 as in DECRC, \fI\*(xt\fP.
 1568 This may be disabled by the \fBtiteInhibit\fP resource.
 1569 This combines the effects of the \*1\*0\*4\*7 and \*1\*0\*4\*8 modes.
 1570 Use this with terminfo-based applications rather than the \*4\*7 mode.
 1571   \*(Ps = \*1\*0\*5\*0 \(-> Reset terminfo/termcap function-key mode, \fI\*(xt\fP.
 1572   \*(Ps = \*1\*0\*5\*1 \(-> Reset Sun function-key mode, \fI\*(xt\fP.
 1573   \*(Ps = \*1\*0\*5\*2 \(-> Reset HP function-key mode, \fI\*(xt\fP.
 1574   \*(Ps = \*1\*0\*5\*3 \(-> Reset SCO function-key mode, \fI\*(xt\fP.
 1575   \*(Ps = \*1\*0\*6\*0 \(-> Reset legacy keyboard emulation, i.e, X11R6, \fI\*(xt\fP.
 1576   \*(Ps = \*1\*0\*6\*1 \(-> Reset keyboard emulation to Sun/PC style, \fI\*(xt\fP.
 1577   \*(Ps = \*2\*0\*0\*1 \(-> Disable readline mouse button-1, \fI\*(xt\fP.
 1578   \*(Ps = \*2\*0\*0\*2 \(-> Disable readline mouse button-2, \fI\*(xt\fP.
 1579   \*(Ps = \*2\*0\*0\*3 \(-> Disable readline mouse button-3, \fI\*(xt\fP.
 1580   \*(Ps = \*2\*0\*0\*4 \(-> Reset bracketed paste mode, \fI\*(xt\fP.
 1581   \*(Ps = \*2\*0\*0\*5 \(-> Disable readline character-quoting, \fI\*(xt\fP.
 1582   \*(Ps = \*2\*0\*0\*6 \(-> Disable readline newline pasting, \fI\*(xt\fP.
 1583 .
 1584 .iP
 1585 .IP \\*(Cs\\*(Pm\\*s\\*m
 1586 Character Attributes (SGR).
 1587   \*(Ps = \*0 \(-> Normal (default), VT100.
 1588   \*(Ps = \*1 \(-> Bold, VT100.
 1589   \*(Ps = \*2 \(-> Faint, decreased intensity, ECMA-48 2nd.
 1590   \*(Ps = \*3 \(-> Italicized, ECMA-48 2nd.
 1591   \*(Ps = \*4 \(-> Underlined, VT100.
 1592   \*(Ps = \*5 \(-> Blink, VT100.
 1593 .br
 1594 This appears as Bold in X11R6 xterm.
 1595   \*(Ps = \*7 \(-> Inverse, VT100.
 1596   \*(Ps = \*8 \(-> Invisible, i.e., hidden, ECMA-48 2nd, VT300.
 1597   \*(Ps = \*9 \(-> Crossed-out characters, ECMA-48 3rd.
 1598   \*(Ps = \*2\*1 \(-> Doubly-underlined, ECMA-48 3rd.
 1599   \*(Ps = \*2\*2 \(-> Normal (neither bold nor faint), ECMA-48 3rd.
 1600   \*(Ps = \*2\*3 \(-> Not italicized, ECMA-48 3rd.
 1601   \*(Ps = \*2\*4 \(-> Not underlined, ECMA-48 3rd.
 1602   \*(Ps = \*2\*5 \(-> Steady (not blinking), ECMA-48 3rd.
 1603   \*(Ps = \*2\*7 \(-> Positive (not inverse), ECMA-48 3rd.
 1604   \*(Ps = \*2\*8 \(-> Visible, i.e., not hidden, ECMA-48 3rd, VT300.
 1605   \*(Ps = \*2\*9 \(-> Not crossed-out, ECMA-48 3rd.
 1606   \*(Ps = \*3\*0 \(-> Set foreground color to Black.
 1607   \*(Ps = \*3\*1 \(-> Set foreground color to Red.
 1608   \*(Ps = \*3\*2 \(-> Set foreground color to Green.
 1609   \*(Ps = \*3\*3 \(-> Set foreground color to Yellow.
 1610   \*(Ps = \*3\*4 \(-> Set foreground color to Blue.
 1611   \*(Ps = \*3\*5 \(-> Set foreground color to Magenta.
 1612   \*(Ps = \*3\*6 \(-> Set foreground color to Cyan.
 1613   \*(Ps = \*3\*7 \(-> Set foreground color to White.
 1614   \*(Ps = \*3\*9 \(-> Set foreground color to default, ECMA-48 3rd.
 1615   \*(Ps = \*4\*0 \(-> Set background color to Black.
 1616   \*(Ps = \*4\*1 \(-> Set background color to Red.
 1617   \*(Ps = \*4\*2 \(-> Set background color to Green.
 1618   \*(Ps = \*4\*3 \(-> Set background color to Yellow.
 1619   \*(Ps = \*4\*4 \(-> Set background color to Blue.
 1620   \*(Ps = \*4\*5 \(-> Set background color to Magenta.
 1621   \*(Ps = \*4\*6 \(-> Set background color to Cyan.
 1622   \*(Ps = \*4\*7 \(-> Set background color to White.
 1623   \*(Ps = \*4\*9 \(-> Set background color to default, ECMA-48 3rd.
 1624 .sP
 1625 Some of the above note the edition of ECMA-48 which first describes
 1626 a feature.
 1627 In its successive editions from 1979 to 1991
 1628 (\fI2nd\fP 1979, \fI3rd\fP 1984, \fI4th\fP 1986, and \fI5th\fP 1991),
 1629 ECMA-48 listed codes through \*6\*5
 1630 (skipping several toward the end of the range).
 1631 Most of the ECMA-48 codes not implemented in \fI\*(xt\fP
 1632 were never implemented in a hardware terminal.
 1633 Several (such as \*3\*9 and \*4\*9) are either noted in ECMA-48
 1634 as implementation defined, or described in vague terms.
 1635 .sP
 1636 The successive editions of ECMA-48 give little attention to
 1637 changes from one edition to the next,
 1638 except to comment on features which have become obsolete.
 1639 ECMA-48 1st (1976) is unavailable;
 1640 there is no reliable source of information which states whether
 1641 \*(``ANSI\*('' color was defined in that edition,
 1642 or later (1979).
 1643 The VT100 (1978) implemented the most commonly used non-color video attributes
 1644 which are given in the 2nd edition.
 1645 .sP
 1646 While 8-color support is described in ECMA-48 2nd edition,
 1647 the VT500 series (introduced in 1993)
 1648 were the first DEC terminals implementing \*(``ANSI\*('' color.
 1649 The DEC terminal's use of color is known to differ from \fI\*(xt\fP;
 1650 useful documentation on this series
 1651 became available too late to influence \fI\*(xt\fP.
 1652 .sP
 1653 If 16-color support is compiled, the following \fIaixterm\fP controls apply.
 1654 Assume that \fI\*(xt\fP's resources
 1655 are set so that the ISO color codes are the first 8 of a set of 16.
 1656 Then the \fIaixterm\fP colors are the bright versions of the ISO colors:
 1657 .iP
 1658   \*(Ps = \*9\*0 \(-> Set foreground color to Black.
 1659   \*(Ps = \*9\*1 \(-> Set foreground color to Red.
 1660   \*(Ps = \*9\*2 \(-> Set foreground color to Green.
 1661   \*(Ps = \*9\*3 \(-> Set foreground color to Yellow.
 1662   \*(Ps = \*9\*4 \(-> Set foreground color to Blue.
 1663   \*(Ps = \*9\*5 \(-> Set foreground color to Magenta.
 1664   \*(Ps = \*9\*6 \(-> Set foreground color to Cyan.
 1665   \*(Ps = \*9\*7 \(-> Set foreground color to White.
 1666   \*(Ps = \*1\*0\*0 \(-> Set background color to Black.
 1667   \*(Ps = \*1\*0\*1 \(-> Set background color to Red.
 1668   \*(Ps = \*1\*0\*2 \(-> Set background color to Green.
 1669   \*(Ps = \*1\*0\*3 \(-> Set background color to Yellow.
 1670   \*(Ps = \*1\*0\*4 \(-> Set background color to Blue.
 1671   \*(Ps = \*1\*0\*5 \(-> Set background color to Magenta.
 1672   \*(Ps = \*1\*0\*6 \(-> Set background color to Cyan.
 1673   \*(Ps = \*1\*0\*7 \(-> Set background color to White.
 1674 .sP
 1675 If \fI\*(xt\fP is compiled with the 16-color support disabled, it supports
 1676 the following, from \fIrxvt\fP:
 1677   \*(Ps = \*1\*0\*0 \(-> Set foreground and background color to default.
 1678 .sP
 1679 \fI\*(XT\fP maintains a color palette
 1680 whose entries are identified by an index beginning with zero.
 1681 If 88- or 256-color support is compiled, the following apply:
 1682 .RS
 1683 .bP
 1684 All parameters are decimal integers.
 1685 .bP
 1686 RGB values range from zero (0) to 255.
 1687 .bP
 1688 The 88- and 256-color support uses \fIsubparameters\fP described in ISO-8613-6
 1689 for \fIindexed\fP color.
 1690 ISO-8613-6 also mentions \fIdirect color\fP, using a similar scheme.
 1691 \fI\*(xt\fP supports that, too.
 1692 .bP
 1693 \fI\*(xt\fP allows either colons (standard) or semicolons (legacy)
 1694 to separate the subparameters
 1695 (but after the first colon, colons must be used).
 1696 .RE
 1697 .sP
 1698 The indexed- and direct-color features are summarized in the FAQ,
 1699 which explains why semicolon is accepted as a subparameter delimiter:
 1700 .ID 2
 1701 .\" https://invisible-island.net/xterm/xterm.faq.html#color_by_number
 1702 \fICan I set a color by its number?\fP
 1703 .DE
 1704 .sP
 1705 These ISO-8613-6 controls (marked in ECMA-48 5th edition as
 1706 \*(``reserved for future standardization\*('')
 1707 are supported by \fI\*(xt\fP:
 1708   \*(Ps = \*3\*8\*:\*2\*:\*(Pi\*s\*:\*(Pr\*s\*:\*(Pg\*s\*:\*(Pb \(-> Set foreground
 1709 color using RGB values.
 1710 If \fI\*(xt\fP is not compiled with direct-color support,
 1711 it uses the closest match in its palette
 1712 for the given RGB \*(Pr/\*(Pg/\*(Pb.
 1713 The color space identifier \*(Pi is ignored.
 1714   \*(Ps = \*3\*8\*:\*5\*:\*(Ps \(-> Set foreground color to \*(Ps,
 1715 using indexed color.
 1716   \*(Ps = \*4\*8\*:\*2\*:\*(Pi\*s\*:\*(Pr\*s\*:\*(Pg\*s\*:\*(Pb \(-> Set background
 1717 color using RGB values.
 1718 If \fI\*(xt\fP is not compiled with direct-color support,
 1719 it uses the closest match in its palette
 1720 for the given RGB \*(Pr/\*(Pg/\*(Pb.
 1721 The color space identifier \*(Pi is ignored.
 1722   \*(Ps = \*4\*8\*:\*5\*:\*(Ps \(-> Set background color to \*(Ps,
 1723 using indexed color.
 1724 .sP
 1725 This variation on ISO-8613-6 is supported for compatibility with KDE konsole:
 1726   \*(Ps = \*3\*8\*;\*2\*;\*(Pr\*s\*;\*(Pg\*s\*;\*(Pb \(-> Set foreground color
 1727 using RGB values.
 1728 If \fI\*(xt\fP is not compiled with direct-color support,
 1729 it uses the closest match in its palette
 1730 for the given RGB \*(Pr/\*(Pg/\*(Pb.
 1731   \*(Ps = \*4\*8\*;\*2\*;\*(Pr\*s\*;\*(Pg\*s\*;\*(Pb \(-> Set background color
 1732 using RGB values.
 1733 If \fI\*(xt\fP is not compiled with direct-color support,
 1734 it uses the closest match in its palette
 1735 for the given RGB \*(Pr/\*(Pg/\*(Pb.
 1736 .sP
 1737 In each case,
 1738 if \fI\*(xt\fP is compiled with direct-color support,
 1739 and the resource \fBdirectColor\fP is true, then
 1740 rather than choosing the closest match,
 1741 \fI\*(xt\fP asks the X server to directly render a given color.
 1742 .
 1743 .iP
 1744 .IP \\*(Cs\\*>\\*(Pp\\*s\\*;\*(Pv\\*s\\*m
 1745 .IP \\*(Cs\\*>\\*(Pp\\*s\\*m
 1746 Set/reset key modifier options (XTMODKEYS), \fI\*(xt\fP.
 1747 Set or reset resource-values used by \fI\*(xt\fP to decide whether to
 1748 construct escape sequences holding information about the modifiers
 1749 pressed with a given key.
 1750 .iP
 1751 .IP
 1752 The first parameter \*(Pp identifies the resource to set/reset.
 1753 The second parameter \*(Pv is the value to assign to the resource.
 1754 .iP
 1755 .IP
 1756 If the second parameter is omitted, the resource is reset to its initial value.
 1757 Values \*3 and \*5 are reserved for keypad-keys and string-keys.
 1758 .iP
 1759   \*(Pp = \*0 \(-> \fBmodifyKeyboard\fP.
 1760   \*(Pp = \*1 \(-> \fBmodifyCursorKeys\fP.
 1761   \*(Pp = \*2 \(-> \fBmodifyFunctionKeys\fP.
 1762   \*(Pp = \*4 \(-> \fBmodifyOtherKeys\fP.
 1763 .iP
 1764 .IP
 1765 If no parameters are given, all resources are reset to their initial values.
 1766 .
 1767 .iP
 1768 .IP \\*(Cs\\*?\\*(Pp\\*s\\*m
 1769 Query key modifier options (XTQMODKEYS), \fI\*(xt\fP.
 1770 .iP
 1771 .IP
 1772 The parameter \*(Pp identifies the resource to query.
 1773 .iP
 1774   \*(Pp = \*0 \(-> \fBmodifyKeyboard\fP.
 1775   \*(Pp = \*1 \(-> \fBmodifyCursorKeys\fP.
 1776   \*(Pp = \*2 \(-> \fBmodifyFunctionKeys\fP.
 1777   \*(Pp = \*4 \(-> \fBmodifyOtherKeys\fP.
 1778 .iP
 1779 .IP
 1780 \*(XT's response can be used to restore this state,
 1781 because it is formatted as an XTMODKEYS control, i.e.,
 1782 .iP
 1783   \*(Cs\*>\*(Pp\*s\*m
 1784 .iP
 1785 where
 1786 .iP
 1787   \*(Pp = \*0 \(-> \fBmodifyKeyboard\fP.
 1788   \*(Pp = \*1 \(-> \fBmodifyCursorKeys\fP.
 1789   \*(Pp = \*2 \(-> \fBmodifyFunctionKeys\fP.
 1790   \*(Pp = \*4 \(-> \fBmodifyOtherKeys\fP.
 1791 .
 1792 .iP
 1793 .IP \\*(Cs\\*(Ps\\*s\\*n
 1794 Device Status Report (DSR).
 1795   \*(Ps = \*5 \(-> Status Report.
 1796 .br
 1797 Result (\*(``OK\*('') is
 1798 \*(Cs\*0\*n
 1799   \*(Ps = \*6 \(-> Report Cursor Position (CPR) [row;column].
 1800 .br
 1801 Result is
 1802 \*(Cs\*(Ir\*s\*;\*(Ic\*s\*R
 1803 .iP
 1804 .IP
 1805 \fBNote\fP:
 1806 it is possible for this sequence to be sent by a function key.
 1807 For example, with the default keyboard configuration
 1808 the shifted F1 key may send (with shift-, control-, alt-modifiers)
 1809 .iP
 1810   \*(Cs\*1\*;\*2\*s\*R, or
 1811   \*(Cs\*1\*;\*5\*s\*R, or
 1812   \*(Cs\*1\*;\*6\*s\*R, etc.
 1813 .iP
 1814 .IP
 1815 The second parameter encodes the modifiers; values range from 2 to 16.
 1816 See the section \fBPC-Style Function Keys\fP for the codes.
 1817 The \fBmodifyFunctionKeys\fP and \fBmodifyKeyboard\fP resources
 1818 can change the form of the string sent from the modified F1 key.
 1819 .
 1820 .iP
 1821 .IP \\*(Cs\\*>\\*(Ps\\*s\\*n
 1822 Disable key modifier options, \fI\*(xt\fP.
 1823 These modifiers may be enabled via the
 1824 \*(Cs\*>\*(Pm\*s\*m
 1825 sequence.
 1826 This control sequence corresponds to a resource value of \*(``\-1\*('',
 1827 which cannot be set with the other sequence.
 1828 .iP
 1829 .IP
 1830 The parameter identifies the resource to be disabled:
 1831 .iP
 1832   \*(Ps = \*0 \(-> \fBmodifyKeyboard\fP.
 1833   \*(Ps = \*1 \(-> \fBmodifyCursorKeys\fP.
 1834   \*(Ps = \*2 \(-> \fBmodifyFunctionKeys\fP.
 1835   \*(Ps = \*4 \(-> \fBmodifyOtherKeys\fP.
 1836 .iP
 1837 If the parameter is omitted, \fBmodifyFunctionKeys\fP is disabled.
 1838 When \fBmodifyFunctionKeys\fP is disabled, \fI\*(xt\fP uses the
 1839 modifier keys to make an extended sequence of function keys rather
 1840 than adding a parameter to each function key to denote the modifiers.
 1841 .
 1842 .iP
 1843 .IP \\*(Cs\\*?\\*(Ps\\*s\\*n
 1844 Device Status Report (DSR, DEC-specific).
 1845   \*(Ps = \*6 \(-> Report Cursor Position (DECXCPR).
 1846 The response [row;column] is returned as
 1847 .br
 1848 \*(Cs\*?\*(Ir\*s\*;\*(Ic\*s\*R
 1849 .br
 1850 (assumes the default page, i.e., \*(``1\*('').
 1851   \*(Ps = \*1\*5 \(-> Report Printer status.
 1852 The response is
 1853 .br
 1854 \*(Cs\*?\*1\*0\*n (ready).
 1855 or
 1856 .br
 1857 \*(Cs\*?\*1\*1\*n (not ready).
 1858   \*(Ps = \*2\*5 \(-> Report UDK status.
 1859 The response is
 1860 .br
 1861 \*(Cs\*?\*2\*0\*n (unlocked)
 1862 .br
 1863 or
 1864 .br
 1865 \*(Cs\*?\*2\*1\*n (locked).
 1866   \*(Ps = \*2\*6 \(-> Report Keyboard status.
 1867 The response is
 1868 .br
 1869 \*(Cs\*?\*2\*7\*;\*1\*;\*0\*;\*0\*n (North American).
 1870 .iP
 1871 .IP
 1872 The last two parameters apply to VT300 & up (keyboard ready) and
 1873 VT400 & up (LK01) respectively.
 1874 .iP
 1875   \*(Ps = \*5\*3 \(-> Report Locator status.
 1876 The response is
 1877 \*(Cs\*?\*5\*3\*n Locator available, if compiled-in, or
 1878 \*(Cs\*?\*5\*0\*n No Locator, if not.
 1879   \*(Ps = \*5\*5 \(-> Report Locator status.
 1880 The response is
 1881 \*(Cs\*?\*5\*3\*n Locator available, if compiled-in, or
 1882 \*(Cs\*?\*5\*0\*n No Locator, if not.
 1883   \*(Ps = \*5\*6 \(-> Report Locator type.
 1884 The response is
 1885 \*(Cs\*?\*5\*7\*;\*1\*n Mouse, if compiled-in, or
 1886 \*(Cs\*?\*5\*7\*;\*0\*n Cannot identify, if not.
 1887   \*(Ps = \*6\*2 \(-> Report macro space (DECMSR).
 1888 The response is
 1889 \*(Cs\*(Pn\*s\**\*s\*{.
 1890   \*(Ps = \*6\*3 \(-> Report memory checksum (DECCKSR), VT420 and up.
 1891 The response is
 1892 \*(Dc\*(Pt\*s\*!\*~x\*sx\*sx\*sx\*s\*(ST.
 1893 .br
 1894     \*(Pt is the request id (from an optional parameter to the request).
 1895     The x's are hexadecimal digits 0-9 and A-F.
 1896   \*(Ps = \*7\*5 \(-> Report data integrity.
 1897 The response is
 1898 \*(Cs\*?\*7\*0\*n (ready, no errors).
 1899   \*(Ps = \*8\*5 \(-> Report multi-session configuration.
 1900 The response is
 1901 \*(Cs\*?\*8\*3\*n (not configured for multiple-session operation).
 1902 .
 1903 .iP
 1904 .IP \\*(Cs\\*>\\*(Ps\\*s\\*p
 1905 Set resource value \fBpointerMode\fP (XTSMPOINTER), \*(xt.
 1906 This is used by \fI\*(xt\fP to decide whether to
 1907 hide the pointer cursor as the user types.
 1908 .iP
 1909 Valid values for the parameter:
 1910   \*(Ps = \*0 \(-> never hide the pointer.
 1911   \*(Ps = \*1 \(-> hide if the mouse tracking mode is not enabled.
 1912   \*(Ps = \*2 \(-> always hide the pointer, except when leaving the window.
 1913   \*(Ps = \*3 \(-> always hide the pointer, even if leaving/entering the window.
 1914 .iP
 1915 If no parameter is given, \fI\*(xt\fP uses the default,
 1916 which is \*1.
 1917 .
 1918 .iP
 1919 .IP \\*(Cs\\*!\\*p
 1920 Soft terminal reset (DECSTR), VT220 and up.
 1921 .
 1922 .iP
 1923 .IP \\*(Cs\\*(Pl\\*s\\*;\\*(Pc\\*s\\*(Dq\\*p
 1924 Set conformance level (DECSCL), VT220 and up.
 1925 .iP
 1926 The first parameter selects the conformance level.
 1927 Valid values are:
 1928   \*(Pl = \*6\*1 \(-> level 1, e.g., VT100.
 1929   \*(Pl = \*6\*2 \(-> level 2, e.g., VT200.
 1930   \*(Pl = \*6\*3 \(-> level 3, e.g., VT300.
 1931   \*(Pl = \*6\*4 \(-> level 4, e.g., VT400.
 1932   \*(Pl = \*6\*5 \(-> level 5, e.g., VT500.
 1933 .iP
 1934 The second parameter selects the C1 control transmission mode.
 1935 This is an optional parameter, ignored in conformance level 1.
 1936 Valid values are:
 1937   \*(Pc = \*0 \(-> 8-bit controls.
 1938   \*(Pc = \*1 \(-> 7-bit controls (DEC factory default).
 1939   \*(Pc = \*2 \(-> 8-bit controls.
 1940 .iP
 1941 The 7-bit and 8-bit control modes can also be set by S7C1T and S8C1T,
 1942 but DECSCL is preferred.
 1943 .
 1944 .iP
 1945 .IP \\*(Cs\\*(Ps\\*s\\*$\\*p
 1946 .br
 1947 Request ANSI mode (DECRQM).
 1948 For VT300 and up, reply DECRPM is
 1949 .br
 1950   \*(Cs\*(Ps\*;\*(Pm\*s\*$\*y
 1951 .br
 1952 where \*(Ps is the mode number as in SM/RM,
 1953 and \*(Pm is the mode value:
 1954 .br
 1955   0 - not recognized
 1956   1 - set
 1957   2 - reset
 1958   3 - permanently set
 1959   4 - permanently reset
 1960 .
 1961 .iP
 1962 .IP \\*(Cs\\*?\\*(Ps\\*s\\*$\\*p
 1963 Request DEC private mode (DECRQM).
 1964 For VT300 and up, reply DECRPM is
 1965 .br
 1966   \*(Cs\*?\*(Ps\*;\*(Pm\*s\*$\*y
 1967 .br
 1968 where \*(Ps is the mode number as in DECSET/DECSET,
 1969 \*(Pm is the mode value as in the ANSI DECRQM.
 1970 .br
 1971 Two private modes are read-only (i.e., \*1\*3 and \*1\*4),
 1972 provided only for reporting their values using this control sequence.
 1973 They correspond to the resources \fBcursorBlink\fP and \fBcursorBlinkXOR\fP.
 1974 .
 1975 .IP \\*(Cs\\*#\\*p
 1976 .br
 1977 .IP \\*(Cs\\*(Pm\\*s\\*#\\*p
 1978 Push video attributes onto stack (XTPUSHSGR), \fI\*(xt\fP.
 1979 This is an alias for \*(Cs\*#\*{,
 1980 used to work around language limitations of C#.
 1981 .
 1982 .iP
 1983 .IP \\*(Cs\\*>\\*(Ps\\*s\\*q
 1984 \*(Ps = \*0 \(-> Report \fI\*(xt\fP name and version (XTVERSION).
 1985 The response is a DSR sequence identifying the version: \*(Dc\*>\*|text \*(ST
 1986 .iP
 1987 .IP \\*(Cs\\*(Ps\\*s\\*q
 1988 Load LEDs (DECLL), VT100.
 1989   \*(Ps = \*0 \(-> Clear all LEDS (default).
 1990   \*(Ps = \*1 \(-> Light Num Lock.
 1991   \*(Ps = \*2 \(-> Light Caps Lock.
 1992   \*(Ps = \*3 \(-> Light Scroll Lock.
 1993   \*(Ps = \*2\*1 \(-> Extinguish Num Lock.
 1994   \*(Ps = \*2\*2 \(-> Extinguish Caps Lock.
 1995   \*(Ps = \*2\*3 \(-> Extinguish Scroll Lock.
 1996 .
 1997 .iP
 1998 .IP \\*(Cs\\*(Ps\\*s\\*(Sp\\*q
 1999 Set cursor style (DECSCUSR), VT520.
 2000   \*(Ps = \*0 \(-> blinking block.
 2001   \*(Ps = \*1 \(-> blinking block (default).
 2002   \*(Ps = \*2 \(-> steady block.
 2003   \*(Ps = \*3 \(-> blinking underline.
 2004   \*(Ps = \*4 \(-> steady underline.
 2005   \*(Ps = \*5 \(-> blinking bar, \fI\*(xt\fP.
 2006   \*(Ps = \*6 \(-> steady bar, \fI\*(xt\fP.
 2007 .
 2008 .iP
 2009 .IP \\*(Cs\\*(Ps\\*s\\*(Dq\\*q
 2010 Select character protection attribute (DECSCA), VT220.
 2011 Valid values for the parameter:
 2012   \*(Ps = \*0 \(-> DECSED and DECSEL can erase (default).
 2013   \*(Ps = \*1 \(-> DECSED and DECSEL cannot erase.
 2014   \*(Ps = \*2 \(-> DECSED and DECSEL can erase.
 2015 .
 2016 .iP
 2017 .IP \\*(Cs\\*#\\*q
 2018 Pop video attributes from stack (XTPOPSGR), \fI\*(xt\fP.
 2019 This is an alias for \*(Cs\*#\*},
 2020 used to work around language limitations of C#.
 2021 .
 2022 .iP
 2023 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*r
 2024 Set Scrolling Region [top;bottom] (default = full size of window)
 2025 (DECSTBM), VT100.
 2026 .
 2027 .iP
 2028 .IP \\*(Cs\\*?\\*(Pm\\*s\\*r
 2029 Restore DEC Private Mode Values (XTRESTORE), \*(xt.
 2030 The value of \*(Ps previously saved is restored.
 2031 \*(Ps values are the same as for DECSET.
 2032 .iP
 2033 Like Restore Cursor (DECRC), this uses a one-level cache.
 2034 Unlike Restore Cursor,
 2035 specific settings can be saved and restored independently.
 2036 Only those modes listed as parameters are restored.
 2037 .
 2038 .iP
 2039 .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*;\\*(Pm\\*s\\*$\\*r
 2040 Change Attributes in Rectangular Area (DECCARA), VT400 and up.
 2041   \*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr denotes the rectangle.
 2042   \*(Pm denotes the SGR attributes to change: 0, 1, 4, 5, 7.
 2043 .
 2044 .iP
 2045 .IP \\*(Cs\\*(cs
 2046 Save cursor, available only when DECLRMM is disabled (SCOSC, also ANSI.SYS).
 2047 .
 2048 .iP
 2049 .IP \\*(Cs\\*(Pl\\*s\\*;\\*(Pr\\*s\\*(cs
 2050 Set left and right margins (DECSLRM), VT420 and up.
 2051 This is available only when DECLRMM is enabled.
 2052 .
 2053 .iP
 2054 .IP \\*(Cs\\*>\\*(Ps\\*s\\*(cs
 2055 Set/reset shift-escape options (XTSHIFTESCAPE), \fI\*(xt\fP.
 2056 This corresponds to the \fBshiftEscape\fP resource.
 2057 .iP
 2058 Valid values for the parameter:
 2059   \*(Ps = \*0 \(-> allow shift-key to override mouse protocol.
 2060   \*(Ps = \*1 \(-> conditionally allow shift-key as modifier in mouse protocol.
 2061 .iP
 2062 These resource values are disallowed in the control sequence:
 2063   \*(Ps = \*2 \(-> always allow shift-key as modifier in mouse protocol.
 2064   \*(Ps = \*3 \(-> never allow shift-key as modifier in mouse protocol.
 2065 .iP
 2066 If no parameter is given, \fI\*(xt\fP uses the default,
 2067 which is \*0.
 2068 .
 2069 .iP
 2070 .IP \\*(Cs\\*?\\*(Pm\\*s\\*(cs
 2071 Save DEC Private Mode Values (XTSAVE), \*(xt.
 2072 \*(Ps values are the same as for DECSET.
 2073 .iP
 2074 Like Save Cursor (DECSC), this uses a one-level cache.
 2075 Unlike Save Cursor,
 2076 specific settings can be saved and restored independently.
 2077 Only those modes listed as parameters are saved.
 2078 .
 2079 .iP
 2080 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*t
 2081 Window manipulation (XTWINOPS), \fIdtterm\fP, extended by \fI\*(xt\fP.
 2082 These controls may be disabled using the \fBallowWindowOps\fP resource.
 2083 .iP
 2084 \fI\*(xt\fP uses \fIExtended Window Manager Hints\fP (EWMH) to maximize
 2085 the window.
 2086 Some window managers have incomplete support for EWMH.
 2087 For instance, \fIfvwm\fP, \fIflwm\fP and \fIquartz-wm\fP advertise
 2088 support for maximizing windows horizontally or vertically, but
 2089 in fact equate those to the maximize operation.
 2090 .iP
 2091 Valid values for the first (and any additional parameters) are:
 2092   \*(Ps = \*1 \(-> De-iconify window.
 2093   \*(Ps = \*2 \(-> Iconify window.
 2094   \*(Ps = \*3\*;\*s\fIx\*s\*;\*sy\fP \(-> Move window to [x, y].
 2095   \*(Ps = \*4\*;\*s\fIheight\*s\*;\*swidth\fP \(-> Resize the \fI\*(xt\fP
 2096 window to given height and width in pixels.
 2097 Omitted parameters reuse the current height or width.
 2098 Zero parameters use the display's height or width.
 2099   \*(Ps = \*5 \(-> Raise the \fI\*(xt\fP window to the
 2100 front of the stacking order.
 2101   \*(Ps = \*6 \(-> Lower the \fI\*(xt\fP window to the
 2102 bottom of the stacking order.
 2103   \*(Ps = \*7 \(-> Refresh the \fI\*(xt\fP window.
 2104   \*(Ps = \*8\*;\*s\fIheight\*s\*;\*swidth\fP \(-> Resize the text area to
 2105 given height and width in characters.
 2106 Omitted parameters reuse the current height or width.
 2107 Zero parameters use the display's height or width.
 2108   \*(Ps = \*9\*;\*s\*0 \(-> Restore maximized window.
 2109   \*(Ps = \*9\*;\*s\*1 \(-> Maximize window (i.e., resize to screen size).
 2110   \*(Ps = \*9\*;\*s\*2 \(-> Maximize window vertically.
 2111   \*(Ps = \*9\*;\*s\*3 \(-> Maximize window horizontally.
 2112   \*(Ps = \*1\*0\*;\*s\*0 \(-> Undo full-screen mode.
 2113   \*(Ps = \*1\*0\*;\*s\*1 \(-> Change to full-screen.
 2114   \*(Ps = \*1\*0\*;\*s\*2 \(-> Toggle full-screen.
 2115   \*(Ps = \*1\*1 \(-> Report \fI\*(xt\fP window state.
 2116 .br
 2117 If the \fI\*(xt\fP window is non-iconified, it returns \*(Cs\*1\*t.
 2118 .br
 2119 If the \fI\*(xt\fP window is iconified, it returns \*(Cs\*2\*t.
 2120   \*(Ps = \*1\*3 \(-> Report \fI\*(xt\fP window position.
 2121 .br
 2122 Note: X Toolkit positions can be negative,
 2123 but the reported values are unsigned, in the range 0-65535.
 2124 Negative values correspond to 32768-65535.
 2125 .br
 2126 Result is
 2127 \*(Cs\*3\*;\*(Ix\*s\*;\*(Iy\*s\*t
 2128   \*(Ps = \*1\*3\*;\*s\*2 \(-> Report \fI\*(xt\fP text-area position.
 2129 .br
 2130 Result is
 2131 \*(Cs\*3\*;\*(Ix\*s\*;\*(Iy\*s\*t
 2132   \*(Ps = \*1\*4 \(-> Report \fI\*(xt\fP text area size in pixels.
 2133 .br
 2134 Result is
 2135 \*(Cs\*s\*4\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
 2136   \*(Ps = \*1\*4\*;\*s\*2 \(-> Report \fI\*(xt\fP window size in pixels.
 2137 .br
 2138 Normally \fI\*(xt\fP's \fIwindow\fP is larger than its \fItext area\fP,
 2139 since it includes the frame (or decoration) applied by the
 2140 window manager, as well as the area used by a scroll-bar.
 2141 .br
 2142 Result is
 2143 \*(Cs\*s\*4\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
 2144   \*(Ps = \*1\*5 \(-> Report size of the screen in pixels.
 2145 .br
 2146 Result is
 2147 \*(Cs\*s\*5\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
 2148   \*(Ps = \*1\*6 \(-> Report \fI\*(xt\fP character cell size in pixels.
 2149 .br
 2150 Result is
 2151 \*(Cs\*s\*6\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
 2152   \*(Ps = \*1\*8 \(-> Report the size of the text area in characters.
 2153 .br
 2154 Result is
 2155 \*(Cs\*s\*8\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
 2156   \*(Ps = \*1\*9 \(-> Report the size of the screen in characters.
 2157 .br
 2158 Result is
 2159 \*(Cs\*s\*9\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
 2160   \*(Ps = \*2\*0 \(-> Report \fI\*(xt\fP window's icon label.
 2161 .br
 2162 Result is
 2163 \*(Os\*s\*L\*s\fIlabel\fP\*s\*(ST
 2164   \*(Ps = \*2\*1 \(-> Report \fI\*(xt\fP window's title.
 2165 .br
 2166 Result is
 2167 \*(Os\*s\*l\*s\fIlabel\fP\*s\*(ST
 2168   \*(Ps = \*2\*2\*;\*0 \(-> Save \fI\*(xt\fP icon and window title
 2169 on stack.
 2170   \*(Ps = \*2\*2\*;\*1 \(-> Save \fI\*(xt\fP icon title on stack.
 2171   \*(Ps = \*2\*2\*;\*2 \(-> Save \fI\*(xt\fP window title on stack.
 2172   \*(Ps = \*2\*3\*;\*0 \(-> Restore \fI\*(xt\fP icon and window title
 2173 from stack.
 2174   \*(Ps = \*2\*3\*;\*1 \(-> Restore \fI\*(xt\fP icon title from stack.
 2175   \*(Ps = \*2\*3\*;\*2 \(-> Restore \fI\*(xt\fP window title from stack.
 2176   \*(Ps >= \*2\*4 \(-> Resize to \*(Ps lines (DECSLPP), VT340 and VT420.
 2177 .br
 2178 \fI\*(xt\fP adapts this by resizing its window.
 2179 .
 2180 .iP
 2181 .IP \\*(Cs\\*>\\*(Pm\\*s\\*t
 2182 This \fI\*(xt\fP control
 2183 sets one or more features of the title modes (XTSMTITLE), \*(xt.
 2184 Each parameter enables a single feature.
 2185   \*(Ps = \*0 \(-> Set window/icon labels using hexadecimal.
 2186   \*(Ps = \*1 \(-> Query window/icon labels using hexadecimal.
 2187   \*(Ps = \*2 \(-> Set window/icon labels using UTF-8.
 2188   \*(Ps = \*3 \(-> Query window/icon labels using UTF-8.
 2189 (See discussion of \fBTitle Modes\fP)
 2190 .
 2191 .iP
 2192 .IP \\*(Cs\\*(Ps\\*s\\*(Sp\\*t
 2193 Set warning-bell volume (DECSWBV), VT520.
 2194   \*(Ps = \*0 or \*1 \(-> off.
 2195   \*(Ps = \*2, \*3 or \*4 \(-> low.
 2196   \*(Ps = \*5, \*6, \*7, or \*8 \(-> high.
 2197 .
 2198 .iP
 2199 .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*;\\*(Pm\\*s\\*$\\*t
 2200 Reverse Attributes in Rectangular Area (DECRARA), VT400 and up.
 2201   \*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr denotes the rectangle.
 2202   \*(Pm denotes the attributes to reverse, i.e.,  1, 4, 5, 7.
 2203 .
 2204 .iP
 2205 .IP \\*(Cs\\*u
 2206 Restore cursor (SCORC, also ANSI.SYS).
 2207 .
 2208 .iP
 2209 .IP \\*(Cs\\*(Ps\\*s\\*(Sp\\*u
 2210 Set margin-bell volume (DECSMBV), VT520.
 2211   \*(Ps = \*0, \*5, \*6, \*7, or \*8 \(-> high.
 2212   \*(Ps = \*1 \(-> off.
 2213   \*(Ps = \*2, \*3 or \*4 \(-> low.
 2214 .
 2215 .iP
 2216 .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*;\\*(Pp\\*s\\*;\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pp\\*s\\*$\\*v
 2217 Copy Rectangular Area (DECCRA), VT400 and up.
 2218   \*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr denotes the rectangle.
 2219   \*(Pp denotes the source page.
 2220   \*(Pt\*s\*;\*(Pl denotes the target location.
 2221   \*(Pp denotes the target page.
 2222 .iP
 2223 .IP \\*(Cs\\*(Ps\\*s\\*$\\*w
 2224 Request presentation state report (DECRQPSR), VT320 and up.
 2225   \*(Ps = \*0 \(-> error.
 2226   \*(Ps = \*1 \(-> cursor information report (DECCIR).
 2227 .br
 2228 Response is
 2229 .br
 2230   \*(Dc\*1\*$\*u\*(Pt\*s\*(ST
 2231 .br
 2232 Refer to the VT420 programming manual,
 2233 which requires six pages to document the data string \*(Pt,
 2234   \*(Ps = \*2 \(-> tab stop report (DECTABSR).
 2235 .br
 2236 Response is
 2237 .br
 2238   \*(Dc\*2\*$\*u\*(Pt\*s\*(ST
 2239 .br
 2240 The data string \*(Pt is a list of the tab-stops,
 2241 separated by \*(``/\*('' characters.
 2242 .
 2243 .iP
 2244 .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*(qu\\*w
 2245 Enable Filter Rectangle (DECEFR), VT420 and up.
 2246 .br
 2247 Parameters are [top;left;bottom;right].
 2248 .br
 2249 Defines the coordinates of a filter rectangle and activates it.
 2250 Anytime the locator is detected outside of the filter rectangle,
 2251 an outside rectangle event is generated and the rectangle is disabled.
 2252 Filter rectangles are always treated as \*(``one-shot\*('' events.
 2253 Any parameters that are omitted default to the current locator position.
 2254 If all parameters are omitted, any locator motion will be reported.
 2255 DECELR always cancels any previous rectangle definition.
 2256 .
 2257 .iP
 2258 .IP \\*(Cs\\*(Ps\\*s\\*x
 2259 Request Terminal Parameters (DECREQTPARM).
 2260 .br
 2261 if \*(Ps is a \*(``0\*('' (default) or \*(``1\*('',
 2262 and \fI\*(xt\fR is emulating VT100,
 2263 the control sequence elicits a response of the same form
 2264 whose parameters describe the terminal:
 2265   \*(Ps \(-> the given \*(Ps incremented by 2.
 2266   \*(Pn = \*1 \(<- no parity.
 2267   \*(Pn = \*1 \(<- eight bits.
 2268   \*(Pn = \*1 \(<- \*2\*8 transmit 38.4k baud.
 2269   \*(Pn = \*1 \(<- \*2\*8 receive 38.4k baud.
 2270   \*(Pn = \*1 \(<- clock multiplier.
 2271   \*(Pn = \*0 \(<- STP flags.
 2272 .
 2273 .iP
 2274 .IP \\*(Cs\\*(Ps\\*s\\**\\*x
 2275 Select Attribute Change Extent (DECSACE), VT420 and up.
 2276   \*(Ps = \*0 \(-> from start to end position, wrapped.
 2277   \*(Ps = \*1 \(-> from start to end position, wrapped.
 2278   \*(Ps = \*2 \(-> rectangle (exact).
 2279 .
 2280 .iP
 2281 .IP \\*(Cs\\*(Pc\\*s\\*;\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*$\\*x
 2282 Fill Rectangular Area (DECFRA), VT420 and up.
 2283   \*(Pc is the character to use.
 2284   \*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr denotes the rectangle.
 2285 .
 2286 .iP
 2287 .IP \\*(Cs\\*(Ps\\*s\\*#\\*y
 2288 Select checksum extension (XTCHECKSUM), \fI\*(xt\fP.
 2289 The bits of \*(Ps modify the calculation of the checksum returned by DECRQCRA:
 2290   \*0 \(-> do not negate the result.
 2291   \*1 \(-> do not report the VT100 video attributes.
 2292   \*2 \(-> do not omit checksum for blanks.
 2293   \*3 \(-> omit checksum for cells not explicitly initialized.
 2294   \*4 \(-> do not mask cell value to 8 bits or ignore combining characters.
 2295   \*5 \(-> do not mask cell value to 7 bits.
 2296 .
 2297 .iP
 2298 .IP \\*(Cs\\*(Pi\\*s\\*;\\*(Pg\\*s\\*;\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\**\\*y
 2299 Request Checksum of Rectangular Area (DECRQCRA), VT420 and up.
 2300 Response is
 2301 .br
 2302 \*(Dc\*(Pi\*s\*!\*~x\*sx\*sx\*sx\*s\*(ST
 2303 .br
 2304   \*(Pi is the request id.
 2305   \*(Pg is the page number.
 2306   \*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr denotes the rectangle.
 2307   The x's are hexadecimal digits 0-9 and A-F.
 2308 .
 2309 .iP
 2310 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Pu\\*s\\*(qu\\*z
 2311 Enable Locator Reporting (DECELR).
 2312 .br
 2313 Valid values for the first parameter:
 2314   \*(Ps = \*0 \(-> Locator disabled (default).
 2315   \*(Ps = \*1 \(-> Locator enabled.
 2316   \*(Ps = \*2 \(-> Locator enabled for one report, then disabled.
 2317 .br
 2318 The second parameter specifies the coordinate unit for locator reports.
 2319 .br
 2320 Valid values for the second parameter:
 2321   \*(Pu = \*0 or omitted \(-> default to character cells.
 2322   \*(Pu = \*1 \(<- device physical pixels.
 2323   \*(Pu = \*2 \(<- character cells.
 2324 .
 2325 .iP
 2326 .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*$\\*z
 2327 Erase Rectangular Area (DECERA), VT400 and up.
 2328   \*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr denotes the rectangle.
 2329 .
 2330 .iP
 2331 .IP \\*(Cs\\*(Pm\\*s\\*(qu\\*{
 2332 Select Locator Events (DECSLE).
 2333 .br
 2334 Valid values for the first (and any additional parameters) are:
 2335   \*(Ps = \*0 \(-> only respond to explicit host requests (DECRQLP).
 2336 This is default.
 2337 It also cancels any filter rectangle.
 2338   \*(Ps = \*1 \(-> report button down transitions.
 2339   \*(Ps = \*2 \(-> do not report button down transitions.
 2340   \*(Ps = \*3 \(-> report button up transitions.
 2341   \*(Ps = \*4 \(-> do not report button up transitions.
 2342 .
 2343 .iP
 2344 .IP \\*(Cs\\*#\\*{
 2345 .br
 2346 .IP \\*(Cs\\*(Pm\\*s\\*#\\*{
 2347 Push video attributes onto stack (XTPUSHSGR), \fI\*(xt\fP.
 2348 The optional parameters correspond to the SGR encoding for video attributes,
 2349 except for colors (which do not have a unique SGR code):
 2350   \*(Ps = \*1 \(-> Bold.
 2351   \*(Ps = \*2 \(-> Faint.
 2352   \*(Ps = \*3 \(-> Italicized.
 2353   \*(Ps = \*4 \(-> Underlined.
 2354   \*(Ps = \*5 \(-> Blink.
 2355   \*(Ps = \*7 \(-> Inverse.
 2356   \*(Ps = \*8 \(-> Invisible.
 2357   \*(Ps = \*9 \(-> Crossed-out characters.
 2358   \*(Ps = \*2\*1 \(-> Doubly-underlined.
 2359   \*(Ps = \*3\*0 \(-> Foreground color.
 2360   \*(Ps = \*3\*1 \(-> Background color.
 2361 .iP
 2362 .IP
 2363 If no parameters are given, all of the video attributes are saved.
 2364 The stack is limited to 10 levels.
 2365 .
 2366 .iP
 2367 .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*$\\*{
 2368 Selective Erase Rectangular Area (DECSERA), VT400 and up.
 2369   \*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr denotes the rectangle.
 2370 .
 2371 .iP
 2372 .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*#\\*|
 2373 Report selected graphic rendition (XTREPORTSGR), \fI\*(xt\fP.
 2374 The response is an SGR sequence which contains the attributes which
 2375 are common to all cells in a rectangle.
 2376   \*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr denotes the rectangle.
 2377 .
 2378 .iP
 2379 .IP \\*(Cs\\*(Ps\\*s\\*$\\*|
 2380 Select columns per page (DECSCPP), VT340.
 2381   \*(Ps = \*0 \(-> 80 columns, default if \*(Ps omitted.
 2382   \*(Ps = \*8\*0 \(-> 80 columns.
 2383   \*(Ps = \*1\*3\*2 \(-> 132 columns.
 2384 .
 2385 .iP
 2386 .IP \\*(Cs\\*(Ps\\*s\\*(qu\\*|
 2387 Request Locator Position (DECRQLP).
 2388 .br
 2389 Valid values for the parameter are:
 2390   \*(Ps = \*0, 1 or omitted \(-> transmit a single DECLRP locator report.
 2391 .sP
 2392 If Locator Reporting has been enabled by a DECELR, \fI\*(xt\fP will respond
 2393 with a DECLRP Locator Report.
 2394 This report is also generated on button
 2395 up and down events if they have been enabled with a DECSLE, or when
 2396 the locator is detected outside of a filter rectangle, if filter rectangles
 2397 have been enabled with a DECEFR.
 2398 .sP
 2399   \(<- \*(Cs\*(Pe\*s\*;\*(Pb\*s\*;\*(Pr\*s\*;\*(Pc\*s\*;\*(Pp\*s\*&\*s\*w
 2400 .sP
 2401 Parameters are [\fIevent\fP;\fIbutton\fP;\fIrow\fP;\fIcolumn\fP;\fIpage\fP].
 2402 .br
 2403 Valid values for the event:
 2404   \*(Pe = \*0 \(<- locator unavailable - no other parameters sent.
 2405   \*(Pe = \*1 \(<- request - \fI\*(xt\fP received a DECRQLP.
 2406   \*(Pe = \*2 \(<- left button down.
 2407   \*(Pe = \*3 \(<- left button up.
 2408   \*(Pe = \*4 \(<- middle button down.
 2409   \*(Pe = \*5 \(<- middle button up.
 2410   \*(Pe = \*6 \(<- right button down.
 2411   \*(Pe = \*7 \(<- right button up.
 2412   \*(Pe = \*8 \(<- M4 button down.
 2413   \*(Pe = \*9 \(<- M4 button up.
 2414   \*(Pe = \*1\*0 \(<- locator outside filter rectangle.
 2415 .br
 2416 The \*(``\fIbutton\fP\*('' parameter is a bitmask indicating
 2417 which buttons are pressed:
 2418   \*(Pb = \*0 \(<- no buttons down.
 2419   \*(Pb & \*1 \(<- right button down.
 2420   \*(Pb & \*2 \(<- middle button down.
 2421   \*(Pb & \*4 \(<- left button down.
 2422   \*(Pb & \*8 \(<- M4 button down.
 2423 .br
 2424 The \*(``\fIrow\fP\*('' and \*(``\fIcolumn\fP\*('' parameters
 2425 are the coordinates of the locator position in the \fI\*(xt\fP window,
 2426 encoded as ASCII decimal.
 2427 .br
 2428 The \*(``\fIpage\fP\*('' parameter is not used by \*(xt.
 2429 .iP
 2430 .IP \\*(Cs\\*(Ps\\*s\\**\\*|
 2431 Select number of lines per screen (DECSNLS), VT420 and up.
 2432 .iP
 2433 .IP \\*(Cs\\*#\\*}
 2434 Pop video attributes from stack (XTPOPSGR), \fI\*(xt\fP.
 2435 Popping restores the video-attributes which were saved using XTPUSHSGR
 2436 to their previous state.
 2437 .
 2438 .iP
 2439 .IP \\*(Cs\\*(Ps\\*s\\*(qu\\*}
 2440 Insert \*(Ps Column(s) (default = 1) (DECIC), VT420 and up.
 2441 .
 2442 .iP
 2443 .IP \\*(Cs\\*(Ps\\*s\\*$\\*}
 2444 Select active status display (DECSASD), VT320 and up.
 2445   \*(Ps = \*0 \(-> main (default)
 2446   \*(Ps = \*1 \(-> status line
 2447 .
 2448 .iP
 2449 .IP \\*(Cs\\*(Ps\\*s\\*(qu\\*~
 2450 Delete \*(Ps Column(s) (default = 1) (DECDC), VT420 and up.
 2451 .
 2452 .iP
 2453 .IP \\*(Cs\\*(Ps\\*s\\*$\\*~
 2454 Select status line type (DECSSDT), VT320 and up.
 2455   \*(Ps = \*0 \(-> none
 2456   \*(Ps = \*1 \(-> indicator (default)
 2457   \*(Ps = \*2 \(-> host-writable.
 2458 .
 2459 .Ed
 2460 .
 2461 .Ss Operating System Commands
 2462 .St
 2463 .
 2464 .IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(Be
 2465 .iP
 2466 .IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(ST
 2467 Set Text Parameters.
 2468 Some control sequences return information:
 2469 .RS
 2470 .bP
 2471 For colors and font,
 2472 if \*(Pt is a \*(``?\*('',
 2473 the control sequence elicits a response which consists
 2474 of the control sequence which would set the corresponding value.
 2475 .bP
 2476 The \fIdtterm\fP control sequences allow you to determine the icon name
 2477 and window title.
 2478 .RE
 2479 .sP
 2480 \*(XT accepts either \*(Be or \*(ST for terminating \*(Os sequences,
 2481 and when returning information, uses the same terminator used in a query.
 2482 While the latter is preferred,
 2483 the former is supported for legacy applications:
 2484 .RS
 2485 .bP
 2486 Although documented in the changes for X.V10R4 (December 1986),
 2487 \*(Be as a string terminator dates from X11R4 (December 1989).
 2488 .bP
 2489 Since XFree86-3.1.2Ee (August 1996), \*(xt has accepted \*(ST
 2490 (the documented string terminator in ECMA-48).
 2491 .RE
 2492 .sP
 2493 \*(Ps specifies the type of operation to perform:
 2494   \*(Ps = \*0 \(-> Change Icon Name and Window Title to \*(Pt.
 2495   \*(Ps = \*1 \(-> Change Icon Name to \*(Pt.
 2496   \*(Ps = \*2 \(-> Change Window Title to \*(Pt.
 2497   \*(Ps = \*3 \(-> Set X property on top-level window.
 2498 \*(Pt should be in the form
 2499 \*(``\fIprop=value\fP\*('', or just
 2500 \*(``\fIprop\fP\*('' to delete the property.
 2501   \*(Ps = \*4\*;\fIc\fP\*s\*;\fIspec\fP \(-> Change Color Number \fIc\fP to
 2502 the color specified by \fIspec\fP.
 2503 .sP
 2504 The \fIspec\fP can be a name or RGB specification as per \fIXParseColor\fP.
 2505 Any number of \fIc\fP/\fIspec\fP pairs may be given.
 2506 The color numbers correspond to the ANSI colors 0-7,
 2507 their bright versions 8-15,
 2508 and if supported, the remainder of the 88-color or 256-color table.
 2509 .sP
 2510 If a \*(``?\*('' is given rather than a name or RGB specification,
 2511 \fI\*(xt\fP replies with a control sequence of the same form which can be used
 2512 to set the corresponding color.
 2513 Because more than one pair of color number and specification can
 2514 be given in one control sequence, \fI\*(xt\fR can make more than one reply.
 2515 .sP
 2516   \*(Ps = \*5\*;\fIc\fP\*s\*;\fIspec\fP \(-> Change Special Color Number \fIc\fP to
 2517 the color specified by \fIspec\fP.
 2518 .sP
 2519 The \fIspec\fP parameter can be a name or RGB specification
 2520 as per \fIXParseColor\fP.
 2521 Any number of \fIc\fP/\fIspec\fP pairs may be given.
 2522 The special colors can also be set by adding the maximum number of colors
 2523 (e.g., 88 or 256)
 2524 to these codes in an \*(Os\*4 control:
 2525 .sP
 2526 .in +2n
 2527   \*(Pc = \*0 \(<- resource \fBcolorBD\fP (BOLD).
 2528   \*(Pc = \*1 \(<- resource \fBcolorUL\fP (UNDERLINE).
 2529   \*(Pc = \*2 \(<- resource \fBcolorBL\fP (BLINK).
 2530   \*(Pc = \*3 \(<- resource \fBcolorRV\fP (REVERSE).
 2531   \*(Pc = \*4 \(<- resource \fBcolorIT\fP (ITALIC).
 2532 .in -2n
 2533 .sP
 2534   \*(Ps = \*6\*;\fIc\fP\*s\*;\fIf\fP \(-> Enable/disable Special Color Number \fIc\fP.
 2535 The second parameter tells \fI\*(xt\fP to enable the corresponding color
 2536 mode if nonzero, disable it if zero.
 2537 \*(Os\*6 is the same as \*(Os\*1\*0\*6.
 2538 .sP
 2539 If no parameters are given, this control has no effect.
 2540 .sP
 2541 The 10 colors (below) which may be set or queried
 2542 using \*1\*0 through \*1\*9 are
 2543 denoted \fIdynamic colors\fR, since the corresponding control sequences
 2544 were the first means for setting \fI\*(xt\fR's colors dynamically,
 2545 i.e., after it was started.
 2546 They are not the same as the ANSI colors
 2547 (however, the dynamic text foreground and background colors
 2548 are used when ANSI colors are reset using SGR \*3\*9 and \*4\*9, respectively).
 2549 These controls may be disabled using the \fBallowColorOps\fP resource.
 2550 At least one parameter is expected for \*(Pt.
 2551 Each successive parameter changes the next color in the list.
 2552 The value of \*(Ps tells the starting point in the list.
 2553 The colors are specified by name or RGB specification as per \fIXParseColor\fP.
 2554 .sP
 2555 If a \*(``?\*('' is given rather than a name or RGB specification,
 2556 \fI\*(xt\fP replies with a control sequence of the same form which can be used
 2557 to set the corresponding dynamic color.
 2558 Because more than one pair of color number and specification can
 2559 be given in one control sequence, \fI\*(xt\fR can make more than one reply.
 2560 .sP
 2561   \*(Ps = \*1\*0 \(-> Change VT100 text foreground color to \*(Pt.
 2562   \*(Ps = \*1\*1 \(-> Change VT100 text background color to \*(Pt.
 2563   \*(Ps = \*1\*2 \(-> Change text cursor color to \*(Pt.
 2564   \*(Ps = \*1\*3 \(-> Change pointer foreground color to \*(Pt.
 2565   \*(Ps = \*1\*4 \(-> Change pointer background color to \*(Pt.
 2566   \*(Ps = \*1\*5 \(-> Change Tektronix foreground color to \*(Pt.
 2567   \*(Ps = \*1\*6 \(-> Change Tektronix background color to \*(Pt.
 2568   \*(Ps = \*1\*7 \(-> Change highlight background color to \*(Pt.
 2569   \*(Ps = \*1\*8 \(-> Change Tektronix cursor color to \*(Pt.
 2570   \*(Ps = \*1\*9 \(-> Change highlight foreground color to \*(Pt.
 2571 .sp
 2572   \*(Ps = \*2\*2 \(-> Change pointer cursor to \*(Pt.
 2573 .sP
 2574   \*(Ps = \*4\*6 \(-> Change Log File to \*(Pt.
 2575 This is normally disabled by a compile-time option.
 2576 .sP
 2577   \*(Ps = \*5\*0 \(-> Set Font to \*(Pt.
 2578 These controls may be disabled using the \fBallowFontOps\fP resource.
 2579 If \*(Pt begins with a \*(``#\*('', index in the font menu, relative (if the
 2580 next character is a plus or minus sign) or absolute.
 2581 A number is
 2582 expected but not required after the sign (the default is the current
 2583 entry for relative, zero for absolute indexing).
 2584 .sP
 2585 The same rule (plus or minus sign, optional number) is used when
 2586 querying the font.
 2587 The remainder of \*(Pt is ignored.
 2588 .sP
 2589 A font can be specified after a \*(``#\*('' index expression,
 2590 by adding a space and then the font specifier.
 2591 .sP
 2592 If the \fBTrueType Fonts\fP menu entry is set (the \fBrenderFont\fP resource),
 2593 then this control sets/queries the \fBfaceName\fP resource.
 2594 .sP
 2595   \*(Ps = \*5\*1 \(-> reserved for Emacs shell.
 2596 .sP
 2597   \*(Ps = \*5\*2 \(-> Manipulate Selection Data.
 2598 These controls may be disabled using the \fBallowWindowOps\fP resource.
 2599 The parameter \*(Pt is parsed as
 2600 .br
 2601     \*(Pc\*s\*;\*(Pd
 2602 .sP
 2603 The first, \*(Pc, may contain zero or more characters from the
 2604 set \*c, \*p, \*q, \*(cs, \*0, \*1, \*2, \*3, \*4, \*5, \*6, and \*7.
 2605 It is used to construct a list of selection parameters for
 2606 clipboard,
 2607 primary,
 2608 secondary,
 2609 select,
 2610 or cut-buffers 0 through 7 respectively,
 2611 in the order given.
 2612 If the parameter is empty, \fI\*(xt\fP uses \*(cs\*0,
 2613 to specify the configurable primary/clipboard selection and cut-buffer 0.
 2614 .sP
 2615 The second parameter, \*(Pd, gives the selection data.
 2616 Normally this is a string encoded in base64 (RFC-4648).
 2617 The data becomes the new selection,
 2618 which is then available for pasting by other applications.
 2619 .sP
 2620 If the second parameter is a \*?,
 2621 \fI\*(xt\fP replies to the host with the selection
 2622 data encoded using the same protocol.
 2623 It uses the first selection
 2624 found by asking successively
 2625 for each item from the list of selection parameters.
 2626 .sP
 2627 If the second parameter is neither a base64 string nor \*?,
 2628 then the selection is cleared.
 2629 .sP
 2630   \*(Ps = \*6\*0 \(-> Query allowed features (XTQALLOWED).
 2631 \fI\*(XT\fP replies with
 2632 .sP
 2633   \*(Os\*6\*0\*s\*;\*(Pt\*s\*(ST
 2634 .sP
 2635 where \*(Pt is a comma-separated list
 2636 of the \fIallowed\fP optional runtime features,
 2637 i.e., zero or more of these resource names:
 2638 .iP
 2639   \fBallowColorOps\fR
 2640   \fBallowFontOps\fR
 2641   \fBallowMouseOps\fR
 2642   \fBallowPasteControls\fR
 2643   \fBallowTcapOps\fR
 2644   \fBallowTitleOps\fR
 2645   \fBallowWindowOps\fR
 2646 .sP
 2647   \*(Ps = \*6\*1 \(-> Query disallowed features (XTQDISALLOWED).
 2648 The second parameter (i.e., the main feature)
 2649 must be one of the resource names returned by \*(Os\*6\*0.
 2650 \fI\*(XT\fP replies with
 2651 .sP
 2652   \*(Os\*6\*1\*s\*;\*(Pt\*s\*(ST
 2653 .sP
 2654 where \*(Pt is a comma-separated list
 2655 of the optional runtime features which would be disallowed
 2656 if the main feature is disabled.
 2657 .sP
 2658   \*(Ps = \*1\*0\*4\*;\fIc\fP \(-> Reset Color Number \fIc\fP.  It is reset to
 2659 the color specified by the corresponding X resource.
 2660 Any number of \fIc\fP parameters may be given.
 2661 These parameters correspond to the ANSI colors 0-7,
 2662 their bright versions 8-15,
 2663 and if supported, the remainder of the 88-color or 256-color table.
 2664 If no parameters are given, the entire table will be reset.
 2665 .sP
 2666   \*(Ps = \*1\*0\*5\*;\fIc\fP \(-> Reset Special Color Number \fIc\fP.
 2667 It is reset to the color specified by the corresponding X resource.
 2668 Any number of \fIc\fP parameters may be given.
 2669 These parameters correspond to the special colors which can be set
 2670 using an \*(Os\*5 control (or by adding the maximum number of colors
 2671 using an \*(Os\*4 control).
 2672 .sP
 2673 If no parameters are given, all special colors will be reset.
 2674 .sP
 2675   \*(Ps = \*1\*0\*6\*;\fIc\fP\*s\*;\fIf\fP \(-> Enable/disable Special Color Number \fIc\fP.
 2676 The second parameter tells \fI\*(xt\fP to enable the corresponding color
 2677 mode if nonzero, disable it if zero.
 2678 .sP
 2679 .in +2n
 2680   \*(Pc = \*0 \(<- resource \fBcolorBDMode\fP (BOLD).
 2681   \*(Pc = \*1 \(<- resource \fBcolorULMode\fP (UNDERLINE).
 2682   \*(Pc = \*2 \(<- resource \fBcolorBLMode\fP (BLINK).
 2683   \*(Pc = \*3 \(<- resource \fBcolorRVMode\fP (REVERSE).
 2684   \*(Pc = \*4 \(<- resource \fBcolorITMode\fP (ITALIC).
 2685   \*(Pc = \*5 \(<- resource \fBcolorAttrMode\fP (Override ANSI).
 2686 .in -2n
 2687 .sP
 2688 If no parameters are given, this control has no effect.
 2689 .sP
 2690 The \fIdynamic colors\fR can also be reset to their default (resource) values:
 2691   \*(Ps = \*1\*1\*0 \(-> Reset VT100 text foreground color.
 2692   \*(Ps = \*1\*1\*1 \(-> Reset VT100 text background color.
 2693   \*(Ps = \*1\*1\*2 \(-> Reset text cursor color.
 2694   \*(Ps = \*1\*1\*3 \(-> Reset pointer foreground color.
 2695   \*(Ps = \*1\*1\*4 \(-> Reset pointer background color.
 2696   \*(Ps = \*1\*1\*5 \(-> Reset Tektronix foreground color.
 2697   \*(Ps = \*1\*1\*6 \(-> Reset Tektronix background color.
 2698   \*(Ps = \*1\*1\*7 \(-> Reset highlight color.
 2699   \*(Ps = \*1\*1\*8 \(-> Reset Tektronix cursor color.
 2700   \*(Ps = \*1\*1\*9 \(-> Reset highlight foreground color.
 2701 .sP
 2702   \*(Ps = \*I\*s\*;\fIc\fP \(-> Set icon to file.
 2703 Sun shelltool, CDE dtterm.
 2704 .br
 2705 The file is expected to be XPM format,
 2706 and uses the same search logic as the \fBiconHint\fP resource.
 2707 .sP
 2708   \*(Ps = \*l\*s\*;\fIc\fP \(-> Set window title.
 2709 Sun shelltool, CDE dtterm.
 2710 .sP
 2711   \*(Ps = \*L\*s\*;\fIc\fP \(-> Set icon label.
 2712 Sun shelltool, CDE dtterm.
 2713 .Ed
 2714 .
 2715 .Ss Privacy Message
 2716 .St
 2717 .IP \\*(PM\\*(Pt\\*s\\*(ST
 2718 \fI\*(xt\fP implements no \*(PM functions; \*(Pt is ignored.
 2719 \*(Pt need not be printable characters.
 2720 .Ed
 2721 .
 2722 .Sh "Special Keyboard Keys"
 2723 .LP
 2724 Terminal keyboards have two types of keys:
 2725 .bP
 2726 ordinary keys, which you would use as data,
 2727 e.g., in a text file, and
 2728 .bP
 2729 special keys, which you would use to tell \fI\*(xt\fP to perform some action.
 2730 .LP
 2731 \fI\*(XT\fP detects all of these keys via X key-press and key-release events.
 2732 It uses the \fBtranslations\fP resource to decide what to do with these events.
 2733 .bP
 2734 Ordinary keys are handled with the
 2735 \fBinsert-seven-bit\fP or
 2736 \fBinsert-eight-bit\fP action.
 2737 .bP
 2738 Special keys may be handled with other resources.
 2739 However, \fI\*(xt\fP also has built-in logic to map commonly-used
 2740 special keys into characters which your keypress sends to the application
 2741 running in \fI\*(xt\fP.
 2742 .LP
 2743 Special keyboard keys send control characters or escape sequences.
 2744 This is a convention,
 2745 making it convenient for applications to detect these keys,
 2746 rather than a standard.
 2747 .Ss "Alt and Meta Keys"
 2748 .LP
 2749 Many keyboards have keys labeled \*(``Alt\*(''.
 2750 Few have keys labeled \*(``Meta\*(''.
 2751 However, \fI\*(xt\fP's default translations use the \fIMeta\fP modifier.
 2752 Common keyboard configurations assign the \fIMeta\fP modifier
 2753 to an \*(``Alt\*('' key.
 2754 By using \fIxmodmap\fP one may have the modifier assigned to a different key,
 2755 and have \*(``real\*('' alt and meta keys.
 2756 Here is an example:
 2757 .ID
 2758 .ft CW
 2759 ! put meta on mod3 to distinguish it from alt
 2760 keycode 64 = Alt_L
 2761 clear mod1
 2762 add mod1 = Alt_L
 2763 keycode 115 = Meta_L
 2764 clear mod3
 2765 add mod3 = Meta_L
 2766 .ft 1
 2767 .DE
 2768 .LP
 2769 The \fBmetaSendsEscape\fP resource
 2770 (and \fBaltSendsEscape\fP if \fBaltIsNotMeta\fP is set)
 2771 can be used to control the way the \fIMeta\fP modifier applies to ordinary
 2772 keys unless the \fBmodifyOtherKeys\fP resource is set:
 2773 .bP
 2774 prefix a key with the \*(Es character.
 2775 .bP
 2776 shift the key from codes 0-127 to 128-255 by adding 128.
 2777 .LP
 2778 When \fBmodifyOtherKeys\fP is set,
 2779 ordinary keys may be sent as escape sequences:
 2780 .bP
 2781 When \fBmodifyOtherKeys\fP is set to 1,
 2782 only the alt- and meta-modifiers apply.
 2783 For example, \fIalt-Tab\fP sends
 2784 \*(Cs\*2\*7\*;\*3\*;\*9\*~
 2785 (the second parameter is \*(``3\*('' for \fIalt\fP,
 2786 and the third parameter is the ASCII value of tab, \*(``9\*('').
 2787 .bP
 2788 When \fBmodifyOtherKeys\fP is set to 2,
 2789 all of the modifiers apply.
 2790 For example, \fIshift-Tab\fP sends
 2791 \*(Cs\*2\*7\*;\*2\*;\*9\*~
 2792 rather than
 2793 \*(Cs\*Z
 2794 (the second parameter is \*(``2\*('' for \fIshift\fP).
 2795 .LP
 2796 The \fBformatOtherKeys\fP resource tells \fI\*n\fP to change the
 2797 format of the escape sequences sent when \fBmodifyOtherKeys\fP applies.
 2798 When \fBmodifyOtherKeys\fP is set to 1,
 2799 for example \fIalt-Tab\fP sends
 2800 \*(Cs\*9\*;\*3\*u
 2801 (changing the order of parameters).
 2802 One drawback to this format is that applications may confuse it with
 2803 \*(Cs\*u (restore-cursor).
 2804 .LP
 2805 The \fI\*(xt\fP FAQ sections
 2806 .br
 2807 .ID 3
 2808 .\" https://invisible-island.net/xterm/xterm.faq.html#xterm_modother
 2809 \fIHow can my program distinguish control-I from tab?\fP
 2810 .ID 3
 2811 .\" https://invisible-island.net/xterm/modified-keys.html
 2812 \fIXTerm - \*(``Other\*('' Modified Keys\fP
 2813 .DE
 2814 .br
 2815 go into greater detail on this topic.
 2816 .LP
 2817 The table shows the result for a given character \*(``x\*('' with modifiers
 2818 according to the default translations with the resources set on or off.
 2819 This assumes \fBaltIsNotMeta\fP is set:
 2820 .\" page-eject to work around grohtml bugs
 2821 .if t .bp
 2822 .TS H
 2823 center;
 2824 lf3w(2c)    lf3w(2c)    lf3w(2c)    lf3w(2c) .
 2825 .TH
 2826 .T&
 2827 l | l | l | l .
 2828 key altSendsEscape  metaSendsEscape result
 2829 _
 2830 x   off off x
 2831 Meta-x  off off shift
 2832 Alt-x   off off shift
 2833 Alt+Meta-x  off off shift
 2834 x   ON  off x
 2835 Meta-x  ON  off shift
 2836 Alt-x   ON  off \*(Es x
 2837 Alt+Meta-x  ON  off \*(Es shift
 2838 x   off ON  x
 2839 Meta-x  off ON  \*(Es x
 2840 Alt-x   off ON  shift
 2841 Alt+Meta-x  off ON  \*(Es shift
 2842 x   ON  ON  x
 2843 Meta-x  ON  ON  \*(Es x
 2844 Alt-x   ON  ON  \*(Es x
 2845 Alt+Meta-x  ON  ON  \*(Es x
 2846 _
 2847 .TE
 2848 .Ss "PC-Style Function Keys"
 2849 .LP
 2850 If \fI\*(xt\fP does minimal translation of the function keys,
 2851 it usually does this
 2852 with a PC-style keyboard, so PC-style function keys result.
 2853 Sun keyboards are similar to PC keyboards.
 2854 Both have cursor and scrolling operations printed on the keypad,
 2855 which duplicate the smaller cursor and scrolling keypads.
 2856 .LP
 2857 X does not predefine NumLock (used for VT220 keyboards) or Alt (used as
 2858 an extension for the Sun/PC keyboards) as modifiers.
 2859 These keys are recognized as modifiers when enabled
 2860 by the \fBnumLock\fP resource,
 2861 or by the \*(``DECSET \*1\*0\*3\*5\*('' control sequence.
 2862 .LP
 2863 The cursor keys transmit the following escape sequences depending on the
 2864 mode specified via the DECCKM escape sequence.
 2865 .TS H
 2866 center;
 2867 lf3w(2c)    lf3w(2c)    lf3w(2c) .
 2868 Key Normal  Application
 2869 _
 2870 .TH
 2871 .T&
 2872 l | l | l .
 2873 Cursor Up   \*(Cs\*A    \*(S3\*A
 2874 Cursor Down \*(Cs\*(cB  \*(S3\*(cB
 2875 Cursor Right    \*(Cs\*C    \*(S3\*C
 2876 Cursor Left \*(Cs\*D    \*(S3\*D
 2877 _
 2878 .TE
 2879 The home- and end-keys
 2880 (unlike PageUp and other keys also on the 6-key editing keypad)
 2881 are considered \*(``cursor keys\*('' by \fI\*(xt\fP.
 2882 Their mode is also controlled by the DECCKM escape sequence:
 2883 .TS H
 2884 center;
 2885 lf3w(2c)    lf3w(2c)    lf3w(2c) .
 2886 Key Normal  Application
 2887 _
 2888 .TH
 2889 .T&
 2890 l | l | l .
 2891 Home    \*(Cs\*H    \*(S3\*H
 2892 End \*(Cs\*F    \*(S3\*F
 2893 _
 2894 .TE
 2895 .LP
 2896 The application keypad transmits the following escape sequences depending on the
 2897 mode specified via the DECKPNM and DECKPAM escape sequences.
 2898 Use the NumLock key to override the application mode.
 2899 .LP
 2900 Not all keys are present on the Sun/PC keypad (e.g., PF1, Tab),
 2901 but are supported by
 2902 the program.
 2903 .TS H
 2904 center;
 2905 lf3w(2c)    lf3w(2c)    lf3w(2c)    lf3w(2c)    lf3w(2c) .
 2906 Key Numeric Application Terminfo    Termcap
 2907 _
 2908 .TH
 2909 .T&
 2910 l | l | l | l | l .
 2911 Space   \*(Sp   \*(S3\*(Sp  -   -
 2912 Tab \*(Ta   \*(S3\*I    -   -
 2913 Enter   \*(Cr   \*(S3\*M    kent    @8
 2914 PF1 \*(S3\*P    \*(S3\*P    kf1 k1
 2915 PF2 \*(S3\*Q    \*(S3\*Q    kf2 k2
 2916 PF3 \*(S3\*R    \*(S3\*R    kf3 k3
 2917 PF4 \*(S3\*S    \*(S3\*S    kf4 k4
 2918 * \f1(multiply)\fP  \** \*(S3\*j    -   -
 2919 + \f1(add)\fP   \*+ \*(S3\*k    -   -
 2920 , \f1(comma)\fP \*, \*(S3\*l    -   -
 2921 - \f1(minus)\fP \*- \*(S3\*m    -   -
 2922 \&. \f1(Delete)\fP  \*. \*(Cs\*3\*~ -   -
 2923 / \f1(divide)\fP    \*/ \*(S3\*o    -   -
 2924 0 \f1(Insert)\fP    \*0 \*(Cs\*2\*~ -   -
 2925 1 \f1(End)\fP   \*1 \*(S3\*F    kc1 K4
 2926 2 \f1(DownArrow)\fP \*2 \*(Cs\*(cB  -   -
 2927 3 \f1(PageDown)\fP  \*3 \*(Cs\*6\*~ kc3 K5
 2928 4 \f1(LeftArrow)\fP \*4 \*(Cs\*D    -   -
 2929 5 \f1(Begin)\fP \*5 \*(Cs\*E    kb2 K2
 2930 6 \f1(RightArrow)\fP    \*6 \*(Cs\*C    -   -
 2931 7 \f1(Home)\fP  \*7 \*(S3\*H    ka1 K1
 2932 8 \f1(UpArrow)\fP   \*8 \*(Cs\*A    -   -
 2933 9 \f1(PageUp)\fP    \*9 \*(Cs\*5\*~ ka3 K3
 2934 = (equal)   \*= \*(S3\*(XX  -   -
 2935 _
 2936 .TE
 2937 .br
 2938 They also provide 12 function keys, as well as a few other special-purpose keys:
 2939 .TS H
 2940 center;
 2941 lf3w(2c)    lf3w(2c) .
 2942 Key Escape Sequence
 2943 _
 2944 .TH
 2945 .T&
 2946 l | l .
 2947 F1  \*(S3\*P
 2948 F2  \*(S3\*Q
 2949 F3  \*(S3\*R
 2950 F4  \*(S3\*S
 2951 F5  \*(Cs\*1\*5\*~
 2952 F6  \*(Cs\*1\*7\*~
 2953 F7  \*(Cs\*1\*8\*~
 2954 F8  \*(Cs\*1\*9\*~
 2955 F9  \*(Cs\*2\*0\*~
 2956 F10 \*(Cs\*2\*1\*~
 2957 F11 \*(Cs\*2\*3\*~
 2958 F12 \*(Cs\*2\*4\*~
 2959 _
 2960 .TE
 2961 .sP
 2962 Note that F1 through F4 are prefixed with \*(S3,
 2963 while the other keys are prefixed with \*(Cs.
 2964 Older versions of \fI\*(xt\fP implement different escape sequences
 2965 for F1 through F4, with a \*(Cs prefix.
 2966 These can be activated by setting the \fBoldXtermFKeys\fP resource.
 2967 However, since they do not correspond to any hardware terminal,
 2968 they have been deprecated.
 2969 (The DEC VT220 reserves F1 through F5 for local functions such as \fISetup\fP).
 2970 .TS H
 2971 center;
 2972 lf3w(2c)    lf3w(2c) .
 2973 Key Escape Sequence
 2974 _
 2975 .TH
 2976 .T&
 2977 l | l .
 2978 F1  \*(Cs\*1\*1\*~
 2979 F2  \*(Cs\*1\*2\*~
 2980 F3  \*(Cs\*1\*3\*~
 2981 F4  \*(Cs\*1\*4\*~
 2982 _
 2983 .TE
 2984 In normal mode, i.e., a Sun/PC keyboard
 2985 when the \fBsunKeyboard\fP resource is false
 2986 (and none of the other keyboard resources
 2987 such as \fBoldXtermFKeys\fP resource is set),
 2988 \fI\*(xt\fP encodes function key modifiers
 2989 as parameters appended before the \fIfinal\fP character of the control sequence.
 2990 As a special case,
 2991 the \*(S3 sent before F1 through F4 is altered to \*(Cs when sending
 2992 a function key modifier as a parameter.
 2993 .TS H
 2994 center;
 2995 cf3w(2c)    lf3w(2c) .
 2996 Code    Modifiers
 2997 _
 2998 .TH
 2999 .T&
 3000 c | l .
 3001 2   Shift
 3002 3   Alt
 3003 4   Shift + Alt
 3004 5   Control
 3005 6   Shift + Control
 3006 7   Alt + Control
 3007 8   Shift + Alt + Control
 3008 9   Meta
 3009 10  Meta + Shift
 3010 11  Meta + Alt
 3011 12  Meta + Alt + Shift
 3012 13  Meta + Ctrl
 3013 14  Meta + Ctrl + Shift
 3014 15  Meta + Ctrl + Alt
 3015 16  Meta + Ctrl + Alt + Shift
 3016 _
 3017 .TE
 3018 For example, shift-F5 would be sent as
 3019 \*(Cs\*1\*5\*;\*2\*~
 3020 .LP
 3021 If the \fBalwaysUseMods\fP resource is set, the Meta modifier also is
 3022 recognized, making parameters 9 through 16.
 3023 .LP
 3024 The codes used for the \fIPC-style function keys\fP were inspired
 3025 by a feature of the VT510, referred to in its reference manual as DECFNK.
 3026 In the DECFNK scheme, codes 2-8 identify modifiers for function-keys
 3027 and cursor-, editing-keypad keys.
 3028 Unlike \fI\*(xt\fP, the VT510 limits the modifiers which can be used
 3029 with cursor- and editing-keypad keys.
 3030 Although the name \*(``DECFNK\*('' implies that it is a mode,
 3031 the VT510 manual mentions it only as a feature,
 3032 which (like \fI\*(xt\fP) interacts with the DECUDK feature.
 3033 Unlike \fI\*(xt\fP, VT510/VT520 provide an extension to DECUDK
 3034 (DECPFK and DECPAK)
 3035 which apparently was the reason for the feature in those terminals,
 3036 i.e., for identifying a programmable key
 3037 rather than making it simple for applications to obtain modifier information.
 3038 It is not described in the related VT520 manual.
 3039 Neither manual was readily available
 3040 at the time the feature was added to \fI\*(xt\fP.
 3041 .LP
 3042 On the other hand, the VT510 and VT520 reference manuals
 3043 do document a related feature.
 3044 That is its emulation of the SCO console,
 3045 which is similar to the \*(``xterm-sco\*('' terminal description.
 3046 The SCO console function-keys are less useful to
 3047 applications developers than the approach used by \fI\*(xt\fP because
 3048 .bP
 3049 the relationship between modifiers and the characters sent by function-keys
 3050 is not readily apparent, and
 3051 .bP
 3052 the scheme is not extensible, i.e., it is an \fIad hoc\fP
 3053 assignment limited to two modifiers (\fIshift\fP and \fIcontrol\fP).
 3054 .Ss "VT220-Style Function Keys"
 3055 .LP
 3056 However, \fI\*(xt\fP is most useful as a DEC VT102 or VT220 emulator.
 3057 Set the \fBsunKeyboard\fP resource to true to force a Sun/PC keyboard
 3058 to act like a VT220 keyboard.
 3059 .LP
 3060 The VT102/VT220 application keypad transmits unique escape sequences in
 3061 application mode, which are distinct from the cursor and scrolling keypad:
 3062 .TS H
 3063 center;
 3064 lf3w(2c)    lf3w(2c)    lf3w(2c)    lf3w(2c) .
 3065 Key Numeric Application VT100?
 3066 _
 3067 .TH
 3068 .T&
 3069 l | l | l | l .
 3070 Space   \*(Sp   \*(S3\*(Sp  no
 3071 Tab \*(Ta   \*(S3\*I    no
 3072 Enter   \*(Cr   \*(S3\*M    yes
 3073 PF1 \*(S3\*P    \*(S3\*P    yes
 3074 PF2 \*(S3\*Q    \*(S3\*Q    yes
 3075 PF3 \*(S3\*R    \*(S3\*R    yes
 3076 PF4 \*(S3\*S    \*(S3\*S    yes
 3077 * \f1(multiply)\fP  \** \*(S3\*j    no
 3078 + \f1(add)\fP   \*+ \*(S3\*k    no
 3079 , \f1(comma)\fP \*, \*(S3\*l    yes
 3080 - \f1(minus)\fP \*- \*(S3\*m    yes
 3081 \&. \f1(period)\fP  \*. \*(S3\*n    yes
 3082 / \f1(divide)\fP    \*/ \*(S3\*o    no
 3083 0   \*0 \*(S3\*p    yes
 3084 1   \*1 \*(S3\*q    yes
 3085 2   \*2 \*(S3\*r    yes
 3086 3   \*3 \*(S3\*(cs  yes
 3087 4   \*4 \*(S3\*t    yes
 3088 5   \*5 \*(S3\*u    yes
 3089 6   \*6 \*(S3\*v    yes
 3090 7   \*7 \*(S3\*w    yes
 3091 8   \*8 \*(S3\*x    yes
 3092 9   \*9 \*(S3\*y    yes
 3093 = (equal)   \*= \*(S3\*(XX  no
 3094 _
 3095 .TE
 3096 .LP
 3097 The VT100/VT220 keypad did not have all of those keys.
 3098 They were implemented in \fI\*(xt\fP in X11R1 (1987),
 3099 defining a mapping of all X11 keys which might be provided on a keypad.
 3100 For instance, a Sun4/II type-4 keyboard provided
 3101 \*(``=\*('' (equal),
 3102 \*(``/\*('' (divide), and
 3103 \*(``*\*('' (multiply).
 3104 .LP
 3105 While the VT420 provided the same keypad,
 3106 the VT520 used a PC-keyboard.
 3107 Because that keyboard's keypad lacks the \*(``,\*('' (comma),
 3108 it was not possible to use EDT's delete-character function with the keypad.
 3109 \fI\*(XT\fP solves that problem for the VT220-keyboard configuration
 3110 by mapping
 3111 .sP
 3112   \fICtrl\fP \*+ to \*, and
 3113   \fICtrl\fP \*- to \*-
 3114 .LP
 3115 The VT220 provides a 6-key editing keypad,
 3116 which is analogous to that on the PC keyboard.
 3117 It is not affected by DECCKM or DECKPNM/DECKPAM:
 3118 .TS H
 3119 center;
 3120 lf3w(2c)    lf3w(2c)    lf3w(2c) .
 3121 Key Normal  Application
 3122 _
 3123 .TH
 3124 .T&
 3125 l | l | l .
 3126 \f1Insert\fP    \*(Cs\*2\*~ \*(Cs\*2\*~
 3127 \f1Delete\fP    \*(Cs\*3\*~ \*(Cs\*3\*~
 3128 \f1Home\fP  \*(Cs\*1\*~ \*(Cs\*1\*~
 3129 \f1End\fP   \*(Cs\*4\*~ \*(Cs\*4\*~
 3130 \f1PageUp\fP    \*(Cs\*5\*~ \*(Cs\*5\*~
 3131 \f1PageDown\fP  \*(Cs\*6\*~ \*(Cs\*6\*~
 3132 _
 3133 .TE
 3134 .LP
 3135 The VT220 provides 8 additional function keys.
 3136 With a Sun/PC keyboard, access these keys by Control/F1 for F13, etc.
 3137 .TS H
 3138 center;
 3139 lf3w(2c)    lf3w(2c) .
 3140 Key Escape Sequence
 3141 _
 3142 .TH
 3143 .T&
 3144 l | l .
 3145 F13 \*(Cs\*2\*5\*~
 3146 F14 \*(Cs\*2\*6\*~
 3147 F15 \*(Cs\*2\*8\*~
 3148 F16 \*(Cs\*2\*9\*~
 3149 F17 \*(Cs\*3\*1\*~
 3150 F18 \*(Cs\*3\*2\*~
 3151 F19 \*(Cs\*3\*3\*~
 3152 F20 \*(Cs\*3\*4\*~
 3153 _
 3154 .TE
 3155 .Ss "VT52-Style Function Keys"
 3156 .LP
 3157 A VT52 does not have function keys,
 3158 but it does have a numeric keypad and cursor keys.
 3159 They differ from the other emulations by the prefix.
 3160 Also, the cursor keys do not change:
 3161 .TS H
 3162 center;
 3163 lf3w(2c)    lf3w(2c) .
 3164 Key Normal/Application
 3165 _
 3166 .TH
 3167 .T&
 3168 l | l .
 3169 Cursor Up   \*(Es\*A
 3170 Cursor Down \*(Es\*(cB
 3171 Cursor Right    \*(Es\*C
 3172 Cursor Left \*(Es\*D
 3173 _
 3174 .TE
 3175 The keypad is similar:
 3176 .TS H
 3177 center;
 3178 lf3w(2c)    lf3w(2c)    lf3w(2c)    lf3w(2c) .
 3179 Key Numeric Application VT52?
 3180 _
 3181 .TH
 3182 .T&
 3183 l | l | l | l .
 3184 Space   \*(Sp   \*(Es\*?\*(Sp   no
 3185 Tab \*(Ta   \*(Es\*?\*I no
 3186 Enter   \*(Cr   \*(Es\*?\*M no
 3187 PF1 \*(Es\*P    \*(Es\*P    yes
 3188 PF2 \*(Es\*Q    \*(Es\*Q    yes
 3189 PF3 \*(Es\*R    \*(Es\*R    yes
 3190 PF4 \*(Es\*S    \*(Es\*S    no
 3191 * \f1(multiply)\fP  \** \*(Es\*?\*j no
 3192 + \f1(add)\fP   \*+ \*(Es\*?\*k no
 3193 , \f1(comma)\fP \*, \*(Es\*?\*l no
 3194 - \f1(minus)\fP \*- \*(Es\*?\*m no
 3195 \&. \f1(period)\fP  \*. \*(Es\*?\*n yes
 3196 / \f1(divide)\fP    \*/ \*(Es\*?\*o no
 3197 0   \*0 \*(Es\*?\*p yes
 3198 1   \*1 \*(Es\*?\*q yes
 3199 2   \*2 \*(Es\*?\*r yes
 3200 3   \*3 \*(Es\*?\*(cs   yes
 3201 4   \*4 \*(Es\*?\*t yes
 3202 5   \*5 \*(Es\*?\*u yes
 3203 6   \*6 \*(Es\*?\*v yes
 3204 7   \*7 \*(Es\*?\*w yes
 3205 8   \*8 \*(Es\*?\*x yes
 3206 9   \*9 \*(Es\*?\*y yes
 3207 = (equal)   \*= \*(Es\*?\*(XX   no
 3208 _
 3209 .TE
 3210 .Ss "Sun-Style Function Keys"
 3211 .LP
 3212 The \fI\*(xt\fP program provides support for Sun keyboards more directly, by
 3213 a menu toggle that causes it to send Sun-style function key codes
 3214 rather than VT220.
 3215 Note, however, that the \fIsun\fP and \fIVT100\fP emulations are not really
 3216 compatible.
 3217 For example, their wrap-margin behavior differs.
 3218 .LP
 3219 Only function keys are altered; keypad and cursor keys are the same.
 3220 The emulation responds identically.
 3221 See the xterm-sun terminfo entry for details.
 3222 .Ss "HP-Style Function Keys"
 3223 .LP
 3224 Similarly, \fI\*(xt\fP can be compiled to support HP keyboards.
 3225 See the xterm-hp terminfo entry for details.
 3226 .Ss "Non-Function Keys"
 3227 .LP
 3228 On a DEC terminal keyboard, some of the keys which one would expect
 3229 to see labeled as function keys had special names.
 3230 The keys actually send character sequences as if they were the
 3231 expected function keys, but the special names are used in documentation.
 3232 Because other keyboards may use those names,
 3233 \fI\*(xt\fP maps the X key symbols which have the corresponding names
 3234 into the character sequences which the original DEC keyboard would send.
 3235 .LP
 3236 These mappings are used for the DEC (VT220) and other keyboards:
 3237 .TS H
 3238 center;
 3239 lf3w(2c)    lf3w(2c)    lf3w(2c)    lf3w(2c)    lf3w(2c) .
 3240 Label   DEC SUN HP  SCO
 3241 _
 3242 .TH
 3243 .T&
 3244 l | l | l | l | l .
 3245 Up  \*(S3\*A    \*(S3\*A    \*(Es\*A    \*(Cs\*A
 3246 Down    \*(S3\*(cB  \*(S3\*(cB  \*(Es\*(cB  \*(Cs\*(cB
 3247 Right   \*(S3\*C    \*(S3\*C    \*(Es\*C    \*(Cs\*C
 3248 Left    \*(S3\*D    \*(S3\*D    \*(Es\*D    \*(Cs\*D
 3249 Clear   -   -   \*(Es\*J    -
 3250 Find    \*(Cs\*1\*~ \*(Cs\*1\*z \*(Es\*h    -
 3251 Insert  \*(Cs\*2\*~ \*(Cs\*2\*z \*(Es\*Q    \*(Cs\*L
 3252 Delete  \*(Cs\*3\*~ \*(Cs\*3\*z \*(Es\*P    -
 3253 Keypad Insert   \*(Cs\*2\*~ \*(Cs\*2\*z \*(Es\*Q    \*(Cs\*L
 3254 Keypad Delete   \*(Cs\*3\*~ \*(Cs\*3\*z \*(Es\*P    -
 3255 Remove  \*(Cs\*3\*~ \*(Cs\*3\*z \*(Es\*P    -
 3256 Select  \*(Cs\*4\*~ \*(Cs\*4\*z \*(Es\*F    -
 3257 Prior   \*(Cs\*5\*~ \*(Cs\*2\*1\*6\*z   \*(Es\*T    \*(Cs\*I
 3258 Next    \*(Cs\*6\*~ \*(Cs\*2\*2\*2\*z   \*(Es\*S    \*(Cs\*G
 3259 Help    \*(Cs\*2\*8\*~  \*(Cs\*1\*9\*6\*z   -   -
 3260 Menu    \*(Cs\*2\*9\*~  \*(Cs\*1\*9\*7\*z   -   -
 3261 Home    -   \*(Cs\*2\*1\*4\*z   \*(Es\*h    \*(Cs\*H
 3262 End -   \*(Cs\*2\*2\*0\*z   \*(Es\*F    \*(Cs\*F
 3263 Begin   -   \*(Cs\*2\*1\*8\*z   -   \*(Cs\*E
 3264 _
 3265 .TE
 3266 .Sh "The Alternate Screen Buffer"
 3267 .LP
 3268 \fI\*(XT\fP maintains two screen buffers.
 3269 The Normal Screen Buffer allows you to scroll back to view saved lines
 3270 of output up to the maximum set by the \fBsaveLines\fP resource.
 3271 The \fIAlternate Screen Buffer\fP is exactly as large as the display,
 3272 contains no additional saved lines.
 3273 When the \fIAlternate Screen Buffer\fP is active,
 3274 you cannot scroll back to view saved lines.
 3275 \fI\*(XT\fP provides control sequences and menu entries
 3276 for switching between the two.
 3277 .LP
 3278 Most full-screen applications use terminfo or termcap to obtain
 3279 strings used to start/stop full-screen mode,
 3280 i.e., \fIsmcup\fP and \fIrmcup\fP for terminfo,
 3281 or the corresponding \fIti\fP and \fIte\fP for termcap.
 3282 The \fBtiteInhibit\fP resource removes the \fIti\fP and \fIte\fP strings
 3283 from the TERMCAP string which is set in the environment for some platforms.
 3284 That is not done when \fI\*(xt\fP is built with terminfo libraries because
 3285 terminfo does not provide the whole text of the termcap data in one piece.
 3286 It would not work for terminfo anyway, since terminfo data is not passed
 3287 in environment variables;
 3288 setting an environment variable in this manner would have no effect on
 3289 the application's ability to switch
 3290 between \fINormal\fP and \fIAlternate Screen\fP buffers.
 3291 Instead, the newer private mode controls
 3292 (such as \*1\*0\*4\*9)
 3293 for switching between \fINormal\fP
 3294 and \fIAlternate Screen\fP buffers simply disable the switching.
 3295 They add other features such as clearing the display for the same reason:
 3296 to make the details of switching independent of the application that
 3297 requests the switch.
 3298 .
 3299 .Sh "Bracketed Paste Mode"
 3300 .LP
 3301 When bracketed paste mode is set,
 3302 pasted text is bracketed with control sequences
 3303 so that the program can differentiate pasted text from typed-in text.
 3304 When bracketed paste mode is set,
 3305 the program will receive:
 3306    \*(Es\*([[\*2\*0\*0\*~,
 3307 .br
 3308 followed by the pasted text, followed by
 3309    \*(Es\*([[\*2\*0\*1\*~.
 3310 .br
 3311 For background and discussion, see the FAQ:
 3312 .ID 2
 3313 .\" https://invisible-island.net/xterm/xterm-paste64.html
 3314 \fIXTerm - bracketed-paste\fP
 3315 .DE
 3316 .
 3317 .Sh "Readline Modes"
 3318 .LP
 3319 Several modes provide support for mouse button events in \fIreadline\fP.
 3320 Bracketed paste is one of these \fIreadline\fP modes, but is used more widely.
 3321 .
 3322 .LP
 3323 Some assumptions (particular mouse buttons) and limitations
 3324 (the mouse is clicked on the current row on the screen) apply:
 3325 .
 3326 .IP "\*2\*0\*0\*1"
 3327 If mouse button 1 is used to end or extend a selection
 3328 (the \fBselect-end\fP action),
 3329 and if the cursor position is on the same row as the mouse-click,
 3330 send left/right cursor control sequences to the host to
 3331 adjust the cursor position to match the mouse click.
 3332 .
 3333 .IP "\*2\*0\*0\*2"
 3334 When pasting text (the \fBinsert-selection\fP action
 3335 which is normally bound to mouse button 2),
 3336 if mouse protocol is not enabled,
 3337 and if the cursor position is on the same row as the mouse-click,
 3338 send left/right cursor control sequences to the host to
 3339 adjust the cursor position to match the mouse click.
 3340 .IP "\*2\*0\*0\*3"
 3341 If mouse button 3 is double-clicked when ending or extending a selection,
 3342 (the \fBselect-end\fP action),
 3343 and if the cursor position is on the same row as the mouse-click,
 3344 send left/right cursor control sequences to the host to
 3345 adjust the cursor position to match the mouse click.
 3346 After adjusting the cursor position,
 3347 \fI\*(xt\fP sends erase-characters
 3348 (one for each character in the selection)
 3349 to tell the host to delete the selected text.
 3350 .IP "\*2\*0\*0\*5"
 3351 When writing a selection to the host
 3352 (i.e., pasting text),
 3353 escape each character with the \fIliteral-next\fP (Ctrl-V) character.
 3354 .IP "\*2\*0\*0\*6"
 3355 Normally when \fI\*(xt\fP writes selections to the host,
 3356 it translates newlines to carriage returns.
 3357 This mode disables the translation, passing newlines literally.
 3358 .
 3359 .Sh "Title Modes"
 3360 .LP
 3361 The window- and icon-labels can be set or queried using control sequences.
 3362 As a VT220-emulator, \fI\*(xt\fP \*(``should\*('' limit
 3363 the character encoding for
 3364 the corresponding strings to ISO-8859-1.
 3365 Indeed, it used to be the case (and was documented) that
 3366 window titles had to be ISO-8859-1.
 3367 This is no longer the case.
 3368 However, there are many applications which still assume that titles are
 3369 set using ISO-8859-1.
 3370 So that is the default behavior.
 3371 .LP
 3372 If \fI\*(xt\fP is running with UTF-8 encoding,
 3373 it is possible to use window- and icon-labels encoded using UTF-8.
 3374 That is because the underlying X libraries (and many, but not all)
 3375 window managers support this feature.
 3376 .LP
 3377 The \fButf8Title\fP X resource setting tells \fI\*(xt\fP to disable
 3378 a reconversion of the title string back to ISO-8859-1,
 3379 allowing the title strings to be interpreted as UTF-8.
 3380 The same feature can be enabled using the title mode control sequence
 3381 described in this summary.
 3382 .LP
 3383 Separate from the ability to set the titles,
 3384 \fI\*(xt\fP provides the ability to query the titles,
 3385 returning them either in ISO-8859-1 or UTF-8.
 3386 This choice is available only while \fI\*(xt\fP is using UTF-8 encoding.
 3387 .LP
 3388 Finally, the characters sent to, or returned by a title control
 3389 are less constrained than the rest of the control sequences.
 3390 To make them more manageable (and constrained), for use in shell scripts,
 3391 \fI\*(xt\fP has an optional feature which decodes the string from hexadecimal
 3392 (for setting titles) or for encoding the title into hexadecimal when querying
 3393 the value.
 3394 .
 3395 .Sh "Mouse Tracking"
 3396 .LP
 3397 The VT widget can be set to send the mouse position and other
 3398 information on button presses.
 3399 These modes are typically used by
 3400 editors and other full-screen applications that want to make use of
 3401 the mouse.
 3402 .LP
 3403 There are two sets of mutually exclusive modes:
 3404 .bP
 3405 mouse protocol
 3406 .bP
 3407 protocol encoding
 3408 .LP
 3409 The mouse protocols include
 3410 DEC Locator mode, enabled by the
 3411 DECELR \*(Cs\*(Ps\*s\*;\*(Ps\*s\*(qu\*s\*z
 3412 control sequence, and is not described here
 3413 (control sequences are summarized above).
 3414 The remaining five modes of the mouse protocols
 3415 are each enabled (or disabled) by a different parameter in
 3416 the
 3417 \*(``DECSET \*(Cs\*?\*(Pm\*s\*h\*(''
 3418 or
 3419 \*(``DECRST \*(Cs\*?\*(Pm\*s\*l\*(''
 3420 control sequence.
 3421 .LP
 3422 Manifest constants for the parameter values
 3423 are defined in \fIxcharmouse.h\fP as follows:
 3424 .
 3425 .ID
 3426 .ft CW
 3427 #define SET_X10_MOUSE               9
 3428 #define SET_VT200_MOUSE             1000
 3429 #define SET_VT200_HIGHLIGHT_MOUSE   1001
 3430 #define SET_BTN_EVENT_MOUSE         1002
 3431 #define SET_ANY_EVENT_MOUSE         1003
 3432 .sP
 3433 #define SET_FOCUS_EVENT_MOUSE       1004
 3434 .sP
 3435 #define SET_ALTERNATE_SCROLL        1007
 3436 .sP
 3437 #define SET_EXT_MODE_MOUSE          1005
 3438 #define SET_SGR_EXT_MODE_MOUSE      1006
 3439 #define SET_URXVT_EXT_MODE_MOUSE    1015
 3440 #define SET_PIXEL_POSITION_MOUSE    1016
 3441 .ft 1
 3442 .DE
 3443 .br
 3444 The motion reporting modes are strictly \fI\*(xt\fP extensions, and are not
 3445 part of any standard, though they are analogous to the DEC VT200 DECELR
 3446 locator reports.
 3447 .LP
 3448 Normally,
 3449 parameters (such as pointer position and button number) for all mouse
 3450 tracking escape sequences generated by \fI\*(xt\fP
 3451 encode numeric parameters in a single character as
 3452 \fIvalue\fP+32.
 3453 For example, \*! specifies the value 1.
 3454 The upper left character position on the terminal is denoted as 1,1.
 3455 This scheme dates back to X10,
 3456 though the normal mouse-tracking (from X11) is more elaborate.
 3457 .Ss X10 compatibility mode
 3458 .LP
 3459 X10 compatibility mode sends an escape sequence only on button press,
 3460 encoding the location and the mouse button pressed.
 3461 It is enabled by specifying parameter 9 to DECSET.
 3462 On button press, \fI\*(xt\fP sends
 3463 \*(Cs\*M\*(Cb\*(Cx\*(Cy (6 characters).
 3464 .bP
 3465 \*(Cb is \fIbutton\fP\-1, where \fIbutton\fP is 1, 2 or 3.
 3466 .bP
 3467 \*(Cx and \*(Cy are the \fIx\fP and \fIy\fP coordinates of the mouse when the
 3468 button was pressed.
 3469 .Ss Normal tracking mode
 3470 .LP
 3471 Normal tracking mode sends an escape sequence on both button press and
 3472 release.
 3473 Modifier key (shift, ctrl, meta) information is also sent.
 3474 It is enabled by specifying parameter 1000 to DECSET.
 3475 On button press or release, \fI\*(xt\fP sends
 3476 \*(Cs\*M\*(Cb\*(Cx\*(Cy.
 3477 .bP
 3478 The low two bits of \*(Cb encode button information:
 3479 .RS
 3480 .IP
 3481 0=MB1 pressed,
 3482 .br
 3483 1=MB2 pressed,
 3484 .br
 3485 2=MB3 pressed, and
 3486 .br
 3487 3=release.
 3488 .RE
 3489 .bP
 3490 The next three bits encode the modifiers which were down when the button was
 3491 pressed and are added together:
 3492 .RS
 3493 .IP
 3494 4=Shift,
 3495 .br
 3496 8=Meta, and
 3497 .br
 3498 16=Control.
 3499 .RE
 3500 .IP
 3501 The \fIshift\fP and \fIcontrol\fP modifiers are normally irrelevant
 3502 because \fI\*(xt\fP uses the \fIcontrol\fP modifier with mouse for popup menus,
 3503 and the \fIshift\fP modifier is used in the default translations for button
 3504 events.
 3505 .IP
 3506 There is no predefined \fImeta\fP modifier.
 3507 \fI\*(XT\fP checks first if the keysyms listed in the predefined modifiers
 3508 include \fBMeta_L\fP or \fBMeta_R\fP.
 3509 If found, \fI\*(xt\fP uses that modifier for \fImeta\fP.
 3510 Next, it tries \fBAlt_L\fP or \fBAlt_R\fP.
 3511 If none of those are found, \fI\*(xt\fP uses the \fImod1\fP modifier,
 3512 This is not necessarily the \*(``Meta\*('' key according to \fBxmodmap\fP(1).
 3513 .bP
 3514 \*(Cx and \*(Cy are the x and y coordinates of the mouse event, encoded as
 3515 in X10 mode.
 3516 .Ss Wheel mice
 3517 .LP
 3518 Wheel mice may return buttons 4 and 5.
 3519 Those buttons are represented by the same event codes
 3520 as buttons 1 and 2 respectively,
 3521 except that 64 is added to the event code.
 3522 Release events for the wheel buttons are not reported.
 3523 .LP
 3524 By default,
 3525 the wheel mouse events (buttons 4 and 5)
 3526 are translated to \fBscroll-back\fP
 3527 and \fBscroll-forw\fP actions, respectively.
 3528 Those actions normally scroll the whole window,
 3529 as if the scrollbar was used.
 3530 .LP
 3531 However if \fIAlternate Scroll\fP mode is set,
 3532 then cursor up/down controls are sent when the terminal is displaying
 3533 the \fIAlternate Screen Buffer\fP.
 3534 The initial state of \fIAlternate Scroll\fP mode is set
 3535 using the \fBalternateScroll\fP resource.
 3536 .Ss Other buttons
 3537 .LP
 3538 Some wheel mice can send additional button events,
 3539 e.g., by tilting the scroll wheel left and right.
 3540 .LP
 3541 Additional buttons are encoded like the wheel mice,
 3542 .bP
 3543 by adding 64 (for buttons 6 and 7), or
 3544 .bP
 3545 by adding 128 (for buttons 8 through 11).
 3546 .LP
 3547 Past button 11, the encoding is ambiguous because the same code
 3548 may correspond to different button/modifier combinations.
 3549 .LP
 3550 It is not possible to use these buttons (6-11) in \fI\*(xt\fP's
 3551 \fBtranslations\fP resource because their names are not in the X Toolkit's
 3552 symbol table.
 3553 However, applications can check for the reports, e.g.,
 3554 button 7 (left) and button 6 (right) with a Logitech mouse.
 3555 .Ss Highlight tracking
 3556 .LP
 3557 Mouse highlight tracking notifies a program of a button press, receives a
 3558 range of lines from the program, highlights the region covered by
 3559 the mouse within that range until button release, and then sends the
 3560 program the release coordinates.
 3561 It is enabled by specifying parameter 1001 to DECSET.
 3562 Highlighting is performed only for button 1, though other button events
 3563 can be received.
 3564 .sP
 3565 \fBWarning\fP:
 3566 this mode requires a cooperating program, else \fI\*(xt\fP will hang.
 3567 .LP
 3568 On button press, the same information as for normal tracking is
 3569 generated; \fI\*(xt\fP then waits for the program to send mouse
 3570 tracking information.
 3571 \fIAll X events are ignored until the proper escape sequence is\fP
 3572 \fIreceived from the pty:\fP
 3573 .br
 3574 \*(Cs\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*T
 3575 .LP
 3576 The parameters are \fIfunc, startx, starty, firstrow,\fP and \fIlastrow\fP:
 3577 .bP
 3578 \fIfunc\fP is non-zero to initiate highlight tracking and zero to abort.
 3579 .bP
 3580 \fIstartx\fP and \fIstarty\fP give the starting x and y location for
 3581 the highlighted region.
 3582 .bP
 3583 The ending location tracks the mouse, but
 3584 will never be above row \fIfirstrow\fP and will always be above row
 3585 \fIlastrow.\fP
 3586 (The top of the screen is row 1.)
 3587 .LP
 3588 When the button is released, \fI\*(xt\fP reports the ending position
 3589 one of two ways:
 3590 .bP
 3591 if the start and end coordinates are the same locations:
 3592 .sP
 3593 \*(Cs\*t\*(Cx\*(Cy
 3594 .bP
 3595 otherwise:
 3596 .sP
 3597 \*(Cs\*T\*(Cx\*(Cy\*(Cx\*(Cy\*(Cx\*(Cy
 3598 .LP
 3599 The parameters are \fIstartx, starty, endx, endy, mousex,\fP and \fImousey\fP:
 3600 .bP
 3601 \fIstartx, starty, endx, \fPand\fI endy\fP give the starting and
 3602 ending character positions of the region.
 3603 .bP
 3604 \fImousex\fP and \fImousey\fP
 3605 give the location of the mouse at button up, which may not be over a
 3606 character.
 3607 .Ss Button-event tracking
 3608 .LP
 3609 Button-event tracking is essentially the same as normal tracking, but
 3610 \fI\*(xt\fP also reports button-motion events.
 3611 Motion events
 3612 are reported only if the mouse pointer has moved to a different character
 3613 cell.
 3614 It is enabled by specifying parameter 1002 to DECSET.
 3615 On button press or release, \fI\*(xt\fP sends the same codes used by normal
 3616 tracking mode.
 3617 .bP
 3618 On button-motion events, \fI\*(xt\fP adds 32 to the event code
 3619 (the third character, \*(Cb).
 3620 .bP
 3621 The other bits of the event code specify
 3622 button and modifier keys as in normal mode.
 3623 For example, motion into cell x,y with button 1
 3624 down is reported as
 3625 .sP
 3626 \*(Cs\*M\*@\*(Cx\*(Cy
 3627 .sP
 3628 (\ \*@ = 32 + 0 (button 1) + 32 (motion indicator)\ ).
 3629 Similarly, motion with button 3
 3630 down is reported as
 3631 .sP
 3632 \*(Cs\*M\*(cB\*(Cx\*(Cy
 3633 .sP
 3634 (\ \*(cB = 32 + 2 (button 3) + 32 (motion indicator)\ ).
 3635 .Ss Any-event tracking
 3636 .LP
 3637 Any-event mode is the same as button-event mode, except that all motion
 3638 events are reported, even if no mouse button is down.
 3639 It is enabled by specifying 1003 to DECSET.
 3640 .Ss FocusIn/FocusOut
 3641 .LP
 3642 FocusIn/FocusOut can be combined with any of the mouse events since
 3643 it uses a different protocol.
 3644 When set, it causes \fI\*(xt\fP to send
 3645 \*(Cs\*I when the terminal gains focus, and
 3646 \*(Cs\*O when it loses focus.
 3647 .Ss Extended coordinates
 3648 .LP
 3649 The original X10 mouse protocol limits the \*(Cx and \*(Cy ordinates
 3650 to 223 (=255\ -\ 32).
 3651 \fI\*(XT\fP supports more than one scheme for extending this range,
 3652 by changing the protocol encoding:
 3653 .IP "UTF-8 (1005)"
 3654 This enables UTF-8 encoding for \*(Cx and \*(Cy under
 3655 all tracking modes, expanding the maximum encodable position from 223 to 2015.
 3656 For positions less than 95, the resulting output is identical under both modes.
 3657 Under extended mouse mode, positions greater than 95
 3658 generate \*(``extra\*('' bytes which will confuse
 3659 applications which do not treat their input as a UTF-8 stream.
 3660 Likewise, \*(Cb will be UTF-8 encoded,
 3661 to reduce confusion with wheel mouse events.
 3662 .IP
 3663 Under normal mouse mode, positions outside (160,94) result in
 3664 byte pairs which can be interpreted as a single UTF-8 character;
 3665 applications
 3666 which do treat their input as UTF-8 will almost certainly be confused
 3667 unless extended mouse mode is active.
 3668 .IP
 3669 This scheme has the drawback that the encoded coordinates will not
 3670 pass through \fBluit\fP(1) unchanged,
 3671 e.g., for locales using non-UTF-8 encoding.
 3672 .IP "SGR (1006)"
 3673 The normal mouse response is altered to use
 3674 .RS
 3675 .bP
 3676 \*(Cs\*<
 3677 followed by semicolon-separated
 3678 .bP
 3679 encoded button value,
 3680 .bP
 3681 \*(Px and \*(Py ordinates and
 3682 .bP
 3683 a final character which
 3684 is \*M for button press
 3685 and \*m for button release.
 3686 .RE
 3687 .IP
 3688 The encoded button value in this case does not add 32 since
 3689 that was useful only in the X10 scheme for ensuring that the
 3690 byte containing the button value is a printable code.
 3691 .RS
 3692 .bP
 3693 The modifiers are encoded in the same way.
 3694 .bP
 3695 A different final character is used for button release
 3696 to resolve the X10 ambiguity regarding which button was released.
 3697 .RE
 3698 .IP
 3699 The highlight tracking responses are also modified to an SGR-like format,
 3700 using the same SGR-style scheme and button-encodings.
 3701 .IP "URXVT (1015)"
 3702 The normal mouse response is altered to use
 3703 .RS
 3704 .bP
 3705 \*(Cs
 3706 followed by semicolon-separated
 3707 .bP
 3708 encoded button value,
 3709 .bP
 3710 the \*(Px and \*(Py ordinates and final character \*M.
 3711 .RE
 3712 .IP
 3713 This uses the same button encoding as X10, but printing it as
 3714 a decimal integer rather than as a single byte.
 3715 .IP
 3716 However, \*(Cs\*M can be mistaken for DL (delete lines),
 3717 while the highlight tracking \*(Cs\*T can be mistaken for SD (scroll down),
 3718 and the Window manipulation controls.
 3719 For these reasons, the 1015 control is not recommended;
 3720 it is not an improvement over 1006.
 3721 .IP "SGR-Pixels (1016)"
 3722 Use the same mouse response format as the 1006 control,
 3723 but report position in \fIpixels\fP rather than character \fIcells\fP.
 3724 .
 3725 .Sh "Graphics"
 3726 .Ss "Sixel Graphics"
 3727 .LP
 3728 If \fI\*(xt\fP is configured as
 3729 VT240,
 3730 VT241,
 3731 VT330,
 3732 VT340 or
 3733 VT382
 3734 using the
 3735 \fBdecTerminalID\fP or
 3736 \fBdecGraphicsID\fP
 3737 resource,
 3738 it supports Sixel Graphics controls, a paletted bitmap graphics system
 3739 using sets of six vertical pixels as the basic element.
 3740 .St
 3741 .IP \\*(Cs\\*(Ps\\*s\\*c
 3742 Send Device Attributes (Primary DA), DEC graphics terminals, \fI\*(xt\fP.
 3743 \fI\*(xt\fP responds to Send Device Attributes (Primary DA) with these
 3744 additional codes:
 3745   \*(Ps = \*4 \(-> Sixel graphics.
 3746 .iP
 3747 .IP \\*(Cs\\*?\\*(Pm\\*s\\*h
 3748 Set Mode (with corresponding Reset Mode \*(Cs\*?\*(Pm\*s\*l):
 3749   \*(Ps = \*8\*0 \(-> Sixel Display Mode (DECSDM), VT330, VT340, VT382.
 3750   \*(Ps = \*1\*0\*7\*0 \(-> use private color registers for each graphic, \fI\*(xt\fP.
 3751   \*(Ps = \*8\*4\*5\*2 \(-> Sixel scrolling leaves cursor to right of graphic, RLogin, \fI\*(xt\fP.
 3752 .iP
 3753 .IP \\*(Dc\\*(Pa\\*s\\*;\\*(Pb\\*s\\*;\\*(Ph\\*s\\*q\\*s\\*(Ps..\\*(Ps\fP\\*s\\*(ST
 3754 Send SIXEL image, DEC graphics terminals, VT330, VT340, VT382.
 3755 See:
 3756 .ID 3
 3757 \fIVT330/VT340 Programmer Reference Manual Volume 2:\fP
 3758 \fIGraphics Programming\fP
 3759 .\" https://vt100.net/docs/vt3xx-gp/chapter14.html
 3760 \fIChapter 14 Graphics Programming\fP
 3761 .DE
 3762 The sixel data device control string has three positional parameters,
 3763 following the \*q with sixel data.
 3764   \*(Pa \(-> pixel aspect ratio
 3765   \*(Pb \(-> background color option
 3766   \*(Ph \(-> horizontal grid size (ignored).
 3767   \*(Ps \(-> sixel data
 3768 .Ed
 3769 .
 3770 .Ss "ReGIS Graphics"
 3771 .LP
 3772 If \fI\*(xt\fP is configured as
 3773 VT125,
 3774 VT240,
 3775 VT241,
 3776 VT330 or
 3777 VT340
 3778 using the
 3779 \fBdecTerminalID\fP or
 3780 \fBdecGraphicsID\fP
 3781 resource,
 3782 it supports Remote Graphic Instruction Set, a graphics description language.
 3783 .St
 3784 .IP \\*(Cs\\*(Ps\\*s\\*c
 3785 Send Device Attributes (Primary DA), DEC graphics terminals, \fI\*(xt\fP.
 3786 \fI\*(xt\fP responds to Send Device Attributes (Primary DA) with these
 3787 additional codes:
 3788   \*(Ps = \*3 \(-> ReGIS graphics.
 3789 .iP
 3790 .IP \\*(Cs\\*?\\*(Pm\\*s\\*h
 3791 Set Mode, \fI\*(xt\fP.
 3792 \fI\*(xt\fP has these additional private Set Mode values:
 3793   \*(Ps = \*1\*0\*7\*0 \(-> use private color registers for each graphic.
 3794 .iP
 3795 .IP \\*(Dc\\*(Pm\\*s\\*p\\*(Pr..\\*(Pr\fP\\*s\\*(ST
 3796 Enter or exit ReGIS, VT300, \fI\*(xt\fP.
 3797 See:
 3798 .ID 3
 3799 \fIVT330/VT340 Programmer Reference Manual Volume 2:\fP
 3800 \fIGraphics Programming\fP
 3801 .\" https://vt100.net/docs/vt3xx-gp/chapter1.html
 3802 \fIChapter 1 Introduction to ReGIS\fP
 3803 .DE
 3804 The ReGIS data device control string has one positional parameter
 3805 with four possible values:
 3806   \*(Pm = 0 \(-> resume command, use fullscreen mode.
 3807   \*(Pm = 1 \(-> start new command, use fullscreen mode.
 3808   \*(Pm = 2 \(-> resume command, use command display mode.
 3809   \*(Pm = 3 \(-> start new command, use command display mode.
 3810 .Ed
 3811 .
 3812 .Sh "Non-VT100 Modes"
 3813 .Ss "Tektronix 4014 Mode"
 3814 .LP
 3815 Most of these sequences are standard Tektronix 4014 control sequences.
 3816 Graph mode supports the 12-bit addressing of the Tektronix 4014.
 3817 The major features missing are
 3818 the write-through and defocused modes.
 3819 This document does not describe the commands used in the various
 3820 Tektronix plotting modes but does describe the commands to switch modes.
 3821 .LP
 3822 Some of the sequences are specific to \fI\*(xt\fP.
 3823 The Tektronix emulation was added in X10R4 (1986).
 3824 The VT240, introduced two years earlier, also supported Tektronix 4010/4014.
 3825 Unlike \fI\*(xt\fP, the VT240 documentation implies
 3826 (there is an obvious error in
 3827 section 6.9 \*(``Entering and Exiting 4010/4014 Mode\*('')
 3828 that exiting back to ANSI mode is done by
 3829 resetting private mode \*3\*8 (DECTEK)
 3830 rather than \*(Es\*(Et.
 3831 A real Tektronix 4014 would not respond to either.
 3832 .St
 3833 .IP \\*(Be
 3834 Bell (Ctrl-G).
 3835 .iP
 3836 .IP \\*(Bs
 3837 Backspace (Ctrl-H).
 3838 .iP
 3839 .IP \\*(Ta
 3840 Horizontal Tab (Ctrl-I).
 3841 .iP
 3842 .IP \\*(Lf
 3843 Line Feed or New Line (Ctrl-J).
 3844 .iP
 3845 .IP \\*(Vt
 3846 Cursor up (Ctrl-K).
 3847 .iP
 3848 .IP \\*(Ff
 3849 Form Feed or New Page (Ctrl-L).
 3850 .iP
 3851 .IP \\*(Cr
 3852 Carriage Return (Ctrl-M).
 3853 .iP
 3854 .IP \\*(Es\\*(Et
 3855 Switch to VT100 Mode (\*(Es Ctrl-C).
 3856 .iP
 3857 .IP \\*(Es\\*(En
 3858 Return Terminal Status (\*(Es Ctrl-E).
 3859 .iP
 3860 .IP \\*(Es\\*(Ff
 3861 PAGE (Clear Screen) (\*(Es Ctrl-L).
 3862 .iP
 3863 .IP \\*(Es\\*(So
 3864 Begin 4015 APL mode (\*(Es Ctrl-N).
 3865 This is ignored by \fI\*(xt\fP.
 3866 .iP
 3867 .IP \\*(Es\\*(Si
 3868 End 4015 APL mode (\*(Es Ctrl-O).
 3869 This is ignored by \fI\*(xt\fP.
 3870 .iP
 3871 .IP \\*(Es\\*(Eb
 3872 COPY (Save Tektronix Codes to file COPY\fIyyyy-mm-dd.hh:mm:ss\fP).
 3873   \*(Eb (end transmission block) is the same as Ctrl-W.
 3874 .iP
 3875 .IP \\*(Es\\*(Ca
 3876 Bypass Condition (\*(Es Ctrl-X).
 3877 .iP
 3878 .IP \\*(Es\\*(Su
 3879 GIN mode (\*(Es Ctrl-Z).
 3880 .iP
 3881 .IP \\*(Es\\*(Fs
 3882 Special Point Plot Mode (\*(Es Ctrl-\e).
 3883 .iP
 3884 .IP \\*(Es\\*8
 3885 Select Large Character Set.
 3886 .iP
 3887 .IP \\*(Es\\*9
 3888 Select #2 Character Set.
 3889 .iP
 3890 .IP \\*(Es\\*:
 3891 Select #3 Character Set.
 3892 .iP
 3893 .IP \\*(Es\\*;
 3894 Select Small Character Set.
 3895 .iP
 3896 .IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(Be
 3897 Set Text Parameters of VT window.
 3898   \*(Ps = \*0 \(-> Change Icon Name and Window Title to \*(Pt.
 3899   \*(Ps = \*1 \(-> Change Icon Name to \*(Pt.
 3900   \*(Ps = \*2 \(-> Change Window Title to \*(Pt.
 3901   \*(Ps = \*4\*6 \(-> Change Log File to \*(Pt.
 3902 This is normally disabled by a compile-time option.
 3903 .iP
 3904 .IP \\*(Es\\*`
 3905 Normal Z Axis and Normal (solid) Vectors.
 3906 .iP
 3907 .IP \\*(Es\\*a
 3908 Normal Z Axis and Dotted Line Vectors.
 3909 .iP
 3910 .IP \\*(Es\\*b
 3911 Normal Z Axis and Dot-Dashed Vectors.
 3912 .iP
 3913 .IP \\*(Es\\*c
 3914 Normal Z Axis and Short-Dashed Vectors.
 3915 .iP
 3916 .IP \\*(Es\\*d
 3917 Normal Z Axis and Long-Dashed Vectors.
 3918 .iP
 3919 .IP \\*(Es\\*h
 3920 Defocused Z Axis and Normal (solid) Vectors.
 3921 .iP
 3922 .IP \\*(Es\\*i
 3923 Defocused Z Axis and Dotted Line Vectors.
 3924 .iP
 3925 .IP \\*(Es\\*j
 3926 Defocused Z Axis and Dot-Dashed Vectors.
 3927 .iP
 3928 .IP \\*(Es\\*k
 3929 Defocused Z Axis and Short-Dashed Vectors.
 3930 .iP
 3931 .IP \\*(Es\\*l
 3932 Defocused Z Axis and Long-Dashed Vectors.
 3933 .iP
 3934 .IP \\*(Es\\*p
 3935 Write-Thru Mode and Normal (solid) Vectors.
 3936 .iP
 3937 .IP \\*(Es\\*q
 3938 Write-Thru Mode and Dotted Line Vectors.
 3939 .iP
 3940 .IP \\*(Es\\*r
 3941 Write-Thru Mode and Dot-Dashed Vectors.
 3942 .iP
 3943 .IP \\*(Es\\*(cs
 3944 Write-Thru Mode and Short-Dashed Vectors.
 3945 .iP
 3946 .IP \\*(Es\\*t
 3947 Write-Thru Mode and Long-Dashed Vectors.
 3948 .iP
 3949 .IP \\*(Fs
 3950 Point Plot Mode (Ctrl-\e).
 3951 .iP
 3952 .IP \\*(Gs
 3953 Graph Mode (Ctrl-]).
 3954 .iP
 3955 .IP \\*(Rs
 3956 Incremental Plot Mode (Ctrl-\*^).
 3957 .iP
 3958 .IP \\*(Us
 3959 Alpha Mode (Ctrl-_).
 3960 .Ed
 3961 .
 3962 .
 3963 .Ss "VT52 Mode"
 3964 .LP
 3965 Parameters for cursor movement are at the end of the \*(Es\*Y escape sequence.
 3966 Each ordinate is encoded in a single character as \fIvalue\fP+32.
 3967 For example, \*! is 1.
 3968 The screen coordinate system is 0-based.
 3969 .St
 3970 .IP \\*(Es\\*<
 3971 Exit VT52 mode (Enter VT100 mode).
 3972 .iP
 3973 .IP \\*(Es\\*=
 3974 Enter alternate keypad mode.
 3975 .iP
 3976 .IP \\*(Es\\*>
 3977 Exit alternate keypad mode.
 3978 .iP
 3979 .IP \\*(Es\\*A
 3980 Cursor up.
 3981 .iP
 3982 .IP \\*(Es\\*(cB
 3983 Cursor down.
 3984 .iP
 3985 .IP \\*(Es\\*C
 3986 Cursor right.
 3987 .iP
 3988 .IP \\*(Es\\*D
 3989 Cursor left.
 3990 .iP
 3991 .IP \\*(Es\\*F
 3992 Enter graphics mode.
 3993 .iP
 3994 .IP \\*(Es\\*G
 3995 Exit graphics mode.
 3996 .iP
 3997 .IP \\*(Es\\*H
 3998 Move the cursor to the home position.
 3999 .iP
 4000 .IP \\*(Es\\*I
 4001 Reverse line feed.
 4002 .iP
 4003 .IP \\*(Es\\*J
 4004 Erase from the cursor to the end of the screen.
 4005 .iP
 4006 .IP \\*(Es\\*K
 4007 Erase from the cursor to the end of the line.
 4008 .iP
 4009 .IP \\*(Es\\*Y\\*(Ps\\*s\\*(Ps
 4010 Move the cursor to given row and column.
 4011 .iP
 4012 .IP \\*(Es\\*Z
 4013 Identify.
 4014   \(-> \*(Es\*s\*/\*s\*Z (\*(``I am a VT52.\*('').
 4015 .Ed
 4016 .
 4017 .Sh "Further reading"
 4018 .Ss "Technical manuals"
 4019 .LP
 4020 Manuals for \fIhardware\fP terminals are more readily available than
 4021 similarly-detailed documentation for terminal \fIemulators\fP
 4022 such as \fIaixterm\fP, \fIshelltool\fP, \fIdtterm\fP.
 4023 .LP
 4024 However long, the technical manuals have problems:
 4025 .bP
 4026 DEC's manuals did not provide a comprehensive comparison of the features
 4027 in different model.
 4028 .IP
 4029 Peter Sichel's \fIHost Interface Functions Checklist\fP
 4030 spreadsheet is useful for noting
 4031 which model introduced a given feature (although there are a few apparent
 4032 errors such as the DECRQSS feature cited for VT320
 4033 whereas the technical manual omits it).
 4034 .bP
 4035 Sometimes the manuals disagree.
 4036 For example, DEC's standard document (DEC STD 070) for terminals says
 4037 that DECSCL performs a \fIsoft\fP reset (DECSTR),
 4038 while the VT420 manual says it does a \fIhard\fP reset (RIS).
 4039 .bP
 4040 Sometimes the manuals are simply incorrect.
 4041 For example, testing a DEC VT420 in 1996 showed that the documented
 4042 code for a valid or invalid response to DECRQSS was reversed.
 4043 .IP
 4044 The VT420 test results were incorporated into the \fIvttest\fP program.
 4045 At the time, DEC STD 070 was not available,
 4046 but it also agrees with \fIvttest\fP.
 4047 Later, documentation for the DEC VT525 was shown to have the same flaw.
 4048 .bP
 4049 The VT330/VT340 reference manual for graphics programming
 4050 documents sixel graphics in some detail in chapter 14.
 4051 Overlooked in the first edition, the second edition mentions
 4052 .\" https://vt100.net/docs/vt3xx-gp/chapter14.html#S14.4
 4053 \fISixel Scrolling\fP.
 4054 The VT382 Kanji and Thai manuals provide less information,
 4055 about sixel graphics,
 4056 but do mention DECSDM.
 4057 They differ in their comment about the private mode
 4058 DECSDM (\*(Cs\*?\*8\*0\*h),
 4059 which each manual agrees should \fIset\fP the Sixel Scrolling feature.
 4060 The VT330/VT340 graphics programming manual (second edition, March 1988) says
 4061 .RS 5
 4062 .sp
 4063 When sixel display mode is set, the \fISixel Scrolling\fP feature is enabled.
 4064 .br
 4065 When sixel display mode is reset, the \fISixel Scrolling\fP feature is disabled.
 4066 .RE
 4067 .IP
 4068 while the VT382 Kanji manual (page 6-6, undated) says
 4069 .RS
 4070 .sp
 4071 Disable sixel scroll
 4072 .RE
 4073 .sp
 4074 and the VT382 Thai manual (page C-30, August 1989) says
 4075 .RS
 4076 .sp
 4077 No Sixel scrolling
 4078 .RE
 4079 .IP
 4080 The standard (DEC STD 070) in chapter 9 (August 3, 1990)
 4081 states on page 17 that video devices will scroll
 4082 when advancing the Sixel active position past the bottom margin,
 4083 but on page 19, in the section on deviations,
 4084 states that VT125 and VT240 did not scroll in this situation.
 4085 The standard does not mention VT330/VT340 or VT382.
 4086 Nor does it document DECSDM.
 4087 .bP
 4088 Not all details are clear even in DEC STD 070
 4089 (which is more than twice the length of the
 4090 VT520 programmer's reference manual,
 4091 and almost three times longer than the VT420 reference manual).
 4092 However, as an internal standards document,
 4093 DEC STD 070 is more likely to describe the actual behavior of DEC's terminals
 4094 than the more polished user's guides.
 4095 .LP
 4096 That said, here are technical manuals
 4097 which have been used in developing \fI\*(xt\fP.
 4098 Not all were available initially.
 4099 In August 1996 for instance, the technical references were
 4100 limited to
 4101 EK-VT220-HR-002 and
 4102 EK-VT420-UG.002.
 4103 Shortly after,
 4104 Richard Shuford sent a copy of
 4105 EK-VT3XX-TP-001.
 4106 Still later (beginning in 2003), Paul Williams' vt100.net site
 4107 provided
 4108 EK-VT102-UG-003,
 4109 EK-VT220-RM-002,
 4110 EK-VT420-RM-002,
 4111 EK-VT520-RM A01,
 4112 EK-VT100-TM-003, and
 4113 EK-VT102-UG-003.
 4114 In addition, several documents were found on the bitsavers site.
 4115 .bP
 4116 .\" http://www.bitsavers.org/pdf/dec/terminal/vt52/EK-VT5X-OP-001_DECscope_Users_Manual_Mar77.pdf
 4117 \fIDECscope User's Manual\fP.
 4118 .br
 4119 Digital Equipment Corporation
 4120 (EK-VT5X-OP-001 1975).
 4121 .bP
 4122 .\" http://www.bitsavers.org/pdf/dec/terminal/vt100/EK-VT100-TM-003_VT100_Technical_Manual_Jul82.pdf
 4123 \fIVT100 Series Video Terminal Technical Manual\fP.
 4124 .br
 4125 Digital Equipment Corporation
 4126 (EK-VT100-TM-003, July 1982).
 4127 .bP
 4128 .\" https://vt100.net/docs/vt100-ug/
 4129 \fIVT100 User Guide\fP.
 4130 .br
 4131 Digital Equipment Corporation
 4132 (EK-VT100-UG-003, June 1981).
 4133 .bP
 4134 .\" https://vt100.net/docs/vt102-ug/
 4135 \fIVT102 User Guide\fP.
 4136 .br
 4137 Digital Equipment Corporation
 4138 (EK-VT102-UG-003, February 1982).
 4139 .bP
 4140 .\" http://manx-docs.org/details.php/1,2954
 4141 \fIVT220 Programmer Pocket Guide\fP.
 4142 .br
 4143 Digital Equipment Corporation
 4144 (EK-VT220-HR-002, July 1984).
 4145 .bP
 4146 .\" https://vt100.net/docs/vt220-rm/
 4147 \fIVT220 Programmer Reference Manual\fP.
 4148 .br
 4149 Digital Equipment Corporation
 4150 (EK-VT220-RM-002, August 1984).
 4151 .bP
 4152 .\" http://www.bitsavers.org/pdf/dec/terminal/vt240/EK-VT240-RM-002_VT240_Programmer_Reference_Manual_Oct84.pdf
 4153 \fIVT240 Programmer Reference Manual\fP.
 4154 .br
 4155 Digital Equipment Corporation
 4156 (EK-VT240-RM-002, October 1984).
 4157 .bP
 4158 .\" http://www.bitsavers.org/pdf/dec/terminal/vt340/EK-VT3XX-TP-001_VT330_VT340_Text_Programming_Mar87.pdf
 4159 \fIVT330/VT340 Programmer Reference Manual\fP
 4160 .br
 4161 \fIVolume 1: Text Programming\fP.
 4162 .br
 4163 Digital Equipment Corporation
 4164 (EK-VT3XX-TP-001, March 1987).
 4165 .bP
 4166 .\" http://www.bitsavers.org/pdf/dec/terminal/vt340/EK-VT3XX-GP-001_VT330_VT340_Graphics_Programming_Mar87.pdf
 4167 \fIVT330/VT340 Programmer Reference Manual\fP
 4168 .br
 4169 \fIVolume 2: Graphics Programming\fP.
 4170 .br
 4171 Digital Equipment Corporation
 4172 (EK-VT3XX-GP-001, March 1987).
 4173 .bP
 4174 .\" https://vt100.net/docs/vt3xx-gp/
 4175 \fIVT330/VT340 Programmer Reference Manual\fP
 4176 .br
 4177 \fIVolume 2: Graphics Programming\fP.
 4178 .br
 4179 Digital Equipment Corporation
 4180 (EK-VT3XX-GP-002, May 1988).
 4181 .bP
 4182 .\" https://vt100.net/dec/ek-vt382-rm-001.pdf
 4183 \fIVT382 Kanji Display Terminal\fP
 4184 .br
 4185 \fIProgrammer Reference Manual\fP.
 4186 .br
 4187 Digital Equipment Corporation
 4188 (EK-VT382-RM-001, undated).
 4189 .bP
 4190 .\" https://vt100.net/dec/ek-vt38t-ug-001.pdf
 4191 \fIVT382 Thai Display Terminal\fP
 4192 .br
 4193 \fIInstalling and Using Manual\fP.
 4194 .br
 4195 Digital Equipment Corporation
 4196 (EK-VT38T-UG-001, August 1989).
 4197 .bP
 4198 .\" http://www.bitsavers.org/pdf/dec/terminal/vt420/EK-VT420-UG-001_Installing_and_Using_The_VT420_Video_Terminal_Nov89.pdf
 4199 \fIInstalling and Using\fP
 4200 .br
 4201 \fIThe VT420 Video Terminal\fP
 4202 .br
 4203 \fI(North American Model)\fP.
 4204 .br
 4205 Digital Equipment Corporation
 4206 (EK-VT420-UG.002, February 1990).
 4207 .bP
 4208 .\" http://manx-docs.org/collections/mds-199909/cd3/term/vt420rm2.pdf
 4209 \fIVT420 Programmer Reference Manual\fP.
 4210 .br
 4211 Digital Equipment Corporation
 4212 (EK-VT420-RM-002, February 1992).
 4213 .bP
 4214 .\" https://vt100.net/docs/vt510-rm/
 4215 \fIVT510 Video Terminal\fP
 4216 .br
 4217 \fIProgrammer Information\fP.
 4218 .br
 4219 Digital Equipment Corporation
 4220 (EK-VT510-RM B01, November 1993).
 4221 .bP
 4222 .\" http://www.bitsavers.org/pdf/dec/terminal/vt5xx/EK-VT520-RM_VT520_VT525_Programmer_Information_Jul94.pdf
 4223 \fIVT520/VT525 Video Terminal\fP
 4224 .br
 4225 \fIProgrammer Information\fP.
 4226 .br
 4227 Digital Equipment Corporation
 4228 (EK-VT520-RM A01, July 1994).
 4229 .bP
 4230 .\" http://www.vaxhaven.com/images/f/f7/EK-PPLV2-PM-B01.pdf
 4231 \fIDigital ANSI-Compliant Printing Protocol\fP
 4232 .br
 4233 \fILevel 2 Programming Reference Manual\fP
 4234 .br
 4235 Digital Equipment Corporation
 4236 (EK-PPLV2-PM B01, August 1994).
 4237 .bP
 4238 .\" http://www.bitsavers.org/pdf/ibm/pc/dos/6936752_DOS_2.00_Jan83.pdf
 4239 \fIDisk Operating System\fP
 4240 .br
 4241 DOS 2.00
 4242 .br
 4243 Microsoft, Inc.
 4244 .br
 4245 First edition, January 1983.
 4246 .bP
 4247 .\" https://vt100.net/manx/details/5,5479
 4248 \fI4014 and 4014-1 Computer Display Terminal\fP
 4249 .br
 4250 \fIUser's Manual\fP.
 4251 .br
 4252 Tektronix, Inc.
 4253 (070-1647-00, November 1979).
 4254 .Ss "Standards"
 4255 .LP
 4256 The DEC terminal family (VT100 through VT525) is upward-compatible,
 4257 using standards plus \fIextensions\fP, e.g., \*(``private modes\*(''.
 4258 Not all commonly-used features are standard.
 4259 For example, scrolling regions are not found in ECMA-48.
 4260 On the other hand, ECMA-48 was not intended to all-encompassing.
 4261 Quoting from the second edition:
 4262 .in +4n
 4263 .sp
 4264 .ft C
 4265 Full conformance to a standard means that all its requirements are met.
 4266 For such conformance to be unique the standard must contain no options.
 4267 This is typically the case for hardware standards, for instance Standard
 4268 ECMA-10 for data interchange on punched tapes.
 4269 .sp
 4270 This Standard ECMA-48 is of a different nature and as a result,
 4271 it is only practicable to envisage limited conformance to it,
 4272 as defined hereunder.
 4273 .sp
 4274 This Standard addresses a whole class of devices which can vary greatly
 4275 from each other depending on the application for which a device has
 4276 been specifically designed. Obviously, a
 4277 product which implements all facilities described in this standard \[en]
 4278 thus being in \*(``full conformance\*('' with it \[en] whilst theoretically
 4279 possible, would be technically and economically unthinkable.
 4280 .ft R
 4281 .in -4n
 4282 .LP
 4283 Again, it is possible to find discrepancies in the standards:
 4284 .bP
 4285 The printed ECMA-48 5th edition (1991)
 4286 and the first PDF produced for that edition (April 1998)
 4287 state that SD (scroll down) ends with 05/14, i.e., \*^,
 4288 which disagrees with DEC's VT420 hardware implementation and
 4289 DEC's manuals which use 05/04 \*T.
 4290 (A few other terminals such as AT&T 5620 and IBM 5151 also used 05/04,
 4291 but the documentation and dates are lacking).
 4292 .IP
 4293 ECMA created a new PDF in April 2003 which changed that detail to use \*T,
 4294 and later in 2008 provided PDFs of the earlier editions which used \*T.
 4295 .bP
 4296 The first edition of ECMA-48 has not been available, to compare.
 4297 As of September 2021,
 4298 ECMA's website provides a copy of ECMA-\fB46\fP in its place.
 4299 .IP
 4300 Earlier versions of ISO 6429 have never been available.
 4301 The first three editions of ISO 6429 were issued in 1983, 1988, and 1992.
 4302 .bP
 4303 \fIANSI X3.64-1979\fP
 4304 does not list color as a feature of the SGR sequence (page 49).
 4305 .IP
 4306 In Appendix A, it mentions ECMA-48:
 4307 .in +4n
 4308 .ft C
 4309 .sp
 4310 (8) This document represents a coordinated effort to develop a single technical
 4311 standard in the United States and Europe (see ECMA-48 standard entitled
 4312 \fIAdditional Controls for Character Imaging Input/Output Devices\fP).
 4313 .in -4n
 4314 .IP
 4315 .ft R
 4316 Appendix H clarifies the relationship between these documents somewhat
 4317 though it confuses the first two editions of ECMA-48.
 4318 The typo for \*(``work\*('' versus \*(``owkr\*(''
 4319 appears in the original document:
 4320 .in +4n
 4321 .hy 0
 4322 .sp
 4323 .ft C
 4324 ANSI X3.64-1979, and ECMA-48,
 4325 \fIAdditional Controls for Character-Imaging I/O Devices\fP,
 4326 were developed in parallel, with close liaison.
 4327 ISO DP 6429, Additional Control Functions for Character-Imaging
 4328 Devices, was developed as a synthesis of X3.04 and ECMA-48.
 4329 During this process,
 4330 some control functions as well as additional selective parameters were added.
 4331 Except for point 1 below, X3.64 is a subset of ISO 6429.
 4332 Although the two standards use different language,
 4333 the intent is that the subset is technically identical.
 4334 X3.64 was balloted and forwarded prior to the final resolution of ISO 6429
 4335 and does not incorporate the \fIowkr\fP of IS0/TC97/SC2 in completing ISO 6429.
 4336 Revision of X3.64 will attempt to incorporate those elements
 4337 and assumptions of X3.64.
 4338 .in -4n
 4339 .ft R
 4340 .IP
 4341 ANSI X3.64 goes on to say that the SGR codes 8, 30-47 are in ISO 6429.
 4342 It includes 38 and 39, but omits 48 and 49.
 4343 At the time, ISO 6429's first edition was still four years in the future.
 4344 The writer probably was referring to the ongoing process of making
 4345 ECMA-48 second edition into the ISO standard.
 4346 .bP
 4347 The VT320, VT420, VT520 manuals claim that DECSCL does a
 4348 hard reset (RIS).
 4349 .IP
 4350 Both the VT220 manual and DEC STD 070 (which documents
 4351 levels 1-4 in detail) state that it is a soft reset, e.g., DECSTR.
 4352 .
 4353 .LP
 4354 Here are the relevant standards:
 4355 .bP
 4356 .\" https://nvlpubs.nist.gov/nistpubs/Legacy/FIPS/fipspub86.pdf
 4357 \fIAdditional Controls for Use with American National Standard Code for Information Interchange, ANSI X3.64-1979\fP
 4358 .br
 4359 FIPS Publication 86. July 18, 1979.
 4360 .br
 4361 American National Standards Institute, Inc.
 4362 .bP
 4363 .\" https://www.ecma-international.org/publications/standards/Ecma-035.htm
 4364 \fIECMA-35: Character Code Structure and Extension Techniques\fP
 4365 .br
 4366 (6th Edition, December 1994).
 4367 .bP
 4368 .\" http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-043.pdf
 4369 \fIECMA-43: 8-bit Coded Character Set Structure and Rules\fP
 4370 .br
 4371 (3rd Edition, December 1991).
 4372 .\" same as dpANS X3.134.1
 4373 .bP
 4374 .\" https://www.ecma-international.org/publications/standards/Ecma-048.htm
 4375 \fIECMA-48: Control Functions for Coded Character Sets\fP
 4376 .br
 4377 (5th Edition, June 1991).
 4378 .bP
 4379 .\" http://www.bitsavers.org/pdf/dec/standards/EL-SM070-00_DEC_STD_070_Video_Systems_Reference_Manual_Dec91.pdf
 4380 \fIDEC STD 070 Video Systems Reference Manual\fP.
 4381 .br
 4382 Digital Equipment Corporation
 4383 (A-MN-ELSM070-00-0000 Rev H, December 3, 1991).
 4384 .Ss "Miscellaneous"
 4385 .LP
 4386 A few hardware terminals survived into the 1990s only as terminal emulators.
 4387 Documentation for these and other terminal emulators
 4388 which have influenced \fI\*(xt\fP
 4389 are generally available only in
 4390 less-accessible and less-detailed manual pages.
 4391 .bP
 4392 \fI\*(XT\fP supports control sequences for manipulating its \fIwindow\fP
 4393 which were implemented by Sun's \fIshelltool\fP program.
 4394 This was part of SunView (SunOS 3.0, 1986).
 4395 The change-notes for \fI\*(xt\fP's \fIresize\fP program in X10.4 (1986)
 4396 mention its use of these \*(``Sun tty emulation escape sequences\*(''
 4397 for resizing the window.
 4398 The X10.4 \fI\*(xt\fP program recognized these sequences for resizing
 4399 the terminal, except for the iconify/deiconify pair.
 4400 SunView also introduced the SIGWINCH signal,
 4401 used by the X10.4 \fI\*(xt\fP and mentioned in its \fICHANGES\fP file:
 4402 .iP
 4403 .RS
 4404 The window size is passed to the operating system via TIOCSWINSZ (4.3) or
 4405 TIOCSSIZE (sun).
 4406 A SIGWINCH signal is sent if the vtXXX window is resized.
 4407 .RE
 4408 .IP
 4409 While support for the Sun control-sequences remained in \fIresize\fP,
 4410 the next release of \fI\*(xt\fP (X11R1 in 1987)
 4411 omitted the code for interpreting them.
 4412 .IP
 4413 Later, the SunView program was adapted for
 4414 the \fIOPEN LOOK\fP environment introduced 1988-1990.
 4415 .IP
 4416 Still later, in 1995, \fIOPEN LOOK\fP was abandoned in favor of \fICDE\fP.
 4417 The \fICDE\fP terminal emulator \fIdtterm\fP implemented those controls,
 4418 with a couple of additions.
 4419 .IP
 4420 Starting in July 1996,
 4421 \fI\*(xt\fP re-implemented those control sequences
 4422 (based on the \fIdtterm\fP manual pages)
 4423 and further extended the group of window controls.
 4424 .IP
 4425 There were two sets of controls
 4426 (\*(Cs\*(Ps\*s\fI[\fP\*s\*;\*(Pm\*s\*;\*(Pm\*s\fI]\fP\*s\*t,
 4427 and \*(Os\*(Ps\*s\fItext\fP\*s\*(ST) implemented
 4428 by \fIshelltool\fP, documented in appendix E of both
 4429 \fIPHIGS Programming Manual\fP (1992), and the unpublished
 4430 \fIX Window System User's Guide (OPEN LOOK Edition)\fP (1995).
 4431 The \fICDE\fP program kept those,
 4432 and added a few new ones.
 4433 .TS
 4434 l l l l l
 4435 _ _ _ _ _
 4436 l | c | c | c | l.
 4437 \fBCode\fR  \fBSun\fR   \fBCDE  \*(XT   Description\fP
 4438 \*(Cs\*1\*t yes yes yes de-iconify
 4439 \*(Cs\*2\*t yes yes yes iconify
 4440 \*(Cs\*3\*t yes yes yes move window to pixel-position
 4441 \*(Cs\*4\*t yes yes yes resize window in pixels
 4442 \*(Cs\*5\*t yes yes yes raise window to front of stack
 4443 \*(Cs\*6\*t yes yes yes raise window to back of stack
 4444 \*(Cs\*7\*t yes yes yes refresh window
 4445 \*(Cs\*8\*t yes yes yes resize window in chars
 4446 \*(Cs\*9\*t -   -   yes maximize/unmaximize window
 4447 \*(Cs\*1\*0\*t  -   -   yes to/from full-screen
 4448 \*(Cs\*1\*1\*t  yes yes yes report if window is iconified
 4449 \*(Cs\*1\*2\*t  -   -   -   -
 4450 \*(Cs\*1\*3\*t  yes yes yes report window position
 4451 \*(Cs\*1\*4\*t  yes yes yes report window size in pixels
 4452 \*(Cs\*1\*5\*t  -   -   yes report screen size in pixels
 4453 \*(Cs\*1\*6\*t  -   -   yes report character cell in pixels
 4454 \*(Cs\*1\*7\*t  -   -   -   -
 4455 \*(Cs\*1\*8\*t  yes yes yes report window size in chars
 4456 \*(Cs\*1\*9\*t  -   -   yes report screen size in chars
 4457 \*(Cs\*2\*0\*t  -   yes yes report icon label
 4458 \*(Cs\*2\*1\*t  -   yes yes report window title
 4459 \*(Cs\*2\*2\*t  -   -   yes save window/icon title
 4460 \*(Cs\*2\*3\*t  -   -   yes restore window/icon title
 4461 \*(Cs\*2\*4\*t  -   -   yes resize window (DECSLPP)
 4462 \*(Os\*0\*(ST   -   yes yes set window and icon title
 4463 \*(Os\*1\*(ST   -   yes yes set icon label
 4464 \*(Os\*2\*(ST   -   yes yes set window title
 4465 \*(Os\*3\*(ST   -   n/a yes set X server property
 4466 \*(Os\*I\*(ST   yes yes yes set icon to file
 4467 \*(Os\*l\*(ST   yes yes yes set window title
 4468 \*(Os\*L\*(ST   yes yes yes set icon label
 4469 _
 4470 .TE
 4471 .br
 4472 Besides the Sun-derived OSC controls for setting window title and icon label,
 4473 \fIdtterm\fP also supported the \fI\*(xt\fP controls for the same feature.
 4474 .IP
 4475 The \fICDE\fP source was unavailable for inspection until 2012,
 4476 so that clarification of the details of the window operations
 4477 relied upon \fIvttest\fP.
 4478 .bP
 4479 The SCOSC/SCORC control sequences for saving/restoring the cursor and
 4480 for saving/restoring \*(``DEC Private Mode Values\*(''
 4481 (XTSAVE and XTRESTORE)
 4482 may appear to be
 4483 related (since the \*(``save\*('' controls both end with \*(cs),
 4484 but that is coincidental.
 4485 The latter was introduced in X10.4 (December 1986):
 4486 .iP
 4487 .RS
 4488 .ft C
 4489 .na
 4490 Most Dec Private mode settings can be saved away internally using \\E[?\fIn\fPs,
 4491 where \fIn\fP is the same number to set or reset the Dec Private mode.  The
 4492 mode can be restored using \\E[?\fIn\fPr.  This can be used in termcap for \fBvi\fP, for
 4493 example, to turn off saving of lines, but restore whatever the original
 4494 state was on exit.
 4495 .ad
 4496 .ft R
 4497 .RE
 4498 .IP
 4499 while the SCOSC/SCORC pair was added in 1995 by XFree86
 4500 (and documented long afterwards).
 4501 .IP
 4502 The SCO \fIANSI\fP console terminal descriptions did not use these controls
 4503 (they used the VT100-compatible SC/RC pair).
 4504 SCOSC/SCORC were an artifact of DOS 2.00 (January 1983),
 4505 by Microsoft and later supported by SCO and other vendors.
 4506 .IP
 4507 The SCOSC/SCORC pair is considered a \fIprivate mode\fP because the final
 4508 characters (\*(cs and \*u) fall in the range from \*(``\`\*('' to \*(``~\*(''
 4509 (octal 0140 to octal 0176).
 4510 Other \fIprivate\fP control sequences can be constructed by using
 4511 octets 074 to 077 (characters
 4512 \*(``<\*('',
 4513 \*(``=\*('',
 4514 \*(``>\*('', or
 4515 \*(``?\*('') at the beginning of the parameter string.
 4516 The XTSAVE and XTRESTORE controls use \*(``?\*('') in this manner.
 4517 .IP
 4518 Because the XTSAVE and XTRESTORE controls are private,
 4519 other terminals may behave differently.
 4520 For example, DEC (a contributor to the early \fI\*(xt\fP as well as
 4521 a manufacturer of terminals) used an incompatible
 4522 private control in one of its terminals more than five years later
 4523 (for the VT420 PCTerm, announced in February 1992).
 4524 .IP
 4525 In that model of the VT420,
 4526 \*(Cs\*?\*(Pm\*;\*(Pc\*s\*r
 4527 selects the \fIPC TERM\fP emulation mode.
 4528 When this mode is enabled, the keyboard sends \fIscan codes\fP
 4529 rather than characters (analogous to X keyboard events).
 4530 The first parameter of this private control
 4531 enables or disables \fIPC TERM\fP mode,
 4532 while the second selects a character set.
 4533 An ambiguity arises if an application omits the second parameter.
 4534 In that special case, it cannot be distinguished from XTRESTORE.
 4535 DEC did not take this into account when designing the feature.
 4536 .IP
 4537 If there were potential users, \fI\*(xt\fP could accommodate this
 4538 by a resource setting.
 4539 In retrospect (thirty years later),
 4540 there have been no uses of \fIPC TERM\fP,
 4541 while the XTRESTORE feature is still in use.
 4542 .bP
 4543 The \fIaixterm\fP manual page gives the format of the control sequence
 4544 for foreground and background colors 8-15,
 4545 but does not specify what those colors are.
 4546 That is implied by the description's mention of \fIHFT\fP:
 4547 .iP
 4548 .RS
 4549 .na
 4550 .ft C
 4551 The aixterm command provides a standard terminal type for programs that
 4552 do not interact directly with Enhanced X-Windows.
 4553 This command provides
 4554 an emulation for a VT102 terminal or a high function terminal (HFT).
 4555 The VT102 mode is activated by the -v flag.
 4556 .ft R
 4557 .ad
 4558 .RE
 4559 .IP
 4560 Unlike \fI\*(xt\fP, there are no resource names for the 16 colors,
 4561 leaving the reader to assume that the mapping is hard-coded.
 4562 The control sequences for colors 8-15 are not specified by ECMA-48,
 4563 but rather (as done in other instances by \fI\*(xt\fP) chosen to
 4564 not conflict with current or future standards.
 4565 .
 4566 .if n .pl \n(nlu+1v