initial commit
[profile/ivi/xterm.git] / ctlseqs.ms
1 .\"#! troff -ms $1              -*- Nroff -*-
2 .\" "Xterm Control Sequences" document
3 .\" $XTermId: ctlseqs.ms,v 1.237 2011/01/26 09:54:31 tom Exp $
4 .\"
5 .\"
6 .\" Copyright 1996-2010,2011 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 .if n .pl 9999v         \" no page breaks in nroff
71 .ND
72 .\" Start a list of controls
73 .de St
74 .sp
75 .nr PD 0
76 .nr PI 1.0i
77 .nr VS 16
78 ..
79 .\" End a list of controls
80 .de Ed
81 .nr PD .3v
82 .nr VS 12
83 ..
84 .\" Bulleted paragraph
85 .de bP
86 .IP \(bu 4
87 ..
88 .\" Normal leading paragraph
89 .de lP
90 .if n .sp
91 .LP
92 ..
93 .\" Normal internal paragraph
94 .de sP
95 .if n .sp
96 .if t .sp 0.5
97 ..
98 .\" Section header
99 .de Sh
100 .ds RH \\$1
101 .br
102 .SH
103 \\$1
104 ..
105 .\" Subsection header
106 .de Ss
107 .LP
108 .B
109 ..
110 .ds CH \" as nothing
111 .ds LH Xterm Control Sequences
112 .nr s 6*\n(PS/10
113 .ds L \s\nsBEL\s0
114 .ds E \s\nsESC\s0
115 .ds T \s\nsTAB\s0
116 .ds X \s\nsETX\s0
117 .ds N \s\nsENQ\s0
118 .ds e \s\nsETB\s0
119 .ds C \s\nsCAN\s0
120 .ds S \s\nsSUB\s0
121 .\" space between chars
122 .ie t .ds s \|
123 .el .ds s " \"
124 .nr [W \w'\*L'u
125 .nr w \w'\*E'u
126 .if \nw>\n([W .nr [W \nw
127 .nr w \w'\*T'u
128 .if \nw>\n([W .nr [W \nw
129 .nr w \w'\*X'u
130 .if \nw>\n([W .nr [W \nw
131 .nr w \w'\*N'u
132 .if \nw>\n([W .nr [W \nw
133 .nr w \w'\*e'u
134 .if \nw>\n([W .nr [W \nw
135 .nr w \w'\*C'u
136 .if \nw>\n([W .nr [W \nw
137 .nr w \w'\*S'u
138 .if \nw>\n([W .nr [W \nw
139 .nr [W +\w'\|\|'u
140 .de []
141 .nr w \w'\\$2'
142 .nr H \\n([Wu-\\nwu
143 .nr h \\nHu/2u
144 .\" do fancy box in troff
145 .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
146 .el .ds \\$1 \\$2\*s
147 ..
148 .[] Et \v'-1p'\*X\v'1p'
149 .[] En \v'-1p'\*N\v'1p'
150 .[] Be \v'-1p'\*L\v'1p'
151 .[] AP \v'-1p'\s\nsAPC\s0\v'1p'
152 .[] Bs \v'-1p'\s\nsBS\s0\v'1p'
153 .[] Cs \v'-1p'\s\nsCSI\s0\v'1p'
154 .[] S2 \v'-1p'\s\nsSS2\s0\v'1p'
155 .[] S3 \v'-1p'\s\nsSS3\s0\v'1p'
156 .[] SS \v'-1p'\s\nsSOS\s0\v'1p'
157 .[] Eg \v'-1p'\s\nsEPA\s0\v'1p'
158 .[] Sg \v'-1p'\s\nsSPA\s0\v'1p'
159 .[] Dc \v'-1p'\s\nsDCS\s0\v'1p'
160 .[] Ht \v'-1p'\s\nsHTS\s0\v'1p'
161 .[] ID \v'-1p'\s\nsIND\s0\v'1p'
162 .[] Nl \v'-1p'\s\nsNEL\s0\v'1p'
163 .[] Os \v'-1p'\s\nsOSC\s0\v'1p'
164 .[] RI \v'-1p'\s\nsRI\s0\v'1p'
165 .[] PM \v'-1p'\s\nsPM\s0\v'1p'
166 .[] ST \v'-1p'\s\nsST\s0\v'1p'
167 .[] Ta \v'-1p'\*T\v'1p'
168 .[] Lf \v'-1p'\s\nsLF\s0\v'1p'
169 .[] Vt \v'-1p'\s\nsVT\s0\v'1p'
170 .[] Ff \v'-1p'\s\nsFF\s0\v'1p'
171 .[] Cr \v'-1p'\s\nsCR\s0\v'1p'
172 .[] So \v'-1p'\s\nsSO\s0\v'1p'
173 .[] Sp \v'-1p'\s\nsSP\s0\v'1p'
174 .[] Si \v'-1p'\s\nsSI\s0\v'1p'
175 .[] Eb \v'-1p'\*e\v'1p'
176 .[] Ca \v'-1p'\*C\v'1p'
177 .[] Su \v'-1p'\*S\v'1p'
178 .[] Es \v'-1p'\*E\v'1p'
179 .[] Fs \v'-1p'\s\nsFS\s0\v'1p'
180 .[] Gs \v'-1p'\s\nsGS\s0\v'1p'
181 .[] Rs \v'-1p'\s\nsRS\s0\v'1p'
182 .[] Us \v'-1p'\s\nsUS\s0\v'1p'
183 .[] XX \v'-1p'\s\nsXX\s0\v'1p'
184 .[] $ $
185 .[] # #
186 .[] % %
187 .[] (( (
188 .[] ) )
189 .[] * *
190 .[] + +
191 .[] , ,
192 .[] - -
193 .[] . .
194 .[] 0 0
195 .[] 1 1
196 .[] 2 2
197 .[] 3 3
198 .[] 4 4
199 .[] 5 5
200 .[] 6 6
201 .[] 7 7
202 .[] 8 8
203 .[] 9 9
204 .[] : :
205 .[] ; ;
206 .[] = =
207 .[] / /
208 .[] < <
209 .[] > >
210 .[] ? ?
211 .[] @ @
212 .[] A A
213 .[] cB B
214 .[] C C
215 .[] D D
216 .[] E E
217 .[] F F
218 .[] G G
219 .[] H H
220 .[] I I
221 .[] J J
222 .[] K K
223 .[] L L
224 .[] M M
225 .[] N N
226 .[] O O
227 .[] P P
228 .[] Q Q
229 .[] R R
230 .[] S S
231 .[] T T
232 .[] V V
233 .[] W W
234 .[] XX X
235 .[] Y Y
236 .[] Z Z
237 .[] [[ [
238 .[] ]] ]
239 .[] bS \\e
240 .[] { {
241 .[] ] ]
242 .[] & &
243 .[] ^ ^
244 .[] _ _
245 .[] qu \&'
246 .[] ` \`
247 .[] a a
248 .[] b b
249 .[] c c
250 .[] d d
251 .[] f f
252 .[] g g
253 .[] h h
254 .[] i i
255 .[] j j
256 .[] k k
257 .[] l l
258 .[] m m
259 .[] n n
260 .[] o o
261 .[] p p
262 .[] q q
263 .[] r r
264 .[] cs s
265 .[] t t
266 .[] u u
267 .[] v v
268 .[] w w
269 .[] x x
270 .[] y y
271 .[] z z
272 .[] | |
273 .[] } }
274 .[] ! !
275 .[] c" \(lq
276 .[] c~ ~
277 .[] Sc \fIc\fP
278 .ds Cc \fIC\fP
279 .ds Cb \fIC\v'.3m'\h'-.2m'\s-2b\s0\v'-.3m'\fP
280 .ds Cx \fIC\v'.3m'\h'-.2m'\s-2x\s0\v'-.3m'\fP
281 .ds Cy \fIC\v'.3m'\h'-.2m'\s-2y\s0\v'-.3m'\fP
282 .ds Pb \fIP\v'.3m'\h'-.2m'\s-2b\s0\v'-.3m'\fP
283 .ds Pc \fIP\v'.3m'\h'-.2m'\s-2c\s0\v'-.3m'\fP
284 .ds Pd \fIP\v'.3m'\h'-.2m'\s-2d\s0\v'-.3m'\fP
285 .ds Pe \fIP\v'.3m'\h'-.2m'\s-2e\s0\v'-.3m'\fP
286 .ds Pl \fIP\v'.3m'\h'-.2m'\s-2l\s0\v'-.3m'\fP
287 .ds Pm \fIP\v'.3m'\h'-.2m'\s-2m\s0\v'-.3m'\fP
288 .ds Pn \fIP\v'.3m'\h'-.2m'\s-2n\s0\v'-.3m'\fP
289 .ds Pp \fIP\v'.3m'\h'-.2m'\s-2p\s0\v'-.3m'\fP
290 .ds Pr \fIP\v'.3m'\h'-.2m'\s-2r\s0\v'-.3m'\fP
291 .ds Ps \fIP\v'.3m'\h'-.2m'\s-2s\s0\v'-.3m'\fP
292 .ds Pt \fIP\v'.3m'\h'-.2m'\s-2t\s0\v'-.3m'\fP
293 .ds Pu \fIP\v'.3m'\h'-.2m'\s-2u\s0\v'-.3m'\fP
294 .ds Pv \fIP\v'.3m'\h'-.2m'\s-2v\s0\v'-.3m'\fP
295 .ds Ix \fIx\fP
296 .ds Iy \fIy\fP
297 .ds Iw \fIw\fP
298 .ds Ih \fIh\fP
299 .ds Ir \fIr\fP
300 .ds Ic \fIc\fP
301 .ie t .nr LL 6.5i
302 .el .nr LL 72m
303 .if n .na
304 .TL
305 Xterm Control Sequences
306 .AU
307 Edward Moy
308 .AI
309 University of California, Berkeley
310 .sp
311 Revised by
312 .AU
313 Stephen Gildea
314 .AI
315 X Consortium (1994)
316 .AU
317 Thomas Dickey
318 .AI
319 XFree86 Project (1996-2006)
320 invisible-island.net (2006-2010)
321 .AU
322 .
323 .am BT                  \" add page numbers after first page
324 .ds CF %
325 ..
326 .Sh "Definitions"
327 .IP \*(Sc
328 The literal character \fIc\fP.
329 .IP \*(Cc
330 A single (required) character.
331 .IP \*(Ps
332 A single (usually optional) numeric parameter, composed of one of more digits.
333 .IP \*(Pm
334 A multiple numeric parameter composed of any number of single numeric
335 parameters, separated by \*; character(s).
336 Individual values for the parameters are listed with \*(Ps .
337 .IP \*(Pt
338 A text parameter composed of printable characters.
339 .
340 .Sh "C1 (8-Bit) Control Characters"
341 .LP
342 The \fIxterm\fP program recognizes both 8-bit and 7-bit control characters.
343 It generates 7-bit controls (by default) or 8-bit if S8C1T is enabled.
344 The following pairs of 7-bit and 8-bit control characters are equivalent:
345 .St
346 .IP \\*(Es\\*D
347 Index (\*(ID is 0x84).
348 .IP \\*(Es\\*E
349 Next Line (\*(Nl is 0x85).
350 .IP \\*(Es\\*H
351 Tab Set (\*(Ht is 0x88).
352 .IP \\*(Es\\*M
353 Reverse Index (\*(RI is 0x8d).
354 .IP \\*(Es\\*N
355 Single Shift Select of G2 Character Set (\*(S2 is 0x8e).  This affects next character only.
356 .IP \\*(Es\\*O
357 Single Shift Select of G3 Character Set (\*(S3 is 0x8f).  This affects next character only.
358 .IP \\*(Es\\*P
359 Device Control String (\*(Dc is 0x90).
360 .IP \\*(Es\\*V
361 Start of Guarded Area (\*(Sg is 0x96).
362 .IP \\*(Es\\*W
363 End of Guarded Area (\*(Eg is 0x97).
364 .IP \\*(Es\\*(XX
365 Start of String (\*(SS is 0x98).
366 .IP \\*(Es\\*Z
367 Return Terminal ID (DECID is 0x9a).
368 Obsolete form of \*(Cs\*c (DA).
369 .IP \\*(Es\\*([[
370 Control Sequence Introducer (\*(Cs is 0x9b).
371 .IP \\*(Es\\*(bS
372 String Terminator (\*(ST is 0x9c).
373 .IP \\*(Es\\*(]]
374 Operating System Command (\*(Os is 0x9d).
375 .IP \\*(Es\\*^
376 Privacy Message (\*(PM is 0x9e).
377 .IP \\*(Es\\*_
378 Application Program Command (\*(AP is 0x9f).
379 .Ed
380 .sp
381 .LP
382 These control characters are used in the vtXXX emulation.
383 .
384 .Sh "VT100 Mode"
385 .LP
386 Most of these control sequences are standard VT102 control sequences,
387 but there is support for later DEC VT terminals (i.e., VT220, VT320, VT420),
388 as well as ISO 6429 and \fIaixterm\fP color controls.
389 The only VT102 feature not supported is auto-repeat,
390 since the only way X provides for this will affect all windows.
391 There are additional control sequences to provide
392 \fIxterm-\fPdependent functions, such as the scrollbar or window size.
393 Where the function is specified by DEC or ISO 6429, the code assigned
394 to it is given in parentheses.
395 The escape codes to designate and invoke
396 character sets are specified by ISO 2022; see that document for a
397 discussion of character sets.
398 .
399 .St
400 .\"
401 .Ss
402 Single-character functions
403 .\"
404 .IP \\*(Be
405 Bell (Ctrl-G).
406 .
407 .IP \\*(Bs
408 Backspace (Ctrl-H).
409 .
410 .IP \\*(Cr
411 Carriage Return (Ctrl-M).
412 .
413 .IP \\*(En
414 Return Terminal Status (Ctrl-E).
415 Default response is an empty string, but may be overridden
416 by a resource \fBanswerbackString\fP.
417 .
418 .IP \\*(Ff
419 Form Feed or New Page (NP).  Ctrl-L is treated the same as LF.
420 .
421 .IP \\*(Lf
422 Line Feed or New Line (NL).  (LF is Ctrl-J).
423 .
424 .IP \\*(Si
425 Shift In (Ctrl-O) \(-> Switch to Standard Character Set.  This invokes the
426 G0 character set (the default).
427 .
428 .IP \\*(So
429 Shift Out (Ctrl-N) \(-> Switch to Alternate Character Set.  This invokes the
430 G1 character set.
431 .
432 .IP \\*(Sp
433 Space.
434 .
435 .IP \\*(Ta
436 Horizontal Tab (HT) (Ctrl-I).
437 .
438 .IP \\*(Vt
439 Vertical Tab (Ctrl-K).  This is treated the same as LF.
440 .Ed
441 .\"
442 .\"
443 .\"
444 .St
445 .Ss
446 Controls beginning with ESC
447 .LP
448 This excludes controls where ESC is part of a 7-bit equivalent to 8-bit C1 controls, ordered by the final character(s).
449 .\"
450 .IP \\*(Es\\*(Sp\\*F
451 7-bit controls (S7C1T).
452 .
453 .IP \\*(Es\\*(Sp\\*G
454 8-bit controls (S8C1T).
455 .
456 .IP \\*(Es\\*(Sp\\*L
457 Set ANSI conformance level 1 (dpANS X3.134.1).
458 .
459 .IP \\*(Es\\*(Sp\\*M
460 Set ANSI conformance level 2 (dpANS X3.134.1).
461 .
462 .IP \\*(Es\\*(Sp\\*N
463 Set ANSI conformance level 3 (dpANS X3.134.1).
464 .
465 .IP \\*(Es\\*#\\*3
466 DEC double-height line, top half (DECDHL).
467 .
468 .IP \\*(Es\\*#\\*4
469 DEC double-height line, bottom half (DECDHL).
470 .
471 .IP \\*(Es\\*#\\*5
472 DEC single-width line (DECSWL).
473 .
474 .IP \\*(Es\\*#\\*6
475 DEC double-width line (DECDWL).
476 .
477 .IP \\*(Es\\*#\\*8
478 DEC Screen Alignment Test (DECALN).
479 .
480 .IP \\*(Es\\*%\\*@
481 Select default character set.  That is ISO 8859-1 (ISO 2022).
482 .
483 .IP \\*(Es\\*%\\*G
484 Select UTF-8 character set (ISO 2022).
485 .
486 .IP \\*(Es\\*(((\\*(Cc
487 Designate G0 Character Set (ISO 2022, VT100).
488 .br
489 Final character \*(Cc for designating 94-character sets.
490 In this list, \*0, \*A and \*(cB apply to VT100 and up, the remainder to VT220 and up:
491   \*(Cc = \*0 \(-> DEC Special Character and Line Drawing Set.
492   \*(Cc = \*A \(-> United Kingdom (UK).
493   \*(Cc = \*(cB \(-> United States (USASCII).
494   \*(Cc = \*4 \(-> Dutch.
495   \*(Cc = \*C or \*5 \(-> Finnish.
496   \*(Cc = \*R \(-> French.
497   \*(Cc = \*Q \(-> French Canadian.
498   \*(Cc = \*K \(-> German.
499   \*(Cc = \*Y \(-> Italian.
500   \*(Cc = \*E or \*6 \(-> Norwegian/Danish.
501   \*(Cc = \*Z \(-> Spanish.
502   \*(Cc = \*H or \*7 \(-> Swedish.
503   \*(Cc = \*= \(-> Swiss.
504 .\" VT3xx and VT5xx (see vttest) add more selections, not implemented here.
505 .IP \\*(Es\\*)\\*(Cc
506 Designate G1 Character Set (ISO 2022, VT100).
507 .br
508 The same character sets apply as for \*(Es\*(((\*(Cc.
509 .
510 .IP \\*(Es\\**\\*(Cc
511 Designate G2 Character Set (ISO 2022, VT220).
512 .br
513 The same character sets apply as for \*(Es\*(((\*(Cc.
514 .
515 .IP \\*(Es\\*+\\*(Cc
516 Designate G3 Character Set (ISO 2022, VT220).
517 .br
518 The same character sets apply as for \*(Es\*(((\*(Cc.
519 .
520 .IP \\*(Es\\*-\\*(Cc
521 Designate G1 Character Set (VT300).
522 .br
523 The same character sets apply as for \*(Es\*(((\*(Cc.
524 .
525 .IP \\*(Es\\*.\\*(Cc
526 Designate G2 Character Set (VT300).
527 .br
528 The same character sets apply as for \*(Es\*(((\*(Cc.
529 .
530 .IP \\*(Es\\*/\\*(Cc
531 Designate G3 Character Set (VT300).
532 .br
533 These work for 96-character sets only.
534   \*(Cc = \*A \(-> ISO Latin-1 Supplemental.
535 .\" VT5xx would implement these:
536 .\"  \*(Cc = \*F \(-> ISO Greek Supplemental
537 .\"  \*(Cc = \*H \(-> ISO Hebrew Supplemental
538 .\"  \*(Cc = \*M \(-> ISO Latin-5 Supplemental
539 .\"  \*(Cc = \*L \(-> ISO Latin-Cyrillic
540 .
541 .IP \\*(Es\\*7
542 Save Cursor (DECSC).
543 .
544 .IP \\*(Es\\*8
545 Restore Cursor (DECRC).
546 .
547 .IP \\*(Es\\*=
548 Application Keypad (DECPAM).
549 .
550 .IP \\*(Es\\*>
551 Normal Keypad (DECPNM).
552 .
553 .IP \\*(Es\\*F
554 Cursor to lower left corner of screen.  This is
555 enabled by the \fBhpLowerleftBugCompat\fP resource.
556 .
557 .IP \\*(Es\\*c
558 Full Reset (RIS).
559 .
560 .IP \\*(Es\\*l
561 Memory Lock (per HP terminals).
562 Locks memory above the cursor.
563 .
564 .IP \\*(Es\\*m
565 Memory Unlock (per HP terminals).
566 .
567 .IP \\*(Es\\*n
568 Invoke the G2 Character Set as GL (LS2).
569 .
570 .IP \\*(Es\\*o
571 Invoke the G3 Character Set as GL (LS3).
572 .
573 .IP \\*(Es\\*|
574 Invoke the G3 Character Set as GR (LS3R).
575 .
576 .IP \\*(Es\\*}
577 Invoke the G2 Character Set as GR (LS2R).
578 .
579 .IP \\*(Es\\*(c~
580 Invoke the G1 Character Set as GR (LS1R).
581 .Ed
582 .
583 .St
584 .Ss
585 Application Program-Control functions
586 .IP \\*(AP\\*(Pt\\*s\\*(ST
587 None.  \fIxterm\fP implements no \*(AP functions; \*(Pt is ignored.
588 \*(Pt need not be printable characters.
589 .Ed
590 .
591 .St
592 .Ss
593 Device-Control functions
594 .IP \\*(Dc\\*(Ps\\*;\\*(Ps\\*|\\*(Pt\\*s\\*(ST
595 User-Defined Keys (DECUDK).
596 The first parameter:
597   \*(Ps = \*0 \(-> Clear all UDK definitions before starting (default).
598   \*(Ps = \*1 \(-> Erase Below (default).
599 .br
600 The second parameter:
601   \*(Ps = \*0 \(<- Lock the keys (default).
602   \*(Ps = \*1 \(<- Do not lock.
603 .br
604 The third parameter is a ';'-separated list of strings denoting
605 the key-code separated by a '/' from the hex-encoded key value.
606 The key codes correspond to the DEC function-key codes (e.g., F6=17).
607 .
608 .IP \\*(Dc\\*$\\*q\\*(Pt\\*s\\*(ST
609 Request Status String (DECRQSS).
610 The string following the "q" is one of the following:
611   \*(c"\*q      \(-> DECSCA
612   \*(c"\*p      \(-> DECSCL
613   \*r           \(-> DECSTBM
614   \*m           \(-> SGR
615 .br
616 \fIxterm\fP responds with
617 \*(Dc\*1\*$\*r\*(Pt\*s\*(ST
618 for valid requests, replacing the \*(Pt with the corresponding \*(Cs
619 string,
620 or
621 \*(Dc\*0\*$\*r\*(Pt\*s\*(ST
622 for invalid requests.
623 .
624 .IP \\*(Dc\\*+\\*p\\*(Pt\\*s\\*(ST
625 Set Termcap/Terminfo Data (xterm, experimental).
626 The string following the "p" is a name to use for retrieving data from
627 the terminal database.
628 The data will be used for the "tcap" keyboard
629 configuration's function- and special-keys, as well as by the
630 Request Termcap/Terminfo String control.
631 .
632 .IP \\*(Dc\\*+\\*q\\*(Pt\\*s\\*(ST
633 Request Termcap/Terminfo String (xterm, experimental).
634 The string following the "q" is a list of names
635 encoded in hexadecimal (2 digits per character)
636 separated by \*;
637 which correspond to termcap or terminfo key names.
638 .br
639 Two special features are also recognized, which are not key names:
640 \fICo\fP for termcap colors (or \fIcolors\fP for terminfo colors),
641 and
642 \fITN\fP for termcap name (or \fIname\fP for terminfo name).
643 .br
644 \fIxterm\fP responds with
645 \*(Dc\*1\*+\*r\*(Pt\*s\*(ST
646 for valid requests, adding to \*(Pt an \*=,
647 and the value of the corresponding string that xterm would send,
648 or
649 \*(Dc\*0\*+\*r\*(Pt\*s\*(ST
650 for invalid requests.
651 The strings are encoded in hexadecimal (2 digits per character).
652 .Ed
653 .\"
654 .St
655 .Ss
656 Functions using \*(Cs, ordered by the final character(s)
657 .IP \\*(Cs\\*(Ps\\*s\\*@
658 Insert \*(Ps (Blank) Character(s) (default = 1) (ICH).
659 .
660 .IP \\*(Cs\\*(Ps\\*s\\*A
661 Cursor Up \*(Ps Times (default = 1) (CUU).
662 .
663 .IP \\*(Cs\\*(Ps\\*s\\*(cB
664 Cursor Down \*(Ps Times (default = 1) (CUD).
665 .
666 .IP \\*(Cs\\*(Ps\\*s\\*C
667 Cursor Forward \*(Ps Times (default = 1) (CUF).
668 .
669 .IP \\*(Cs\\*(Ps\\*s\\*D
670 Cursor Backward \*(Ps Times (default = 1) (CUB).
671 .
672 .IP \\*(Cs\\*(Ps\\*s\\*E
673 Cursor Next Line \*(Ps Times (default = 1) (CNL).
674 .
675 .IP \\*(Cs\\*(Ps\\*s\\*F
676 Cursor Preceding Line \*(Ps Times (default = 1) (CPL).
677 .
678 .IP \\*(Cs\\*(Ps\\*s\\*G
679 Cursor Character Absolute  [column] (default = [row,1]) (CHA).
680 .
681 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*H
682 Cursor Position [row;column] (default = [1,1]) (CUP).
683 .
684 .IP \\*(Cs\\*(Ps\\*s\\*I
685 Cursor Forward Tabulation \*(Ps tab stops (default = 1) (CHT).
686 .
687 .IP \\*(Cs\\*(Ps\\*s\\*J
688 Erase in Display (ED).
689   \*(Ps = \*0 \(-> Erase Below (default).
690   \*(Ps = \*1 \(-> Erase Above.
691   \*(Ps = \*2 \(-> Erase All.
692   \*(Ps = \*3 \(-> Erase Saved Lines (xterm).
693 .
694 .IP \\*(Cs\\*?\\*(Ps\\*s\\*J
695 Erase in Display (DECSED).
696   \*(Ps = \*0 \(-> Selective Erase Below (default).
697   \*(Ps = \*1 \(-> Selective Erase Above.
698   \*(Ps = \*2 \(-> Selective Erase All.
699 .
700 .IP \\*(Cs\\*(Ps\\*s\\*K
701 Erase in Line (EL).
702   \*(Ps = \*0 \(-> Erase to Right (default).
703   \*(Ps = \*1 \(-> Erase to Left.
704   \*(Ps = \*2 \(-> Erase All.
705 .
706 .IP \\*(Cs\\*?\\*(Ps\\*s\\*K
707 Erase in Line (DECSEL).
708   \*(Ps = \*0 \(-> Selective Erase to Right (default).
709   \*(Ps = \*1 \(-> Selective Erase to Left.
710   \*(Ps = \*2 \(-> Selective Erase All.
711 .
712 .IP \\*(Cs\\*(Ps\\*s\\*L
713 Insert \*(Ps Line(s) (default = 1) (IL).
714 .
715 .IP \\*(Cs\\*(Ps\\*s\\*M
716 Delete \*(Ps Line(s) (default = 1) (DL).
717 .
718 .IP \\*(Cs\\*(Ps\\*s\\*P
719 Delete \*(Ps Character(s) (default = 1) (DCH).
720 .
721 .IP \\*(Cs\\*(Ps\\*s\\*S
722 Scroll up \*(Ps lines (default = 1) (SU).
723 .
724 .IP \\*(Cs\\*(Ps\\*s\\*T
725 Scroll down \*(Ps lines (default = 1) (SD).
726 .
727 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*T
728 Initiate highlight mouse tracking.
729 Parameters are [func;startx;starty;firstrow;lastrow].
730 See the section \fBMouse Tracking\fP.
731 .
732 .IP \\*(Cs\\*>\\*(Ps\\*;\\*(Ps\\*s\\*T
733 Reset one or more features of the title modes to the default value.
734 Normally, "reset" disables the feature.
735 It is possible to disable the ability to reset features
736 by compiling a different default for the title modes into \fIxterm\fP.
737   \*(Ps = \*0 \(-> Do not set window/icon labels using hexadecimal.
738   \*(Ps = \*1 \(-> Do not query window/icon labels using hexadecimal.
739   \*(Ps = \*2 \(-> Do not set window/icon labels using UTF-8.
740   \*(Ps = \*3 \(-> Do not query window/icon labels using UTF-8.
741 (See discussion of "Title Modes").
742 .
743 .IP \\*(Cs\\*(Ps\\*s\\*(XX
744 Erase \*(Ps Character(s) (default = 1) (ECH).
745 .
746 .IP \\*(Cs\\*(Ps\\*s\\*Z
747 Cursor Backward Tabulation \*(Ps tab stops (default = 1) (CBT).
748 .
749 .IP \\*(Cs\\*(Pm\\*s\\*`
750 Character Position Absolute  [column] (default = [row,1]) (HPA).
751 .
752 .IP \\*(Cs\\*(Ps\\*s\\*b
753 Repeat the preceding graphic character \*(Ps times (REP).
754 .
755 .IP \\*(Cs\\*(Ps\\*s\\*c
756 Send Device Attributes (Primary DA).
757   \*(Ps = \*0 or omitted \(-> request attributes from terminal.
758 The response depends on the \fBdecTerminalID\fP resource setting.
759   \(-> \*(Cs\*?\*1\*;\*2\*c (``VT100 with Advanced Video Option'')
760   \(-> \*(Cs\*?\*1\*;\*0\*c (``VT101 with No Options'')
761   \(-> \*(Cs\*?\*6\*c (``VT102'')
762   \(->\ \*(Cs\*?\*6\*0\*;\*1\*;\*2\*;\*6\*;\*8\*;\*9\*;\*1\*5\*;\*c (``VT220'')
763 .br
764 The VT100-style response parameters do not mean anything by themselves.
765 VT220 parameters do, telling the host what features the terminal supports:
766   \*(Ps = \*1 \(-> 132-columns.
767   \*(Ps = \*2 \(-> Printer.
768   \*(Ps = \*6 \(-> Selective erase.
769   \*(Ps = \*8 \(-> User-defined keys.
770   \*(Ps = \*9 \(-> National replacement character sets.
771   \*(Ps = \*1\*5 \(-> Technical characters.
772   \*(Ps = \*2\*2 \(-> ANSI color, e.g., VT525.
773   \*(Ps = \*2\*9 \(-> ANSI text locator (i.e., DEC Locator mode).
774 .
775 .IP \\*(Cs\\*>\\*(Ps\\*s\\*c
776 Send Device Attributes (Secondary DA).
777   \*(Ps = \*0 or omitted \(-> request the terminal's identification code.
778 The response depends on the \fBdecTerminalID\fP resource setting.
779 It should apply only to VT220 and up, but \fIxterm\fP extends this to VT100.
780   \(-> \*(Cs\*s\*>\*(Pp\*s\*;\*(Pv\*s\*;\*(Pc\*s\*c
781 .br
782 where \*(Pp denotes the terminal type
783   \*(Pp = \*0 \(-> ``VT100''.
784   \*(Pp = \*1 \(-> ``VT220''.
785 .br
786 and \*(Pv is the firmware version (for \fIxterm\fP, this was originally
787 the XFree86 patch number, starting with 95).
788 In a DEC terminal, \*(Pc indicates the ROM cartridge
789 registration number and is always zero.
790 .
791 .IP \\*(Cs\\*(Pm\\*s\\*d
792 Line Position Absolute  [row] (default = [1,column]) (VPA).
793 .
794 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*f
795 Horizontal and Vertical Position [row;column] (default = [1,1]) (HVP).
796 .
797 .IP \\*(Cs\\*(Ps\\*s\\*g
798 Tab Clear (TBC).
799   \*(Ps = \*0 \(-> Clear Current Column (default).
800   \*(Ps = \*3 \(-> Clear All.
801 .
802 .IP \\*(Cs\\*(Pm\\*s\\*h
803 Set Mode (SM).
804   \*(Ps = \*2 \(-> Keyboard Action Mode (AM).
805   \*(Ps = \*4 \(-> Insert Mode (IRM).
806   \*(Ps = \*1\*2 \(-> Send/receive (SRM).
807   \*(Ps = \*2\*0 \(-> Automatic Newline (LNM).
808 .
809 .IP \\*(Cs\\*?\\*(Pm\\*s\\*h
810 DEC Private Mode Set (DECSET).
811   \*(Ps = \*1 \(-> Application Cursor Keys (DECCKM).
812   \*(Ps = \*2 \(-> Designate USASCII for character sets G0-G3 (DECANM),
813 and set VT100 mode.
814   \*(Ps = \*3 \(-> 132 Column Mode (DECCOLM).
815   \*(Ps = \*4 \(-> Smooth (Slow) Scroll (DECSCLM).
816   \*(Ps = \*5 \(-> Reverse Video (DECSCNM).
817   \*(Ps = \*6 \(-> Origin Mode (DECOM).
818   \*(Ps = \*7 \(-> Wraparound Mode (DECAWM).
819   \*(Ps = \*8 \(-> Auto-repeat Keys (DECARM).
820   \*(Ps = \*9 \(-> Send Mouse X & Y on button press.
821 See the section \fBMouse Tracking\fP.
822   \*(Ps = \*1\*0 \(-> Show toolbar (rxvt).
823   \*(Ps = \*1\*2 \(-> Start Blinking Cursor (att610).
824   \*(Ps = \*1\*8 \(-> Print form feed (DECPFF).
825   \*(Ps = \*1\*9 \(-> Set print extent to full screen (DECPEX).
826   \*(Ps = \*2\*5 \(-> Show Cursor (DECTCEM).
827   \*(Ps = \*3\*0 \(-> Show scrollbar (rxvt).
828   \*(Ps = \*3\*5 \(-> Enable font-shifting functions (rxvt).
829   \*(Ps = \*3\*8 \(-> Enter Tektronix Mode (DECTEK).
830   \*(Ps = \*4\*0 \(-> Allow 80 \z\(<-\(-> 132 Mode.
831   \*(Ps = \*4\*1 \(-> \fImore\fP(1) fix (see \fBcurses\fP resource).
832   \*(Ps = \*4\*2 \(-> Enable Nation Replacement Character sets (DECNRCM).
833   \*(Ps = \*4\*4 \(-> Turn On Margin Bell.
834   \*(Ps = \*4\*5 \(-> Reverse-wraparound Mode.
835   \*(Ps = \*4\*6 \(-> Start Logging.
836 This is normally disabled by a compile-time option.
837   \*(Ps = \*4\*7 \(-> Use Alternate Screen Buffer.  (This may be
838 disabled by the \fBtiteInhibit\fP resource).
839   \*(Ps = \*6\*6 \(-> Application keypad (DECNKM).
840   \*(Ps = \*6\*7 \(-> Backarrow key sends backspace (DECBKM).
841   \*(Ps = \*1\*0\*0\*0 \(-> Send Mouse X & Y on button press and release.
842 See the section \fBMouse Tracking\fP.
843   \*(Ps = \*1\*0\*0\*1 \(-> Use Hilite Mouse Tracking.
844   \*(Ps = \*1\*0\*0\*2 \(-> Use Cell Motion Mouse Tracking.
845   \*(Ps = \*1\*0\*0\*3 \(-> Use All Motion Mouse Tracking.
846   \*(Ps = \*1\*0\*0\*4 \(-> Send FocusIn/FocusOut events.
847   \*(Ps = \*1\*0\*0\*5 \(-> Enable Extended Mouse Mode.
848   \*(Ps = \*1\*0\*1\*0 \(-> Scroll to bottom on tty output (rxvt).
849   \*(Ps = \*1\*0\*1\*1 \(-> Scroll to bottom on key press (rxvt).
850   \*(Ps = \*1\*0\*3\*4 \(-> Interpret "meta" key, sets eighth bit.
851 (enables the \fBeightBitInput\fP resource).
852   \*(Ps = \*1\*0\*3\*5 \(-> Enable special modifiers for Alt and NumLock keys.
853 (This enables the \fBnumLock\fP resource).
854   \*(Ps = \*1\*0\*3\*6 \(-> Send ESC when Meta modifies a key.
855 (This enables the \fBmetaSendsEscape\fP resource).
856   \*(Ps = \*1\*0\*3\*7 \(-> Send DEL from the editing-keypad Delete key.
857   \*(Ps = \*1\*0\*3\*9 \(-> Send ESC when Alt modifies a key.
858 (This enables the \fBaltSendsEscape\fP resource).
859   \*(Ps = \*1\*0\*4\*0 \(-> Keep selection even if not highlighted.
860 (This enables the \fBkeepSelection\fP resource).
861   \*(Ps = \*1\*0\*4\*1 \(-> Use the CLIPBOARD selection.
862 (This enables the \fBselectToClipboard\fP resource).
863   \*(Ps = \*1\*0\*4\*2 \(-> Enable Urgency window manager hint when Control-G is received.
864 (This enables the \fBbellIsUrgent\fP resource).
865   \*(Ps = \*1\*0\*4\*3 \(-> Enable raising of the window when Control-G is received.
866 (enables the \fBpopOnBell\fP resource).
867   \*(Ps = \*1\*0\*4\*7 \(-> Use Alternate Screen Buffer.  (This may be
868 disabled by the \fBtiteInhibit\fP resource).
869   \*(Ps = \*1\*0\*4\*8 \(-> Save cursor as in DECSC.  (This may be
870 disabled by the \fBtiteInhibit\fP resource).
871   \*(Ps = \*1\*0\*4\*9 \(-> Save cursor as in DECSC
872 and use Alternate Screen Buffer, clearing it first.  (This may be
873 disabled by the \fBtiteInhibit\fP resource).
874 This combines the effects of the \*1\*0\*4\*7 and \*1\*0\*4\*8 modes.
875 Use this with terminfo-based applications rather than the \*4\*7 mode.
876   \*(Ps = \*1\*0\*5\*0 \(-> Set terminfo/termcap function-key mode.
877   \*(Ps = \*1\*0\*5\*1 \(-> Set Sun function-key mode.
878   \*(Ps = \*1\*0\*5\*2 \(-> Set HP function-key mode.
879   \*(Ps = \*1\*0\*5\*3 \(-> Set SCO function-key mode.
880   \*(Ps = \*1\*0\*6\*0 \(-> Set legacy keyboard emulation (X11R6).
881   \*(Ps = \*1\*0\*6\*1 \(-> Set VT220 keyboard emulation.
882   \*(Ps = \*2\*0\*0\*4 \(-> Set bracketed paste mode.
883 .
884 .IP \\*(Cs\\*(Pm\\*s\\*i
885 Media Copy (MC).
886   \*(Ps = \*0 \(-> Print screen (default).
887   \*(Ps = \*4 \(-> Turn off printer controller mode.
888   \*(Ps = \*5 \(-> Turn on printer controller mode.
889 .
890 .IP \\*(Cs\\*?\\*(Pm\\*s\\*i
891 Media Copy (MC, DEC-specific).
892   \*(Ps = \*1 \(-> Print line containing cursor.
893   \*(Ps = \*4 \(-> Turn off autoprint mode.
894   \*(Ps = \*5 \(-> Turn on autoprint mode.
895   \*(Ps = \*1 \*0 \(-> Print composed display, ignores DECPEX.
896   \*(Ps = \*1 \*1 \(-> Print all pages.
897 .
898 .IP \\*(Cs\\*(Pm\\*s\\*l
899 Reset Mode (RM).
900   \*(Ps = \*2 \(-> Keyboard Action Mode (AM).
901   \*(Ps = \*4 \(-> Replace Mode (IRM).
902   \*(Ps = \*1\*2 \(-> Send/receive (SRM).
903   \*(Ps = \*2\*0 \(-> Normal Linefeed (LNM).
904 .
905 .IP \\*(Cs\\*?\\*(Pm\\*s\\*l
906 DEC Private Mode Reset (DECRST).
907   \*(Ps = \*1 \(-> Normal Cursor Keys (DECCKM).
908   \*(Ps = \*2 \(-> Designate VT52 mode (DECANM).
909   \*(Ps = \*3 \(-> 80 Column Mode (DECCOLM).
910   \*(Ps = \*4 \(-> Jump (Fast) Scroll (DECSCLM).
911   \*(Ps = \*5 \(-> Normal Video (DECSCNM).
912   \*(Ps = \*6 \(-> Normal Cursor Mode (DECOM).
913   \*(Ps = \*7 \(-> No Wraparound Mode (DECAWM).
914   \*(Ps = \*8 \(-> No Auto-repeat Keys (DECARM).
915   \*(Ps = \*9 \(-> Don't send Mouse X & Y on button press.
916   \*(Ps = \*1\*0 \(-> Hide toolbar (rxvt).
917   \*(Ps = \*1\*2 \(-> Stop Blinking Cursor (att610).
918   \*(Ps = \*1\*8 \(-> Don't print form feed (DECPFF).
919   \*(Ps = \*1\*9 \(-> Limit print to scrolling region (DECPEX).
920   \*(Ps = \*2\*5 \(-> Hide Cursor (DECTCEM).
921   \*(Ps = \*3\*0 \(-> Don't show scrollbar (rxvt).
922   \*(Ps = \*3\*5 \(-> Disable font-shifting functions (rxvt).
923   \*(Ps = \*4\*0 \(-> Disallow 80 \z\(<-\(-> 132 Mode.
924   \*(Ps = \*4\*1 \(-> No \fImore\fP(1) fix (see \fBcurses\fP resource).
925   \*(Ps = \*4\*2 \(-> Disable Nation Replacement Character sets (DECNRCM).
926   \*(Ps = \*4\*4 \(-> Turn Off Margin Bell.
927   \*(Ps = \*4\*5 \(-> No Reverse-wraparound Mode.
928   \*(Ps = \*4\*6 \(-> Stop Logging.
929 (This is normally disabled by a compile-time option).
930   \*(Ps = \*4\*7 \(-> Use Normal Screen Buffer.
931   \*(Ps = \*6\*6 \(-> Numeric keypad (DECNKM).
932   \*(Ps = \*6\*7 \(-> Backarrow key sends delete (DECBKM).
933   \*(Ps = \*1\*0\*0\*0 \(-> Don't send Mouse X & Y on button press and
934 release.
935 See the section \fBMouse Tracking\fP.
936   \*(Ps = \*1\*0\*0\*1 \(-> Don't use Hilite Mouse Tracking.
937   \*(Ps = \*1\*0\*0\*2 \(-> Don't use Cell Motion Mouse Tracking.
938   \*(Ps = \*1\*0\*0\*3 \(-> Don't use All Motion Mouse Tracking.
939   \*(Ps = \*1\*0\*0\*4 \(-> Don't send FocusIn/FocusOut events.
940   \*(Ps = \*1\*0\*0\*5 \(-> Disable Extended Mouse Mode.
941   \*(Ps = \*1\*0\*1\*0 \(-> Don't scroll to bottom on tty output (rxvt).
942   \*(Ps = \*1\*0\*1\*1 \(-> Don't scroll to bottom on key press (rxvt).
943   \*(Ps = \*1\*0\*3\*4 \(-> Don't interpret "meta" key.
944 (This disables the \fBeightBitInput\fP resource).
945   \*(Ps = \*1\*0\*3\*5 \(-> Disable special modifiers for Alt and NumLock keys.
946 (This disables the \fBnumLock\fP resource).
947   \*(Ps = \*1\*0\*3\*6 \(-> Don't send ESC when Meta modifies a key.
948 (This disables the \fBmetaSendsEscape\fP resource).
949   \*(Ps = \*1\*0\*3\*7 \(-> Send VT220 Remove from the editing-keypad Delete key.
950   \*(Ps = \*1\*0\*3\*9 \(-> Don't send ESC when Alt modifies a key.
951 (This disables the \fBaltSendsEscape\fP resource).
952   \*(Ps = \*1\*0\*4\*0 \(-> Do not keep selection when not highlighted.
953 (This disables the \fBkeepSelection\fP resource).
954   \*(Ps = \*1\*0\*4\*1 \(-> Use the PRIMARY selection.
955 (This disables the \fBselectToClipboard\fP resource).
956   \*(Ps = \*1\*0\*4\*2 \(-> Disable Urgency window manager hint when Control-G is received.
957 (This disables the \fBbellIsUrgent\fP resource).
958   \*(Ps = \*1\*0\*4\*3 \(-> Disable raising of the window when Control-G is received.
959 (This disables the \fBpopOnBell\fP resource).
960   \*(Ps = \*1\*0\*4\*7 \(-> Use Normal Screen Buffer, clearing screen
961 first if in the Alternate Screen.  (This may be
962 disabled by the \fBtiteInhibit\fP resource).
963   \*(Ps = \*1\*0\*4\*8 \(-> Restore cursor as in DECRC.  (This may be
964 disabled by the \fBtiteInhibit\fP resource).
965   \*(Ps = \*1\*0\*4\*9 \(-> Use Normal Screen Buffer and restore cursor
966 as in DECRC.  (This may be disabled by the \fBtiteInhibit\fP resource).
967 This combines the effects of the \*1\*0\*4\*7 and \*1\*0\*4\*8 modes.
968 Use this with terminfo-based applications rather than the \*4\*7 mode.
969   \*(Ps = \*1\*0\*5\*0 \(-> Reset terminfo/termcap function-key mode.
970   \*(Ps = \*1\*0\*5\*1 \(-> Reset Sun function-key mode.
971   \*(Ps = \*1\*0\*5\*2 \(-> Reset HP function-key mode.
972   \*(Ps = \*1\*0\*5\*3 \(-> Reset SCO function-key mode.
973   \*(Ps = \*1\*0\*6\*0 \(-> Reset legacy keyboard emulation (X11R6).
974   \*(Ps = \*1\*0\*6\*1 \(-> Reset keyboard emulation to Sun/PC style.
975   \*(Ps = \*2\*0\*0\*4 \(-> Reset bracketed paste mode.
976 .
977 .IP \\*(Cs\\*(Pm\\*s\\*m
978 Character Attributes (SGR).
979   \*(Ps = \*0 \(-> Normal (default).
980   \*(Ps = \*1 \(-> Bold.
981   \*(Ps = \*4 \(-> Underlined.
982   \*(Ps = \*5 \(-> Blink (appears as Bold).
983   \*(Ps = \*7 \(-> Inverse.
984   \*(Ps = \*8 \(-> Invisible, i.e., hidden (VT300).
985   \*(Ps = \*2\*2 \(-> Normal (neither bold nor faint).
986   \*(Ps = \*2\*4 \(-> Not underlined.
987   \*(Ps = \*2\*5 \(-> Steady (not blinking).
988   \*(Ps = \*2\*7 \(-> Positive (not inverse).
989   \*(Ps = \*2\*8 \(-> Visible, i.e., not hidden (VT300).
990   \*(Ps = \*3\*0 \(-> Set foreground color to Black.
991   \*(Ps = \*3\*1 \(-> Set foreground color to Red.
992   \*(Ps = \*3\*2 \(-> Set foreground color to Green.
993   \*(Ps = \*3\*3 \(-> Set foreground color to Yellow.
994   \*(Ps = \*3\*4 \(-> Set foreground color to Blue.
995   \*(Ps = \*3\*5 \(-> Set foreground color to Magenta.
996   \*(Ps = \*3\*6 \(-> Set foreground color to Cyan.
997   \*(Ps = \*3\*7 \(-> Set foreground color to White.
998   \*(Ps = \*3\*9 \(-> Set foreground color to default (original).
999   \*(Ps = \*4\*0 \(-> Set background color to Black.
1000   \*(Ps = \*4\*1 \(-> Set background color to Red.
1001   \*(Ps = \*4\*2 \(-> Set background color to Green.
1002   \*(Ps = \*4\*3 \(-> Set background color to Yellow.
1003   \*(Ps = \*4\*4 \(-> Set background color to Blue.
1004   \*(Ps = \*4\*5 \(-> Set background color to Magenta.
1005   \*(Ps = \*4\*6 \(-> Set background color to Cyan.
1006   \*(Ps = \*4\*7 \(-> Set background color to White.
1007   \*(Ps = \*4\*9 \(-> Set background color to default (original).
1008 .sP
1009 If 16-color support is compiled, the following apply.
1010 Assume that \fIxterm\fP's resources
1011 are set so that the ISO color codes are the first 8 of a set of 16.
1012 Then the \fIaixterm\fP colors are the bright versions of the ISO colors:
1013   \*(Ps = \*9\*0 \(-> Set foreground color to Black.
1014   \*(Ps = \*9\*1 \(-> Set foreground color to Red.
1015   \*(Ps = \*9\*2 \(-> Set foreground color to Green.
1016   \*(Ps = \*9\*3 \(-> Set foreground color to Yellow.
1017   \*(Ps = \*9\*4 \(-> Set foreground color to Blue.
1018   \*(Ps = \*9\*5 \(-> Set foreground color to Magenta.
1019   \*(Ps = \*9\*6 \(-> Set foreground color to Cyan.
1020   \*(Ps = \*9\*7 \(-> Set foreground color to White.
1021   \*(Ps = \*1\*0\*0 \(-> Set background color to Black.
1022   \*(Ps = \*1\*0\*1 \(-> Set background color to Red.
1023   \*(Ps = \*1\*0\*2 \(-> Set background color to Green.
1024   \*(Ps = \*1\*0\*3 \(-> Set background color to Yellow.
1025   \*(Ps = \*1\*0\*4 \(-> Set background color to Blue.
1026   \*(Ps = \*1\*0\*5 \(-> Set background color to Magenta.
1027   \*(Ps = \*1\*0\*6 \(-> Set background color to Cyan.
1028   \*(Ps = \*1\*0\*7 \(-> Set background color to White.
1029 .sP
1030 If \fIxterm\fP is compiled with the 16-color support disabled, it supports
1031 the following, from \fIrxvt\fP:
1032   \*(Ps = \*1\*0\*0 \(-> Set foreground and background color to default.
1033 .sP
1034 If 88- or 256-color support is compiled, the following apply.
1035   \*(Ps = \*3\*8 ; \*5 ; \*(Ps \(-> Set foreground color to the second \*(Ps.
1036   \*(Ps = \*4\*8 ; \*5 ; \*(Ps \(-> Set background color to the second \*(Ps.
1037 .sp
1038 .
1039 .IP \\*(Cs\\*>\\*(Ps\\*;\\*(Ps\\*s\\*m
1040 Set or reset resource-values used by \fIxterm\fP to decide whether to
1041 construct escape sequences holding information about the modifiers
1042 pressed with a given key.
1043 The first parameter identifies the resource to set/reset.
1044 The second parameter is the value to assign to the resource.
1045 If the second parameter is omitted, the resource is reset to its initial value.
1046   \*(Ps = \*1 \(-> modifyCursorKeys.
1047   \*(Ps = \*2 \(-> modifyFunctionKeys.
1048   \*(Ps = \*4 \(-> modifyOtherKeys.
1049 .br
1050 If no parameters are given, all resources are reset to their initial values.
1051 .
1052 .IP \\*(Cs\\*(Ps\\*s\\*n
1053 Device Status Report (DSR).
1054   \*(Ps = \*5 \(-> Status Report.  Result (``OK'') is
1055 .br
1056 \*(Cs\*0\*n
1057   \*(Ps = \*6 \(-> Report Cursor Position (CPR) [row;column].  Result is
1058 .br
1059 \*(Cs\*(Ir\*s\*;\*(Ic\*s\*R
1060 .
1061 .IP \\*(Cs\\*>\\*(Ps\\*s\\*n
1062 Disable modifiers which may be enabled via the
1063 \*(Cs\*>\*(Ps\*;\*(Ps\*s\*m
1064 sequence.
1065 This corresponds to a resource value of "-1", which cannot be set with
1066 the other sequence.
1067 The parameter identifies the resource to be disabled:
1068   \*(Ps = \*1 \(-> modifyCursorKeys.
1069   \*(Ps = \*2 \(-> modifyFunctionKeys.
1070   \*(Ps = \*4 \(-> modifyOtherKeys.
1071 .br
1072 If the parameter is omitted, \fBmodifyFunctionKeys\fP is disabled.
1073 When \fBmodifyFunctionKeys\fP is disabled, \fIxterm\fP uses the
1074 modifier keys to make an extended sequence of functions rather
1075 than adding a parameter to each function key to denote the modifiers.
1076 .
1077 .IP \\*(Cs\\*?\\*(Ps\\*s\\*n
1078 Device Status Report (DSR, DEC-specific).
1079   \*(Ps = \*6 \(-> Report Cursor Position (CPR) [row;column] as
1080 \*(Cs\*?\*(Ir\*s\*;\*(Ic\*s\*R
1081 (assumes page is zero).
1082   \*(Ps = \*1\*5 \(-> Report Printer status as
1083 \*(Cs\*?\*1\*0\*s\*n (ready).
1084 or
1085 \*(Cs\*?\*1\*1\*s\*n (not ready).
1086   \*(Ps = \*2\*5 \(-> Report UDK status as
1087 \*(Cs\*?\*2\*0\*s\*n (unlocked)
1088 or
1089 \*(Cs\*?\*2\*1\*s\*n (locked).
1090   \*(Ps = \*2\*6 \(-> Report Keyboard status as
1091 .br
1092 \*(Cs\*?\*2\*7\*s\*;\*s\*1\*s\*;\*s\*0\*s\*;\*s\*0\*s\*n (North American).
1093 .br
1094 The last two parameters apply to VT400 & up, and denote keyboard ready and LK01 respectively.
1095   \*(Ps = \*5\*3 \(-> Report Locator status as
1096 .br
1097 \*(Cs\*?\*5\*3\*s\*n Locator available, if compiled-in, or
1098 .br
1099 \*(Cs\*?\*5\*0\*s\*n No Locator, if not.
1100 .
1101 .IP \\*(Cs\\*>\\*(Ps\\*s\\*p
1102 Set resource value \fIpointerMode\fP.
1103 This is used by \fIxterm\fP to decide whether to
1104 hide the pointer cursor as the user types.
1105 Valid values for the parameter:
1106   \*(Ps = \*0 \(-> never hide the pointer.
1107   \*(Ps = \*1 \(-> hide if the mouse tracking mode is not enabled.
1108   \*(Ps = \*2 \(-> always hide the pointer.
1109 If no parameter is given, \fIxterm\fP uses the default,
1110 which is \*1.
1111 .
1112 .IP \\*(Cs\\*!\\*p
1113 Soft terminal reset (DECSTR).
1114 .
1115 .IP \\*(Cs\\*(Ps\\*$\\*p
1116 .br
1117 Request ANSI mode (DECRQM).
1118 For VT300 and up, reply is
1119 .br
1120   \*(Cs\*(Ps\*;\*(Pm\*$\*y
1121 .br
1122 where \*(Ps is the mode number as in RM,
1123 and \*(Pm is the mode value:
1124 .br
1125   0 - not recognized
1126   1 - set
1127   2 - reset
1128   3 - permanently set
1129   4 - permanently reset
1130 .
1131 .IP \\*(Cs\\*?\\*(Ps\\*$\\*p
1132 Request DEC private mode (DECRQM).
1133 For VT300 and up, reply is
1134 .br
1135   \*(Cs\*?\*(Ps\*;\*(Pm\*$\*p
1136 .br
1137 where \*(Ps is the mode number as in DECSET,
1138 \*(Pm is the mode value as in the ANSI DECRQM.
1139 .
1140 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*(c"\\*p
1141 Set conformance level (DECSCL).
1142 Valid values for the first parameter:
1143   \*(Ps = \*6\*1 \(-> VT100.
1144   \*(Ps = \*6\*2 \(-> VT200.
1145   \*(Ps = \*6\*3 \(-> VT300.
1146 .br
1147 Valid values for the second parameter:
1148   \*(Ps = \*0 \(-> 8-bit controls.
1149   \*(Ps = \*1 \(-> 7-bit controls (always set for VT100).
1150   \*(Ps = \*2 \(-> 8-bit controls.
1151 .
1152 .IP \\*(Cs\\*(Ps\\*s\\*q
1153 Load LEDs (DECLL).
1154   \*(Ps = \*0 \(-> Clear all LEDS (default).
1155   \*(Ps = \*1 \(-> Light Num Lock.
1156   \*(Ps = \*2 \(-> Light Caps Lock.
1157   \*(Ps = \*3 \(-> Light Scroll Lock.
1158   \*(Ps = \*2 \*1 \(-> Extinguish Num Lock.
1159   \*(Ps = \*2 \*2 \(-> Extinguish Caps Lock.
1160   \*(Ps = \*2 \*3 \(-> Extinguish Scroll Lock.
1161 .
1162 .IP \\*(Cs\\*(Ps\\*s\\*(Sp\\*q
1163 Set cursor style (DECSCUSR, VT520).
1164   \*(Ps = \*0 \(-> blinking block.
1165   \*(Ps = \*1 \(-> blinking block (default).
1166   \*(Ps = \*2 \(-> steady block.
1167   \*(Ps = \*3 \(-> blinking underline.
1168   \*(Ps = \*4 \(-> steady underline.
1169 .
1170 .IP \\*(Cs\\*(Ps\\*s\\*(c"\\*q
1171 Select character protection attribute (DECSCA).
1172 Valid values for the parameter:
1173   \*(Ps = \*0 \(-> DECSED and DECSEL can erase (default).
1174   \*(Ps = \*1 \(-> DECSED and DECSEL cannot erase.
1175   \*(Ps = \*2 \(-> DECSED and DECSEL can erase.
1176 .
1177 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*r
1178 Set Scrolling Region [top;bottom] (default = full size of window) (DECSTBM).
1179 .
1180 .IP \\*(Cs\\*?\\*(Pm\\*s\\*r
1181 Restore DEC Private Mode Values.
1182 The value of \*(Ps previously saved is restored.
1183 \*(Ps values are the same as for DECSET.
1184 .
1185 .IP \\*(Cs\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*;\\*(Ps\\*$\\*r
1186 Change Attributes in Rectangular Area (DECCARA), VT400 and up.
1187   \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle.
1188   \*(Ps denotes the SGR attributes to change: 0, 1, 4, 5, 7.
1189 .
1190 .IP \\*(Cs\\*(cs
1191 Save cursor (ANSI.SYS).
1192 .
1193 .IP \\*(Cs\\*?\\*(Pm\\*s\\*(cs
1194 Save DEC Private Mode Values.
1195 \*(Ps values are the same as for DECSET.
1196 .
1197 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*t
1198 Window manipulation (from \fIdtterm\fP, as well as extensions).
1199 These controls may be disabled using the \fIallowWindowOps\fP resource.
1200 Valid values for the first (and any additional parameters) are:
1201   \*(Ps = \*1 \(-> De-iconify window.
1202   \*(Ps = \*2 \(-> Iconify window.
1203   \*(Ps = \*3\*s\*;\*s\fIx\*s\*;\*sy\fP \(-> Move window to [x, y].
1204   \*(Ps = \*4\*s\*;\*s\fIheight\*s\*;\*swidth\fP \(-> Resize the \fIxterm\fP window to height and width in pixels.
1205   \*(Ps = \*5 \(-> Raise the \fIxterm\fP window to the front of the stacking order.
1206   \*(Ps = \*6 \(-> Lower the \fIxterm\fP window to the bottom of the stacking order.
1207   \*(Ps = \*7 \(-> Refresh the \fIxterm\fP window.
1208   \*(Ps = \*8\*s\*;\*s\fIheight\*s\*;\*swidth\fP \(-> Resize the text area to [height;width] in characters.
1209   \*(Ps = \*9\*s\*;\*s\*0 \(-> Restore maximized window.
1210   \*(Ps = \*9\*s\*;\*s\*1 \(-> Maximize window (i.e., resize to screen size).
1211   \*(Ps = \*1\*1 \(-> Report \fIxterm\fP window state.
1212 If the \fIxterm\fP window is open (non-iconified), it returns \*(Cs\*1\*t.
1213 If the \fIxterm\fP window is iconified, it returns \*(Cs\*2\*t.
1214   \*(Ps = \*1\*3 \(-> Report \fIxterm\fP window position.  Result is
1215 \*(Cs\*3\*;\*(Ix\*s\*;\*(Iy\*s\*t
1216   \*(Ps = \*1\*4 \(-> Report \fIxterm\fP window in pixels.  Result is
1217 \*(Cs\*s\*4\*s\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
1218   \*(Ps = \*1\*8 \(-> Report the size of the text area in characters.  Result is
1219 \*(Cs\*s\*8\*s\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
1220   \*(Ps = \*1\*9 \(-> Report the size of the screen in characters.  Result is
1221 \*(Cs\*s\*9\*s\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
1222   \*(Ps = \*2\*0 \(-> Report \fIxterm\fP window's icon label.  Result is
1223 \*(Os\*s\*L\*s\fIlabel\fP\*s\*(ST
1224   \*(Ps = \*2\*1 \(-> Report \fIxterm\fP window's title.  Result is
1225 \*(Os\*s\*l\*s\fIlabel\fP\*s\*(ST
1226   \*(Ps = \*2\*2\*s\*;\*s\*0 \(-> Save \fIxterm\fP icon and window title on stack.
1227   \*(Ps = \*2\*2\*s\*;\*s\*1 \(-> Save \fIxterm\fP icon title on stack.
1228   \*(Ps = \*2\*2\*s\*;\*s\*2 \(-> Save \fIxterm\fP window title on stack.
1229   \*(Ps = \*2\*3\*s\*;\*s\*0 \(-> Restore \fIxterm\fP icon and window title from stack.
1230   \*(Ps = \*2\*3\*s\*;\*s\*1 \(-> Restore \fIxterm\fP icon title from stack.
1231   \*(Ps = \*2\*3\*s\*;\*s\*2 \(-> Restore \fIxterm\fP window title from stack.
1232   \*(Ps >= \*2\*4 \(-> Resize to \*(Ps lines (DECSLPP).
1233 .
1234 .IP \\*(Cs\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*;\\*(Ps\\*$\\*t
1235 Reverse Attributes in Rectangular Area (DECRARA), VT400 and up.
1236   \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle.
1237   \*(Ps denotes the attributes to reverse, i.e.,  1, 4, 5, 7.
1238 .
1239 .IP \\*(Cs\\*>\\*(Ps\\*;\\*(Ps\\*s\\*t
1240 Set one or more features of the title modes.
1241 Each parameter enables a single feature.
1242   \*(Ps = \*0 \(-> Set window/icon labels using hexadecimal.
1243   \*(Ps = \*1 \(-> Query window/icon labels using hexadecimal.
1244   \*(Ps = \*2 \(-> Set window/icon labels using UTF-8.
1245   \*(Ps = \*3 \(-> Query window/icon labels using UTF-8.
1246 (See discussion of "Title Modes")
1247 .
1248 .IP \\*(Cs\\*(Ps\\*s\\*(Sp\\*t
1249 Set warning-bell volume (DECSWBV, VT520).
1250   \*(Ps = \*0 or \*1 \(-> off.
1251   \*(Ps = \*2, \*3 or \*4 \(-> low.
1252   \*(Ps = \*5, \*6, \*7, or \*8 \(-> high.
1253 .
1254 .IP \\*(Cs\\*u
1255 Restore cursor (ANSI.SYS).
1256 .
1257 .IP \\*(Cs\\*(Ps\\*s\\*(Sp\\*u
1258 Set margin-bell volume (DECSMBV, VT520).
1259   \*(Ps = \*1 \(-> off.
1260   \*(Ps = \*2, \*3 or \*4 \(-> low.
1261   \*(Ps = \*0, \*5, \*6, \*7, or \*8 \(-> high.
1262 .
1263 .IP \\*(Cs\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*;\\*(Pp\\*;\\*(Pt\\*;\\*(Pl\\*;\\*(Pp\\*$\\*v
1264 Copy Rectangular Area (DECCRA, VT400 and up).
1265   \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle.
1266   \*(Pp denotes the source page.
1267   \*(Pt\*;\*(Pl denotes the target location.
1268   \*(Pp denotes the target page.
1269 .
1270 .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*(qu\\*w
1271 Enable Filter Rectangle (DECEFR), VT420 and up.
1272 .br
1273 Parameters are [top;left;bottom;right].
1274 .br
1275 Defines the coordinates of a filter rectangle and activates it.
1276 Anytime the locator is detected outside of the filter rectangle,
1277 an outside rectangle event is generated and the rectangle is disabled.
1278 Filter rectangles are always treated as "one-shot" events.
1279 Any parameters that are omitted default to the current locator position.
1280 If all parameters are omitted, any locator motion will be reported.
1281 DECELR always cancels any prevous rectangle definition.
1282 .
1283 .IP \\*(Cs\\*(Ps\\*s\\*x
1284 Request Terminal Parameters (DECREQTPARM).
1285 .br
1286 if \*(Ps is a "0" (default) or "1", and \fBxterm\fR is emulating VT100,
1287 the control sequence elicits a response of the same form
1288 whose parameters describe the terminal:
1289   \*(Ps \(-> the given \*(Ps incremented by 2.
1290   \*(Pn = \*1 \(<- no parity.
1291   \*(Pn = \*1 \(<- eight bits.
1292   \*(Pn = \*1 \(<- \*2 \*8 transmit 38.4k baud.
1293   \*(Pn = \*1 \(<- \*2 \*8 receive 38.4k baud.
1294   \*(Pn = \*1 \(<- clock multiplier.
1295   \*(Pn = \*0 \(<- STP flags.
1296 .
1297 .IP \\*(Cs\\*(Ps\\*s\\*x
1298 Select Attribute Change Extent (DECSACE).
1299   \*(Ps = \*0 \(-> from start to end position, wrapped.
1300   \*(Ps = \*1 \(-> from start to end position, wrapped.
1301   \*(Ps = \*2 \(-> rectangle (exact).
1302 .
1303 .IP \\*(Cs\\*(Pc\\*;\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*$\\*x
1304 Fill Rectangular Area (DECFRA), VT420 and up.
1305   \*(Pc is the character to use.
1306   \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle.
1307 .
1308 .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Pu\\*s\\*(qu\\*z
1309 Enable Locator Reporting (DECELR).
1310 .br
1311 Valid values for the first parameter:
1312   \*(Ps = \*0 \(-> Locator disabled (default).
1313   \*(Ps = \*1 \(-> Locator enabled.
1314   \*(Ps = \*2 \(-> Locator enabled for one report, then disabled.
1315 .br
1316 The second parameter specifies the coordinate unit for locator reports.
1317 .br
1318 Valid values for the second parameter:
1319   \*(Pu = \*0 \(<- or omitted \(-> default to character cells.
1320   \*(Pu = \*1 \(<- device physical pixels.
1321   \*(Pu = \*2 \(<- character cells.
1322 .
1323 .IP \\*(Cs\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*$\\*z
1324 Erase Rectangular Area (DECERA), VT400 and up.
1325   \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle.
1326 .
1327 .IP \\*(Cs\\*(Pm\\*s\\*(qu\\*{
1328 Select Locator Events (DECSLE).
1329 .br
1330 Valid values for the first (and any additional parameters) are:
1331   \*(Ps = \*0 \(-> only respond to explicit host requests (DECRQLP).
1332              (This is default).  It also cancels any filter rectangle.
1333   \*(Ps = \*1 \(-> report button down transitions.
1334   \*(Ps = \*2 \(-> do not report button down transitions.
1335   \*(Ps = \*3 \(-> report button up transitions.
1336   \*(Ps = \*4 \(-> do not report button up transitions.
1337 .
1338 .IP \\*(Cs\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*$\\*{
1339 Selective Erase Rectangular Area (DECSERA), VT400 and up.
1340   \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle.
1341 .
1342 .IP \\*(Cs\\*(Ps\\*s\\*(qu\\*|
1343 Request Locator Position (DECRQLP).
1344 .br
1345 Valid values for the parameter are:
1346   \*(Ps = \*0, 1 or omitted \(-> transmit a single DECLRP locator report.
1347 .sP
1348 If Locator Reporting has been enabled by a DECELR, xterm will respond
1349 with a DECLRP Locator Report.
1350 This report is also generated on button
1351 up and down events if they have been enabled with a DECSLE, or when
1352 the locator is detected outside of a filter rectangle, if filter rectangles
1353 have been enabled with a DECEFR.
1354 .sP
1355   \(-> \*(Cs\*(Pe\*s\*;\*(Pb\*s\*;\*(Pr\*s\*;\*(Pc\*s\*;\*(Pp\*s\*&\*s\*w
1356 .sP
1357 Parameters are [event;button;row;column;page].
1358 .br
1359 Valid values for the event:
1360   \*(Pe = \*0 \(-> locator unavailable - no other parameters sent.
1361   \*(Pe = \*1 \(-> request - xterm received a DECRQLP.
1362   \*(Pe = \*2 \(-> left button down.
1363   \*(Pe = \*3 \(-> left button up.
1364   \*(Pe = \*4 \(-> middle button down.
1365   \*(Pe = \*5 \(-> middle button up.
1366   \*(Pe = \*6 \(-> right button down.
1367   \*(Pe = \*7 \(-> right button up.
1368   \*(Pe = \*8 \(-> M4 button down.
1369   \*(Pe = \*9 \(-> M4 button up.
1370   \*(Pe = \*1\*0 \(-> locator outside filter rectangle.
1371 .br
1372 ``button'' parameter is a bitmask indicating which buttons are pressed:
1373   \*(Pb = \*0 \(<- no buttons down.
1374   \*(Pb & \*1 \(<- right button down.
1375   \*(Pb & \*2 \(<- middle button down.
1376   \*(Pb & \*4 \(<- left button down.
1377   \*(Pb & \*8 \(<- M4 button down.
1378 .br
1379 ``row'' and ``column'' parameters are the coordinates of the locator
1380 position in the xterm window, encoded as ASCII decimal.
1381 .br
1382 The ``page'' parameter is not used by xterm, and will be omitted.
1383 .
1384 .Ed
1385 .
1386 .St
1387 .Ss
1388 Operating System Controls
1389 .
1390 .IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(ST
1391 .IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(Be
1392 Set Text Parameters.
1393 For colors and font,
1394 if \*(Pt is a "?", the control sequence elicits a response which consists
1395 of the control sequence which would set the corresponding value.
1396 The \fIdtterm\fP control sequences allow you to determine the icon name
1397 and window title.
1398   \*(Ps = \*0 \(-> Change Icon Name and Window Title to \*(Pt.
1399   \*(Ps = \*1 \(-> Change Icon Name to \*(Pt.
1400   \*(Ps = \*2 \(-> Change Window Title to \*(Pt.
1401   \*(Ps = \*3 \(-> Set X property on top-level window.
1402 \*(Pt should be in the form
1403 "\fIprop=value\fP", or just "\fIprop\fP" to delete the property
1404   \*(Ps = \*4 ; \fIc ; spec\fP \(-> Change Color Number \fIc\fP to
1405 the color specified by \fIspec\fP.
1406 This can be a name or RGB specification as per \fIXParseColor\fP.
1407 Any number of \fIc name\fP pairs may be given.
1408 The color numbers correspond to the ANSI colors 0-7,
1409 their bright versions 8-15,
1410 and if supported, the remainder of the 88-color or 256-color table.
1411 .sP
1412 If a "?" is given rather than a name or RGB specification,
1413 xterm replies with a control sequence of the same form which can be used
1414 to set the corresponding color.
1415 Because more than one pair of color number and specification can
1416 be given in one control sequence, \fBxterm\fR can make more than one reply.
1417 .sP
1418   \*(Ps = \*5 ; \fIc ; spec\fP \(-> Change Special Color Number \fIc\fP to
1419 the color specified by \fIspec\fP.
1420 This can be a name or RGB specification as per \fIXParseColor\fP.
1421 Any number of \fIc name\fP pairs may be given.
1422 The special colors can also be set by adding the maximum number of colors
1423 to these codes in an \*(Os\*4 control:
1424 .sP
1425   \*(Pc = \*0 \(<- resource \fBcolorBD\fP (BOLD).
1426   \*(Pc = \*1 \(<- resource \fBcolorUL\fP (UNDERLINE).
1427   \*(Pc = \*2 \(<- resource \fBcolorBL\fP (BLINK).
1428   \*(Pc = \*3 \(<- resource \fBcolorRV\fP (REVERSE).
1429 .sP
1430 The 8 colors (below) which may be set or queried
1431 using \*1\*0 through \*1\*7 are
1432 denoted \fIdynamic colors\fR, since the corresponding control sequences
1433 were the first means for setting \fBxterm\fR's colors dynamically,
1434 i.e., after it was started.
1435 They are not the same as the ANSI colors.
1436 These controls may be disabled using the \fIallowColorOps\fP resource.
1437 At least one parameter is expected for \*(Pt.
1438 Each successive parameter changes the next color in the list.
1439 The value of \*(Ps tells the starting point in the list.
1440 The colors are specified by name or RGB specification as per \fIXParseColor\fP.
1441 .sP
1442 If a "?" is given rather than a name or RGB specification,
1443 xterm replies with a control sequence of the same form which can be used
1444 to set the corresponding dynamic color.
1445 Because more than one pair of color number and specification can
1446 be given in one control sequence, \fBxterm\fR can make more than one reply.
1447 .sP
1448   \*(Ps = \*1\*0 \(-> Change VT100 text foreground color to \*(Pt.
1449   \*(Ps = \*1\*1 \(-> Change VT100 text background color to \*(Pt.
1450   \*(Ps = \*1\*2 \(-> Change text cursor color to \*(Pt.
1451   \*(Ps = \*1\*3 \(-> Change mouse foreground color to \*(Pt.
1452   \*(Ps = \*1\*4 \(-> Change mouse background color to \*(Pt.
1453   \*(Ps = \*1\*5 \(-> Change Tektronix foreground color to \*(Pt.
1454   \*(Ps = \*1\*6 \(-> Change Tektronix background color to \*(Pt.
1455   \*(Ps = \*1\*7 \(-> Change highlight background color to \*(Pt.
1456   \*(Ps = \*1\*8 \(-> Change Tektronix cursor color to \*(Pt.
1457   \*(Ps = \*1\*9 \(-> Change highlight foreground color to \*(Pt.
1458 .sP
1459   \*(Ps = \*4\*6 \(-> Change Log File to \*(Pt.  (This is normally disabled by a
1460 compile-time option).
1461 .sP
1462   \*(Ps = \*5\*0 \(-> Set Font to \*(Pt.
1463 These controls may be disabled using the \fIallowFontOps\fP resource.
1464 If \*(Pt begins with a "#", index in the font menu, relative (if the
1465 next character is a plus or minus sign) or absolute.
1466 A number is
1467 expected but not required after the sign (the default is the current
1468 entry for relative, zero for absolute indexing).
1469 .br
1470 The same rule (plus or minus sign, optional number) is used when
1471 querying the font.
1472 The remainder of \*(Pt is ignored.
1473 .br
1474 A font can be specified after a "#" index expression,
1475 by adding a space and then the font specifier.
1476 .br
1477 If the "TrueType Fonts" menu entry is set (the \fBrenderFont\fP resource),
1478 then this control sets/queries the \fBfaceName\fP resource.
1479 .sP
1480   \*(Ps = \*5\*1 (reserved for Emacs shell).
1481 .sP
1482   \*(Ps = \*5\*2 \(-> Manipulate Selection Data.
1483 These controls may be disabled using the \fIallowWindowOps\fP resource.
1484 The parameter \*(Pt is parsed as
1485 .br
1486         \*(Pc\*;\*(Pd
1487 .br
1488 The first, \*(Pc, may contain any character from the
1489 set \*c \*p \*(cs \*0 \*1 \*2 \*3 \*4 \*5 \*6 \*7.
1490 It is used to construct a list of selection parameters for
1491 clipboard,
1492 primary,
1493 select,
1494 or cut buffers 0 through 8 respectively,
1495 in the order given.
1496 If the parameter is empty, \fIxterm\fP uses \*(cs\*0,
1497 to specify the configurable primary/clipboard selection and cut buffer 0.
1498 .br
1499 The second parameter, \*(Pd, gives the selection data.
1500 Normally this is a string encoded in base64.
1501 The data becomes the new selection,
1502 which is then available for pasting by other applications.
1503 .br
1504 If the second parameter is a \*?,
1505 \fIxterm\fP replies to the host with the selection
1506 data encoded using the same protocol.
1507 .Ed
1508 .sP
1509   \*(Ps = \*1\*0\*4 ; \fIc\fP \(-> Reset Color Number \fIc\fP.  It is reset to
1510 the color specified by the corresponding X resource.
1511 Any number of \fIc\fP parameters may be given.
1512 These parameters correspond to the ANSI colors 0-7,
1513 their bright versions 8-15,
1514 and if supported, the remainder of the 88-color or 256-color table.
1515 If no parameters are given, the entire table will be reset.
1516 .sP
1517   \*(Ps = \*1\*0\*5 ; \fIc\fP \(-> Reset Special Color Number \fIc\fP.  It is reset to
1518 the color specified by the corresponding X resource.
1519 Any number of \fIc\fP parameters may be given.
1520 These parameters correspond to the special colors which can be set
1521 using an \*(Os\*5 control (or by adding the maximum number of colors
1522 using an \*(Os\*4 control).
1523 .sP
1524 The \fIdynamic colors\fR can also be reset to their default (resource) values:
1525   \*(Ps = \*1\*1\*0 \(-> Reset VT100 text foreground color.
1526   \*(Ps = \*1\*1\*1 \(-> Reset VT100 text background color.
1527   \*(Ps = \*1\*1\*2 \(-> Reset text cursor color.
1528   \*(Ps = \*1\*1\*3 \(-> Reset mouse foreground color.
1529   \*(Ps = \*1\*1\*4 \(-> Reset mouse background color.
1530   \*(Ps = \*1\*1\*5 \(-> Reset Tektronix foreground color.
1531   \*(Ps = \*1\*1\*6 \(-> Reset Tektronix background color.
1532   \*(Ps = \*1\*1\*7 \(-> Reset highlight color.
1533   \*(Ps = \*1\*1\*8 \(-> Reset Tektronix cursor color.
1534 .
1535 .St
1536 .Ss
1537 Privacy Message
1538 .IP \\*(PM\\*(Pt\\*s\\*(ST
1539 \fIxterm\fP implements no \*(PM functions; \*(Pt is ignored.
1540 \*(Pt need not be printable characters.
1541 .Ed
1542 .
1543 .Sh "Alt and Meta Keys"
1544 .LP
1545 Many keyboards have keys labeled "Alt".
1546 Few have keys labeled "Meta".
1547 However, \fIxterm\fP's default translations use the \fIMeta\fP modifier.
1548 Common keyboard configurations assign the \fIMeta\fP modifier to an "Alt" key.
1549 By using \fIxmodmap\fP one may have the modifier assigned to a different key,
1550 and have "real" alt and meta keys.
1551 Here is an example:
1552 .DS B
1553 ! put meta on mod3 to distinguish it from alt
1554 keycode 64 = Alt_L
1555 clear mod1
1556 add mod1 = Alt_L
1557 keycode 115 = Meta_L
1558 clear mod3
1559 add mod3 = Meta_L
1560 .DE
1561 .lP
1562 The \fBmetaSendsEscape\fP resource
1563 (and \fBaltSendsEscape\fP if \fBaltIsNotMeta\fP is set)
1564 can be used to control the way the \fIMeta\fP modifier applies to ordinary
1565 keys unless the \fBmodifyOtherKeys\fP resource is set:
1566 .IP
1567 -
1568 prefix a key with the \*(Es character.
1569 .IP
1570 -
1571 shift the key from codes 0-127 to 128-255 by adding 128.
1572 .lP
1573 The table shows the result for a given character "x" with modifiers
1574 according to the default translations with the resources set on or off.
1575 This assumes \fBaltIsNotMeta\fP is set:
1576 .ne 18
1577 .TS
1578 center;
1579 lf3     lf3     lf3     lf3
1580 lf3w(2c)        lf3w(2c)        lf3w(2c)        lf3w(2c) .
1581 _
1582 key     altSendsEscape  metaSendsEscape result
1583 _
1584 x       off     off     x
1585 Meta-x  off     off     shift
1586 Alt-x   off     off     shift
1587 Alt+Meta-x      off     off     shift
1588 x       ON      off     x
1589 Meta-x  ON      off     shift
1590 Alt-x   ON      off     \*(Es x
1591 Alt+Meta-x      ON      off     \*(Es shift
1592 x       off     ON      x
1593 Meta-x  off     ON      \*(Es x
1594 Alt-x   off     ON      shift
1595 Alt+Meta-x      off     ON      \*(Es shift
1596 x       ON      ON      x
1597 Meta-x  ON      ON      \*(Es x
1598 Alt-x   ON      ON      \*(Es x
1599 Alt+Meta-x      ON      ON      \*(Es x
1600 _
1601 .TE
1602 .Sh "PC-Style Function Keys"
1603 .LP
1604 If \fIxterm\fP does minimal translation of the function keys, it usually does this
1605 with a PC-style keyboard, so PC-style function keys result.
1606 Sun keyboards are similar to PC keyboards.
1607 Both have cursor and scrolling operations printed on the keypad,
1608 which duplicate the smaller cursor and scrolling keypads.
1609 .lP
1610 X does not predefine NumLock (used for VT220 keyboards) or Alt (used as
1611 an extension for the Sun/PC keyboards) as modifiers.
1612 These keys are recognized as modifiers when enabled
1613 by the \fBnumLock\fP resource,
1614 or by the "DECSET \*1\*0\*3\*5" control sequence.
1615 .lP
1616 The cursor keys transmit the following escape sequences depending on the
1617 mode specified via the \fBDECCKM\fP escape sequence.
1618 .TS
1619 center;
1620 cf3     cf3     cf3
1621 lf3w(2c)        lf3w(2c)        lf3w(2c) .
1622 Key     Normal  Application
1623 _
1624 Cursor Up       \*(Cs\*A        \*(S3\*A
1625 Cursor Down     \*(Cs\*(cB      \*(S3\*(cB
1626 Cursor Right    \*(Cs\*C        \*(S3\*C
1627 Cursor Left     \*(Cs\*D        \*(S3\*D
1628 _
1629 .TE
1630 The home- and end-keys
1631 (unlike PageUp and other keys also on the 6-key editing keypad)
1632 are considered "cursor keys" by \fIxterm\fP.
1633 Their mode is also controlled by the \fBDECCKM\fP escape sequence:
1634 .TS
1635 center;
1636 cf3     cf3     cf3
1637 lf3w(2c)        lf3w(2c)        lf3w(2c) .
1638 Key     Normal  Application
1639 _
1640 Home    \*(Cs\*H        \*(S3\*H
1641 End     \*(Cs\*F        \*(S3\*F
1642 _
1643 .TE
1644 .lP
1645 The application keypad transmits the following escape sequences depending on the
1646 mode specified via the \fBDECPNM\fP and \fBDECPAM\fP escape sequences.
1647 Use the NumLock key to override the application mode.
1648 .lP
1649 Not all keys are present on the Sun/PC keypad (e.g., PF1, Tab), but are supported by
1650 the program.
1651 .ne 30
1652 .TS
1653 center;
1654 cf3     cf3     cf3     cf3     cf3
1655 lf3w(2c)        lf3w(2c)        lf3w(2c)        lf3w(2c)        lf3w(2c) .
1656 Key     Numeric Application     Terminfo        Termcap
1657 _
1658 Space   \*(Sp   \*(S3\*(Sp      -       -
1659 Tab     \*(Ta   \*(S3\*I        -       -
1660 Enter   \*(Cr   \*(S3\*M        kent    @8
1661 PF1     \*(S3\*P        \*(S3\*P        kf1     k1
1662 PF2     \*(S3\*Q        \*(S3\*Q        kf2     k2
1663 PF3     \*(S3\*R        \*(S3\*R        kf3     k3
1664 PF4     \*(S3\*S        \*(S3\*S        kf4     k4
1665 * \f1(multiply)\fP      \**     \*(S3\*j        -       -
1666 + \f1(add)\fP   \*+     \*(S3\*k        -       -
1667 , \f1(comma)\fP \*,     \*(S3\*l        -       -
1668 - \f1(minus)\fP \*-     \*(S3\*m        -       -
1669 \&. \f1(Delete)\fP      \*.     \*(Cs\*3\*(c~   -       -
1670 / \f1(divide)\fP        \*/     \*(S3\*o        -       -
1671 0 \f1(Insert)\fP        \*0     \*(Cs\*2\*(c~   -       -
1672 1 \f1(End)\fP   \*1     \*(S3\*F        kc1     K4
1673 2 \f1(DownArrow)\fP     \*2     \*(Cs\*(cB      -       -
1674 3 \f1(PageDown)\fP      \*3     \*(Cs\*6\*(c~   kc3     K5
1675 4 \f1(LeftArrow)\fP     \*4     \*(Cs\*D        -       -
1676 5 \f1(Begin)\fP \*5     \*(Cs\*E        kb2     K2
1677 6 \f1(RightArrow)\fP    \*6     \*(Cs\*C        -       -
1678 7 \f1(Home)\fP  \*7     \*(S3\*H        ka1     K1
1679 8 \f1(UpArrow)\fP       \*8     \*(Cs\*A        -       -
1680 9 \f1(PageUp)\fP        \*9     \*(Cs\*5\*(c~   ka3     K3
1681 = (equal)       \*=     \*(S3\*(XX      -       -
1682 _
1683 .TE
1684 .br
1685 They also provide 12 function keys, as well as a few other special-purpose keys:
1686 .ne 16
1687 .TS
1688 center;
1689 cf3     cf3
1690 lf3w(2c)        lf3w(2c) .
1691 Key     Escape Sequence
1692 _
1693 F1      \*(S3\*P
1694 F2      \*(S3\*Q
1695 F3      \*(S3\*R
1696 F4      \*(S3\*S
1697 F5      \*(Cs\*1\*5\*(c~
1698 F6      \*(Cs\*1\*7\*(c~
1699 F7      \*(Cs\*1\*8\*(c~
1700 F8      \*(Cs\*1\*9\*(c~
1701 F9      \*(Cs\*2\*0\*(c~
1702 F10     \*(Cs\*2\*1\*(c~
1703 F11     \*(Cs\*2\*3\*(c~
1704 F12     \*(Cs\*2\*4\*(c~
1705 _
1706 .TE
1707 .sP
1708 Older versions of \fIxterm\fP implement different escape sequences for F1 through F4.
1709 These can be activated by setting the \fBoldXtermFKeys\fP resource.
1710 However, since they do not correspond to any hardware terminal, they have been deprecated.
1711 (The DEC VT220 reserves F1 through F5 for local functions such as \fBSetup\fP).
1712 .ne 6
1713 .TS
1714 center;
1715 cf3     cf3
1716 lf3w(2c)        lf3w(2c) .
1717 Key     Escape Sequence
1718 _
1719 F1      \*(Cs\*1\*1\*(c~
1720 F2      \*(Cs\*1\*2\*(c~
1721 F3      \*(Cs\*1\*3\*(c~
1722 F4      \*(Cs\*1\*4\*(c~
1723 _
1724 .TE
1725 In normal mode, i.e., a Sun/PC keyboard
1726 when the \fBsunKeyboard\fP resource is false,
1727 \fIxterm\fP recognizes function key modifiers
1728 which are parameters appended before the final character
1729 of the control sequence.
1730 .TS
1731 center;
1732 cf3     lf3
1733 cf3w(2c)        lf3w(2c) .
1734 Code    Modifiers
1735 _
1736 2       Shift
1737 3       Alt
1738 4       Shift + Alt
1739 5       Control
1740 6       Shift + Control
1741 7       Alt + Control
1742 8       Shift + Alt + Control
1743 _
1744 .TE
1745 For example, shift-F5 would be sent as
1746 \*(Cs\*1\*5\*;\*2\*(c~
1747 .lP
1748 If the \fBalwaysUseMods\fP resource is set, the Meta modifier also is
1749 recognized, making parameters 9 through 16.
1750 .Sh "VT220-Style Function Keys"
1751 .LP
1752 However, \fIxterm\fP is most useful as a DEC VT102 or VT220 emulator.
1753 Set the \fBsunKeyboard\fP resource to true to force a Sun/PC keyboard
1754 to act like a VT220 keyboard.
1755 .lP
1756 The VT102/VT220 application keypad transmits unique escape sequences in
1757 application mode, which are distinct from the cursor and scrolling keypad:
1758 .ne 31
1759 .TS
1760 center;
1761 cf3     cf3     cf3
1762 lf3w(2c)        lf3w(2c)        lf3w(2c) .
1763 Key     Numeric Application
1764 _
1765 Space   \*(Sp   \*(S3\*(Sp
1766 Tab     \*(Ta   \*(S3\*I
1767 Enter   \*(Cr   \*(S3\*M
1768 PF1     \*(S3\*P        \*(S3\*P
1769 PF2     \*(S3\*Q        \*(S3\*Q
1770 PF3     \*(S3\*R        \*(S3\*R
1771 PF4     \*(S3\*S        \*(S3\*S
1772 * \f1(multiply)\fP      \**     \*(S3\*j
1773 + \f1(add)\fP   \*+     \*(S3\*k
1774 , \f1(comma)\fP \*,     \*(S3\*l
1775 - \f1(minus)\fP \*-     \*(S3\*m
1776 \&. \f1(period)\fP      \*.     \*(S3\*n
1777 / \f1(divide)\fP        \*/     \*(S3\*o
1778 0       \*0     \*(S3\*p
1779 1       \*1     \*(S3\*q
1780 2       \*2     \*(S3\*r
1781 3       \*3     \*(S3\*(cs
1782 4       \*4     \*(S3\*t
1783 5       \*5     \*(S3\*u
1784 6       \*6     \*(S3\*v
1785 7       \*7     \*(S3\*w
1786 8       \*8     \*(S3\*x
1787 9       \*9     \*(S3\*y
1788 = (equal)       \*=     \*(S3\*(XX
1789 _
1790 .TE
1791 The VT220 provides a 6-key editing keypad,
1792 which is analogous to that on the PC keyboard.
1793 It is not affected by \fBDECCKM\fP or \fBDECPNM\fP/\fBDECPAM\fP:
1794 .ne 10
1795 .TS
1796 center;
1797 cf3     cf3     cf3
1798 lf3w(2c)        lf3w(2c)        lf3w(2c) .
1799 Key     Normal  Application
1800 _
1801 \f1Insert\fP    \*(Cs\*2\*(c~   \*(Cs\*2\*(c~
1802 \f1Delete\fP    \*(Cs\*3\*(c~   \*(Cs\*3\*(c~
1803 \f1Home\fP      \*(Cs\*1\*(c~   \*(Cs\*1\*(c~
1804 \f1End\fP       \*(Cs\*4\*(c~   \*(Cs\*4\*(c~
1805 \f1PageUp\fP    \*(Cs\*5\*(c~   \*(Cs\*5\*(c~
1806 \f1PageDown\fP  \*(Cs\*6\*(c~   \*(Cs\*6\*(c~
1807 _
1808 .TE
1809 .LP
1810 The VT220 provides 8 additional function keys.
1811 With a Sun/PC keyboard, access these keys by Control/F1 for F13, etc.
1812 .ne 16
1813 .TS
1814 center;
1815 cf3     cf3
1816 lf3w(2c)        lf3w(2c) .
1817 Key     Escape Sequence
1818 _
1819 F13     \*(Cs\*2\*5\*(c~
1820 F14     \*(Cs\*2\*6\*(c~
1821 F15     \*(Cs\*2\*8\*(c~
1822 F16     \*(Cs\*2\*9\*(c~
1823 F17     \*(Cs\*3\*1\*(c~
1824 F18     \*(Cs\*3\*2\*(c~
1825 F19     \*(Cs\*3\*3\*(c~
1826 F20     \*(Cs\*3\*4\*(c~
1827 _
1828 .TE
1829 .Sh "VT52-Style Function Keys"
1830 .LP
1831 A VT52 does not have function keys, but it does have a numeric keypad and cursor keys.
1832 They differ from the other emulations by the prefix.
1833 Also, the cursor keys do not change:
1834 .ne 10
1835 .TS
1836 center;
1837 cf3     cf3
1838 lf3w(2c)        lf3w(2c) .
1839 Key     Normal/Application
1840 _
1841 Cursor Up       \*(Es\*A
1842 Cursor Down     \*(Es\*(cB
1843 Cursor Right    \*(Es\*C
1844 Cursor Left     \*(Es\*D
1845 _
1846 .TE
1847 The keypad is similar:
1848 .TS
1849 center;
1850 cf3     cf3     cf3
1851 lf3w(2c)        lf3w(2c)        lf3w(2c) .
1852 Key     Numeric Application
1853 _
1854 Space   \*(Sp   \*(Es\*?\*(Sp
1855 Tab     \*(Ta   \*(Es\*?\*I
1856 Enter   \*(Cr   \*(Es\*?\*M
1857 PF1     \*(Es\*P        \*(Es\*P
1858 PF2     \*(Es\*Q        \*(Es\*Q
1859 PF3     \*(Es\*R        \*(Es\*R
1860 PF4     \*(Es\*S        \*(Es\*S
1861 * \f1(multiply)\fP      \**     \*(Es\*?\*j
1862 + \f1(add)\fP   \*+     \*(Es\*?\*k
1863 , \f1(comma)\fP \*,     \*(Es\*?\*l
1864 - \f1(minus)\fP \*-     \*(Es\*?\*m
1865 \&. \f1(period)\fP      \*.     \*(Es\*?\*n
1866 / \f1(divide)\fP        \*/     \*(Es\*?\*o
1867 0       \*0     \*(Es\*?\*p
1868 1       \*1     \*(Es\*?\*q
1869 2       \*2     \*(Es\*?\*r
1870 3       \*3     \*(Es\*?\*(cs
1871 4       \*4     \*(Es\*?\*t
1872 5       \*5     \*(Es\*?\*u
1873 6       \*6     \*(Es\*?\*v
1874 7       \*7     \*(Es\*?\*w
1875 8       \*8     \*(Es\*?\*x
1876 9       \*9     \*(Es\*?\*y
1877 = (equal)       \*=     \*(Es\*?\*(XX
1878 _
1879 .TE
1880 .Sh "Sun-Style Function Keys"
1881 .LP
1882 The \fIxterm\fP program provides support for Sun keyboards more directly, by
1883 a menu toggle that causes it to send Sun-style function key codes rather than VT220.
1884 Note, however, that the \fIsun\fP and \fIVT100\fP emulations are not really
1885 compatible.
1886 For example, their wrap-margin behavior differs.
1887 .lP
1888 Only function keys are altered; keypad and cursor keys are the same.
1889 The emulation responds identically.
1890 See the xterm-sun terminfo entry for details.
1891 .Sh "HP-Style Function Keys"
1892 .LP
1893 Similarly, \fIxterm\fP can be compiled to support HP keyboards.
1894 See the xterm-hp terminfo entry for details.
1895 .Sh "The Alternate Screen Buffer"
1896 .LP
1897 \fBXterm\fP maintains two screen buffers.
1898 The normal screen buffer allows you to scroll back to view saved lines
1899 of output up to the maximum set by the \fBsaveLines\fP resource.
1900 The alternate screen buffer is exactly as large as the display,
1901 contains no additional saved lines.
1902 When the alternate screen buffer is active,
1903 you cannot scroll back to view saved lines.
1904 \fBXterm\fP provides control sequences and menu entries
1905 for switching between the two.
1906 .lP
1907 Most full-screen applications use terminfo or termcap to obtain
1908 strings used to start/stop full-screen mode,
1909 i.e., \fIsmcup\fP and \fIrmcup\fP for terminfo,
1910 or the corresponding \fIti\fP and \fIte\fP for termcap.
1911 The \fBtiteInhibit\fP resource removes the \fIti\fP and \fIte\fP strings
1912 from the TERMCAP string which is set in the environment for some platforms.
1913 That is not done when \fBxterm\fP is built with terminfo libraries because
1914 terminfo does not provide the whole text of the termcap data in one piece.
1915 It would not work for terminfo anyway, since terminfo data is not passed
1916 in environment variables;
1917 setting an environment variable in this manner would have no effect on
1918 the application's ability to switch between normal and alternate screen
1919 buffers.
1920 Instead, the newer private mode controls
1921 (such as \*1\*0\*4\*9)
1922 for switching between normal
1923 and alternate screen buffers simply disable the switching.
1924 They add other features such as clearing the display for the same reason:
1925 to make the details of switching independent of the application that
1926 requests the switch.
1927 .
1928 .Sh "Bracketed Paste Mode"
1929 .LP
1930 When bracketed paste mode is set,
1931 pasted text is bracketed with control sequences
1932 so that the program can differentiate pasted text from typed-in text.
1933 When bracketed paste mode is set,
1934 the program will receive:
1935    ESC [ 200 ~,
1936 .br
1937 followed by the pasted text, followed by
1938    ESC [ 201 ~.
1939 .
1940 .Sh "Title Modes"
1941 .LP
1942 The window- and icon-labels can be set or queried using control sequences.
1943 As a VT220-emulator, \fIxterm\fP "should" limit the character encoding for
1944 the corresponding strings to ISO-8859-1.
1945 Indeed, it used to be the case (and was documented) that
1946 window titles had to be ISO-8859-1.
1947 This is no longer the case.
1948 However, there are many applications which still assume that titles are
1949 set using ISO-8859-1.
1950 So that is the default behavior.
1951 .lP
1952 If \fIxterm\fP is running with UTF-8 encoding,
1953 it is possible to use window- and icon-labels encoded using UTF-8.
1954 That is because the underlying X libraries (and many, but not all)
1955 window managers support this feature.
1956 .lP
1957 The \fButf8Title\fP X resource setting tells \fIxterm\fP to disable
1958 a reconversion of the title string back to ISO-8859-1,
1959 allowing the title strings to be interpreted as UTF-8.
1960 The same feature can be enabled using the title mode control sequence
1961 described in this summary.
1962 .lP
1963 Separate from the ability to set the titles,
1964 \fIxterm\fP provides the ability to query the titles,
1965 returning them either in ISO-8859-1 or UTF-8.
1966 This choice is available only while \fIxterm\fP is using UTF-8 encoding.
1967 .lP
1968 Finally, the characters sent to, or returned by a title control
1969 are less constrained than the rest of the control sequences.
1970 To make them more manageable (and constrained), for use in shell scripts,
1971 \fIxterm\fP has an optional feature which decodes the string from hexadecimal
1972 (for setting titles) or for encoding the title into hexadecimal when querying
1973 the value.
1974 .
1975 .Sh "Mouse Tracking"
1976 .LP
1977 The VT widget can be set to send the mouse position and other
1978 information on button presses.
1979 These modes are typically used by
1980 editors and other full-screen applications that want to make use of
1981 the mouse.
1982 .lP
1983 There are six mutually exclusive modes.
1984 One is DEC Locator mode, enabled by the
1985 DECELR \*(Cs\*(Ps\*s\*;\*(Ps\*s\*s\*(qu\*s\*z
1986 control sequence, and is not described here
1987 (control sequences are summarized above).
1988 The remaining five
1989 modes are each enabled (or disabled) by a different parameter in
1990 the "DECSET \*(Cs\*?\*(Pm\*s\*h"
1991 or
1992 "DECRST \*(Cs\*?\*(Pm\*s\*l"
1993 control sequence.
1994 .lP
1995 Manifest constants for the parameter values
1996 are defined in \fBxcharmouse.h\fP as follows:
1997 .
1998 .DS B
1999 #define SET_X10_MOUSE               9
2000 #define SET_VT200_MOUSE             1000
2001 #define SET_VT200_HIGHLIGHT_MOUSE   1001
2002 #define SET_BTN_EVENT_MOUSE         1002
2003 #define SET_ANY_EVENT_MOUSE         1003
2004
2005 #define SET_FOCUS_EVENT_MOUSE       1004
2006
2007 #define SET_EXT_MODE_MOUSE          1005
2008 .DE
2009 .br
2010 The motion reporting modes are strictly \fIxterm\fP extensions, and are not
2011 part of any standard, though they are analogous to the DEC VT200 DECELR
2012 locator reports.
2013 .lP
2014 Parameters (such as pointer position and button number) for all mouse
2015 tracking escape sequences generated by \fIxterm\fP
2016 encode numeric parameters in a single character as
2017 \fIvalue\fP+32.
2018 For example, \*! specifies the value 1.
2019 The upper left character position on the terminal is denoted as 1,1.
2020 .lP
2021 X10 compatibility mode sends an escape sequence only on button press,
2022 encoding the location and the mouse button pressed.
2023 It is enabled by specifying parameter 9 to DECSET.
2024 On button press, \fIxterm\fP sends
2025 \*(Cs\*M\*(Cb\*(Cx\*(Cy (6 characters).
2026 .bP
2027 \*(Cb is button\-1.
2028 .bP
2029 \*(Cx and \*(Cy are the x and y coordinates of the mouse when the
2030 button was pressed.
2031 .lP
2032 Normal tracking mode sends an escape sequence on both button press and
2033 release.
2034 Modifier key (shift, ctrl, meta) information is also sent.
2035 It is enabled by specifying parameter 1000 to DECSET.
2036 On button press or release, \fIxterm\fP sends
2037 \*(Cs\*M\*(Cb\*(Cx\*(Cy.
2038 .bP
2039 The low two bits of \*(Cb encode button information:
2040 0=MB1 pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release.
2041 .bP
2042 The next three bits encode the modifiers which were down when the button was
2043 pressed and are added together:  4=Shift, 8=Meta, 16=Control.
2044 Note however that the shift and control bits are normally unavailable
2045 because \fIxterm\fP uses the control modifier with mouse for popup menus,
2046 and the shift modifier is used in the default translations for button events.
2047 The \fIMeta\fP modifier recognized by \fIxterm\fP is the \fImod1\fP mask,
2048 and is not necessarily the "Meta" key (see \fIxmodmap\fP).
2049 .bP
2050 \*(Cx and \*(Cy are the x and y coordinates of the mouse event, encoded as
2051 in X10 mode.
2052 .lP
2053 Wheel mice may return buttons 4 and 5.
2054 Those buttons are represented by the same event codes
2055 as buttons 1 and 2 respectively,
2056 except that 64 is added to the event code.
2057 Release events for the wheel buttons are not reported.
2058 .lP
2059 Mouse highlight tracking notifies a program of a button press, receives a
2060 range of lines from the program, highlights the region covered by
2061 the mouse within that range until button release, and then sends the
2062 program the release coordinates.
2063 It is enabled by specifying parameter 1001 to DECSET.
2064 Highlighting is performed only for button 1, though other button events
2065 can be received.
2066 .sP
2067 \fBWarning:\fP use of this mode requires a cooperating program or it will
2068 hang \fIxterm.\fP
2069 .sP
2070 On button press, the same information as for normal tracking is
2071 generated; \fIxterm\fP then waits for the program to send mouse
2072 tracking information.
2073 \fIAll X events are ignored until the proper escape sequence is
2074 received from the pty:\fP
2075 \*(Cs\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*T.
2076 The parameters are \fIfunc, startx, starty, firstrow,\fP and \fIlastrow.\fP
2077 \fIfunc\fP is non-zero to initiate highlight tracking and zero to abort.
2078 \fIstartx\fP and \fIstarty\fP give the starting x and y location for
2079 the highlighted region.
2080 The ending location tracks the mouse, but
2081 will never be above row \fIfirstrow\fP and will always be above row
2082 \fIlastrow.\fP
2083 (The top of the screen is row 1.)
2084 When the button is released, \fIxterm\fP reports the ending position
2085 one of two ways:
2086 .bP
2087 if the start and end coordinates are the same locations:
2088 .br
2089 \*(Cs\*t\*(Cx\*(Cy.
2090 .bP
2091 otherwise:
2092 .br
2093 \*(Cs\*T\*(Cx\*(Cy\*(Cx\*(Cy\*(Cx\*(Cy.
2094 .br
2095 The parameters are \fIstartx, starty, endx, endy, mousex,\fP and \fImousey.\fP
2096 .RS
2097 .IP \- 5
2098 \fIstartx, starty, endx, \fPand\fI endy\fP give the starting and
2099 ending character positions of the region.
2100 .IP \- 5
2101 \fImousex\fP and \fImousey\fP
2102 give the location of the mouse at button up, which may not be over a
2103 character.
2104 .RE
2105 .lP
2106 Button-event tracking is essentially the same as normal tracking, but
2107 \fIxterm\fP also reports button-motion events.
2108 Motion events
2109 are reported only if the mouse pointer has moved to a different character
2110 cell.
2111 It is enabled by specifying parameter 1002 to DECSET.
2112 On button press or release, \fIxterm\fP sends the same codes used by normal
2113 tracking mode.
2114 .bP
2115 On button-motion events, \fIxterm\fP adds 32 to the event code
2116 (the third character, \*(Cb).
2117 .bP
2118 The other bits of the event code specify button and modifier keys as in normal mode.
2119 For example, motion into cell x,y with button 1
2120 down is reported as \*(Cs\*M\*@\*(Cx\*(Cy.
2121 (\ \*@ = 32 + 0 (button 1) + 32 (motion indicator)\ ).
2122 Similarly, motion with button 3
2123 down is reported as \*(Cs\*M\*(cB\*(Cx\*(Cy.
2124 (\ \*(cB = 32 + 2 (button 3) + 32 (motion indicator)\ ).
2125 .lP
2126 Any-event mode is the same as button-event mode, except that all motion
2127 events are reported, even if no mouse button is down.
2128 It is enabled by specifying 1003 to DECSET.
2129 .lP
2130 FocusIn/FocusOut can be combined with any of the mouse events since
2131 it uses a different protocol.
2132 When set, it causes \fIxterm\fP to send
2133 \*(Cs\*I when the terminal gains focus, and
2134 \*(Cs\*O when it loses focus.
2135 .lP
2136 Extended mouse mode enables UTF-8 encoding for \*(Cx and \*(Cy under
2137 all tracking modes, expanding the maximum encodable position from 223 to 2015.
2138 For positions less than 95, the resulting output is identical under both modes.
2139 Under extended mouse mode, positions greater than 95
2140 generate "extra" bytes which will confuse applications which do not treat
2141 their input as a UTF-8 stream.
2142 Likewise, \*(Cb will be UTF-8 encoded,
2143 to reduce confusion with wheel mouse events.
2144 .lP
2145 NOTE: Under normal mouse mode, positions outside (160,94) result in
2146 byte pairs which can be interpreted as a single UTF-8 character;
2147 applications
2148 which do treat their input as UTF-8 will almost certainly be confused
2149 unless extended mouse mode is active.
2150 .
2151 .Sh "Tektronix 4014 Mode"
2152 .LP
2153 Most of these sequences are standard Tektronix 4014 control sequences.
2154 Graph mode supports the 12-bit addressing of the Tektronix 4014.
2155 The major features missing are
2156 the write-through and defocused modes.
2157 This document does not describe the commands used in the various
2158 Tektronix plotting modes but does describe the commands to switch modes.
2159 .St
2160 .IP \\*(Be
2161 Bell (Ctrl-G).
2162 .IP \\*(Bs
2163 Backspace (Ctrl-H).
2164 .IP \\*(Ta
2165 Horizontal Tab (Ctrl-I).
2166 .IP \\*(Lf
2167 Line Feed or New Line (Ctrl-J).
2168 .IP \\*(Vt
2169 Cursor up (Ctrl-K).
2170 .IP \\*(Ff
2171 Form Feed or New Page (Ctrl-L).
2172 .IP \\*(Cr
2173 Carriage Return (Ctrl-M).
2174 .IP \\*(Es\\*(Et
2175 Switch to VT100 Mode (ESC Ctrl-C).
2176 .IP \\*(Es\\*(En
2177 Return Terminal Status (ESC Ctrl-E).
2178 .IP \\*(Es\\*(Ff
2179 PAGE (Clear Screen) (ESC Ctrl-L).
2180 .IP \\*(Es\\*(So
2181 Begin 4015 APL mode (ESC Ctrl-N).  (This is ignored by \fIxterm\fP).
2182 .IP \\*(Es\\*(Si
2183 End 4015 APL mode (ESC Ctrl-O).  (This is ignored by \fIxterm\fP).
2184 .IP \\*(Es\\*(Eb
2185 COPY (Save Tektronix Codes to file COPYyyyy-mm-dd.hh:mm:ss).
2186   \*(Eb (end transmission block) is the same as Ctrl-W.
2187 .IP \\*(Es\\*(Ca
2188 Bypass Condition (ESC Ctrl-X).
2189 .IP \\*(Es\\*(Su
2190 GIN mode (ESC Ctrl-Z).
2191 .IP \\*(Es\\*(Fs
2192 Special Point Plot Mode (ESC Ctrl-\e).
2193 .IP \\*(Es\\*8
2194 Select Large Character Set.
2195 .IP \\*(Es\\*9
2196 Select #2 Character Set.
2197 .IP \\*(Es\\*:
2198 Select #3 Character Set.
2199 .IP \\*(Es\\*;
2200 Select Small Character Set.
2201 .IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(Be
2202 Set Text Parameters of VT window.
2203   \*(Ps = \*0 \(-> Change Icon Name and Window Title to \*(Pt.
2204   \*(Ps = \*1 \(-> Change Icon Name to \*(Pt.
2205   \*(Ps = \*2 \(-> Change Window Title to \*(Pt.
2206   \*(Ps = \*4\*6 \(-> Change Log File to \*(Pt.  (This is normally disabled by a
2207 compile-time option).
2208 .IP \\*(Es\\*`
2209 Normal Z Axis and Normal (solid) Vectors.
2210 .IP \\*(Es\\*a
2211 Normal Z Axis and Dotted Line Vectors.
2212 .IP \\*(Es\\*b
2213 Normal Z Axis and Dot-Dashed Vectors.
2214 .IP \\*(Es\\*c
2215 Normal Z Axis and Short-Dashed Vectors.
2216 .IP \\*(Es\\*d
2217 Normal Z Axis and Long-Dashed Vectors.
2218 .IP \\*(Es\\*h
2219 Defocused Z Axis and Normal (solid) Vectors.
2220 .IP \\*(Es\\*i
2221 Defocused Z Axis and Dotted Line Vectors.
2222 .IP \\*(Es\\*j
2223 Defocused Z Axis and Dot-Dashed Vectors.
2224 .IP \\*(Es\\*k
2225 Defocused Z Axis and Short-Dashed Vectors.
2226 .IP \\*(Es\\*l
2227 Defocused Z Axis and Long-Dashed Vectors.
2228 .IP \\*(Es\\*p
2229 Write-Thru Mode and Normal (solid) Vectors.
2230 .IP \\*(Es\\*q
2231 Write-Thru Mode and Dotted Line Vectors.
2232 .IP \\*(Es\\*r
2233 Write-Thru Mode and Dot-Dashed Vectors.
2234 .IP \\*(Es\\*(cs
2235 Write-Thru Mode and Short-Dashed Vectors.
2236 .IP \\*(Es\\*t
2237 Write-Thru Mode and Long-Dashed Vectors.
2238 .IP \\*(Fs
2239 Point Plot Mode (Ctrl-\e).
2240 .IP \\*(Gs
2241 Graph Mode (Ctrl-]).
2242 .IP \\*(Rs
2243 Incremental Plot Mode (Ctrl-^).
2244 .IP \\*(Us
2245 Alpha Mode (Ctrl-_).
2246 .Ed
2247 .
2248 .
2249 .Sh "VT52 Mode"
2250 .LP
2251 Parameters for cursor movement are at the end of the \*(Es\*Y escape sequence.
2252 Each ordinate is encoded in a single character as \fIvalue\fP+32.
2253 For example, \*! is 1.
2254 The screen coordinate system is 0-based.
2255 .St
2256 .IP \\*(Es\\*A
2257 Cursor up.
2258 .IP \\*(Es\\*(cB
2259 Cursor down.
2260 .IP \\*(Es\\*C
2261 Cursor right.
2262 .IP \\*(Es\\*D
2263 Cursor left.
2264 .IP \\*(Es\\*F
2265 Enter graphics mode.
2266 .IP \\*(Es\\*G
2267 Exit graphics mode.
2268 .IP \\*(Es\\*H
2269 Move the cursor to the home position.
2270 .IP \\*(Es\\*I
2271 Reverse line feed.
2272 .IP \\*(Es\\*J
2273 Erase from the cursor to the end of the screen.
2274 .IP \\*(Es\\*K
2275 Erase from the cursor to the end of the line.
2276 .IP \\*(Es\\*Y\\*(Ps\\*s\\*(Ps
2277 Move the cursor to given row and column.
2278 .IP \\*(Es\\*Z
2279 Identify.
2280   \(-> \*(Es\*s\*/\*s\*Z (``I am a VT52.'').
2281 .IP \\*(Es\\*=
2282 Enter alternate keypad mode.
2283 .IP \\*(Es\\*>
2284 Exit alternate keypad mode.
2285 .IP \\*(Es\\*<
2286 Exit VT52 mode (Enter VT100 mode).
2287 .Ed
2288 .
2289 .if n .pl \n(nlu+1v