summaryrefslogtreecommitdiff
path: root/doc/ctlseqs.ms
blob: 026d78ff232b3d31d793f86843b666250e3ceb92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
.\"#! troff -ms $1		-*- Nroff -*-
.\" "Xterm Control Sequences" document
.\" $Xorg: ctlseqs.ms,v 1.3 2000/08/17 19:42:51 cpqbld Exp $
.\"
.\"
.\"
.\"
.\" $XFree86: xc/doc/specs/xterm/ctlseqs.ms,v 3.43 2001/03/29 22:48:02 dickey Exp $
.\"
.\"
.\" Copyright 1996,1997,1998,1999,2000 by Thomas E. Dickey
.\"
.\"                         All Rights Reserved
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a
.\" copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
.\" without limitation the rights to use, copy, modify, merge, publish,
.\" distribute, sublicense, and/or sell copies of the Software, and to
.\" permit persons to whom the Software is furnished to do so, subject to
.\" the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be included
.\" in all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
.\" IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
.\" Except as contained in this notice, the name(s) of the above copyright
.\" holders shall not be used in advertising or otherwise to promote the
.\" sale, use or other dealings in this Software without prior written
.\" authorization.
.\"
.\"
.\" Copyright 1991, 1994 X Consortium
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
.\" without limitation the rights to use, copy, modify, merge, publish,
.\" distribute, sublicense, and/or sell copies of the Software, and to
.\" permit persons to whom the Software is furnished to do so, subject to
.\" the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be
.\" included in all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
.\" OTHER DEALINGS IN THE SOFTWARE.
.\"
.\" Except as contained in this notice, the name of the X Consortium shall
.\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization
.\" from the X Consortium.
.\"
.\" X Window System is a trademark of X Consortium, Inc.
.\"
.\" Originally written by Edward Moy, University of California,
.\" Berkeley, edmoy@violet.berkeley.edu, for the X.V10R4 xterm.
.\" The X Consortium staff has since updated it for X11.
.\" Updated by Thomas E. Dickey for XFree86 3.2 - XFree86 4.0
.\"
.\" Run this file through troff and use the -ms macro package.
.\"
.if n .pl 9999v		\" no page breaks in nroff
.ND
.de St
.sp
.nr PD 0
.nr PI 1.5i
.nr VS 16
..
.de Ed
.nr PD .3v
.nr VS 12
..
.ds CH \" as nothing
.ds LH Xterm Control Sequences
.nr s 6*\n(PS/10
.ds L \s\nsBEL\s0
.ds E \s\nsESC\s0
.ds T \s\nsTAB\s0
.ds X \s\nsETX\s0
.ds N \s\nsENQ\s0
.ds e \s\nsETB\s0
.ds C \s\nsCAN\s0
.ds S \s\nsSUB\s0
.\" space between chars
.ie t .ds s \|
.el .ds s " \"
.nr [W \w'\*L'u
.nr w \w'\*E'u
.if \nw>\n([W .nr [W \nw
.nr w \w'\*T'u
.if \nw>\n([W .nr [W \nw
.nr w \w'\*X'u
.if \nw>\n([W .nr [W \nw
.nr w \w'\*N'u
.if \nw>\n([W .nr [W \nw
.nr w \w'\*e'u
.if \nw>\n([W .nr [W \nw
.nr w \w'\*C'u
.if \nw>\n([W .nr [W \nw
.nr w \w'\*S'u
.if \nw>\n([W .nr [W \nw
.nr [W +\w'\|\|'u
.de []
.nr w \w'\\$2'
.nr H \\n([Wu-\\nwu
.nr h \\nHu/2u
.\" do fancy box in troff
.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
.el .ds \\$1 \\$2\*s
..
.[] Et \v'-1p'\*X\v'1p'
.[] En \v'-1p'\*N\v'1p'
.[] Be \v'-1p'\*L\v'1p'
.[] AP \v'-1p'\s\nsAPC\s0\v'1p'
.[] Bs \v'-1p'\s\nsBS\s0\v'1p'
.[] Cs \v'-1p'\s\nsCSI\s0\v'1p'
.[] S3 \v'-1p'\s\nsSS3\s0\v'1p'
.[] Dc \v'-1p'\s\nsDCS\s0\v'1p'
.[] Os \v'-1p'\s\nsOSC\s0\v'1p'
.[] PM \v'-1p'\s\nsPM\s0\v'1p'
.[] ST \v'-1p'\s\nsST\s0\v'1p'
.[] Ta \v'-1p'\*T\v'1p'
.[] Lf \v'-1p'\s\nsLF\s0\v'1p'
.[] Vt \v'-1p'\s\nsVT\s0\v'1p'
.[] Ff \v'-1p'\s\nsFF\s0\v'1p'
.[] Cr \v'-1p'\s\nsCR\s0\v'1p'
.[] So \v'-1p'\s\nsSO\s0\v'1p'
.[] Sp \v'-1p'\s\nsSP\s0\v'1p'
.[] Si \v'-1p'\s\nsSI\s0\v'1p'
.[] Eb \v'-1p'\*e\v'1p'
.[] Ca \v'-1p'\*C\v'1p'
.[] Su \v'-1p'\*S\v'1p'
.[] Es \v'-1p'\*E\v'1p'
.[] Fs \v'-1p'\s\nsFS\s0\v'1p'
.[] Gs \v'-1p'\s\nsGS\s0\v'1p'
.[] Rs \v'-1p'\s\nsRS\s0\v'1p'
.[] Us \v'-1p'\s\nsUS\s0\v'1p'
.[] XX \v'-1p'\s\nsXX\s0\v'1p'
.[] $ $
.[] ! !
.[] # #
.[] % %
.[] (( (
.[] ) )
.[] * *
.[] + +
.[] 0 0
.[] 1 1
.[] 2 2
.[] 3 3
.[] 4 4
.[] 5 5
.[] 6 6
.[] 7 7
.[] 8 8
.[] 9 9
.[] : :
.[] ; ;
.[] = =
.[] / /
.[] < <
.[] > >
.[] ? ?
.[] @ @
.[] A A
.[] cB B
.[] C C
.[] D D
.[] E E
.[] F F
.[] G G
.[] H H
.[] I I
.[] J J
.[] K K
.[] L L
.[] M M
.[] N N
.[] O O
.[] P P
.[] Q Q
.[] R R
.[] S S
.[] T T
.[] V V
.[] W W
.[] XX X
.[] Y Y
.[] Z Z
.[] [[ [
.[] ]] ]
.[] bS \\e
.[] { {
.[] ] ]
.[] & &
.[] ^ ^
.[] _ _
.[] qu \'
.[] ` \`
.[] a a
.[] b b
.[] c c
.[] d d
.[] f f
.[] g g
.[] h h
.[] i i
.[] j j
.[] k k
.[] l l
.[] m m
.[] n n
.[] o o
.[] p p
.[] q q
.[] r r
.[] cs s
.[] t t
.[] u u
.[] v v
.[] w w
.[] x x
.[] y y
.[] z z
.[] | |
.[] } }
.[] ! !
.[] c" \(lq
.[] c~ ~
.[] Sc \fIc\fP
.ds Cc \fIC\fP
.ds Cb \fIC\v'.3m'\h'-.2m'\s-2b\s0\v'-.3m'\fP
.ds Cx \fIC\v'.3m'\h'-.2m'\s-2x\s0\v'-.3m'\fP
.ds Cy \fIC\v'.3m'\h'-.2m'\s-2y\s0\v'-.3m'\fP
.ds Pb \fIP\v'.3m'\h'-.2m'\s-2b\s0\v'-.3m'\fP
.ds Pc \fIP\v'.3m'\h'-.2m'\s-2c\s0\v'-.3m'\fP
.ds Pe \fIP\v'.3m'\h'-.2m'\s-2e\s0\v'-.3m'\fP
.ds Pl \fIP\v'.3m'\h'-.2m'\s-2l\s0\v'-.3m'\fP
.ds Pm \fIP\v'.3m'\h'-.2m'\s-2m\s0\v'-.3m'\fP
.ds Pp \fIP\v'.3m'\h'-.2m'\s-2p\s0\v'-.3m'\fP
.ds Pr \fIP\v'.3m'\h'-.2m'\s-2r\s0\v'-.3m'\fP
.ds Ps \fIP\v'.3m'\h'-.2m'\s-2s\s0\v'-.3m'\fP
.ds Pt \fIP\v'.3m'\h'-.2m'\s-2t\s0\v'-.3m'\fP
.ds Pu \fIP\v'.3m'\h'-.2m'\s-2u\s0\v'-.3m'\fP
.ds Pv \fIP\v'.3m'\h'-.2m'\s-2v\s0\v'-.3m'\fP
.ds Ix \fIx\fP
.ds Iy \fIy\fP
.ds Iw \fIw\fP
.ds Ih \fIh\fP
.ds Ir \fIr\fP
.ds Ic \fIc\fP
.ie t .nr LL 6.5i
.el .nr LL 72m
.if n .na
.TL
Xterm Control Sequences
.AU
Edward Moy
.AI
University of California, Berkeley
.sp
Revised by
.AU
Stephen Gildea
.AI
X Consortium (1994)
.AU
Thomas Dickey
.AI
XFree86 Project (1996-1999)
.AU
.
.am BT                  \" add page numbers after first page
.ds CF %
..
.SH
Definitions
.IP \*(Sc
The literal character \fIc\fP.
.IP \*(Cc
A single (required) character.
.IP \*(Ps
A single (usually optional) numeric parameter, composed of one of more digits.
.IP \*(Pm
A multiple numeric parameter composed of any number of single numeric
parameters, separated by \*; character(s).
Individual values for the parameters are listed with \*(Ps .
.IP \*(Pt
A text parameter composed of printable characters.
.
.SH
C1 (8-Bit) Control Characters
.ds RH C1 (8-Bit) Control Characters
.LP
The \fIxterm\fP program recognizes both 8-bit and 7-bit control characters.
It generates 7-bit controls (by default) or 8-bit if S8C1T is enabled.
The following pairs of 7-bit and 8-bit control characters are equivalent:
.St
.IP \\*(Es\\*D
Index (IND: 0x84)
.IP \\*(Es\\*E
Next Line (NEL: 0x85)
.IP \\*(Es\\*H
Tab Set (HTS: 0x88)
.IP \\*(Es\\*M
Reverse Index (RI: 0x8d)
.IP \\*(Es\\*N
Single Shift Select of G2 Character Set (SS2: 0x8e): affects next character only
.IP \\*(Es\\*O
Single Shift Select of G3 Character Set (SS3: 0x8f): affects next character only
.IP \\*(Es\\*P
Device Control String (DCS: 0x90)
.IP \\*(Es\\*V
Start of Guarded Area (SPA: 0x96)
.IP \\*(Es\\*W
End of Guarded Area (EPA: 0x97)
.IP \\*(Es\\(*X
Start of String (SOS: 0x98)
.IP \\*(Es\\*Z
Return Terminal ID (DECID: 0x9a).  Obsolete form of \*(Cs\*c (DA).
.IP \\*(Es\\*([[
Control Sequence Introducer (CSI: 0x9b)
.IP \\*(Es\\*(bS
String Terminator (ST: 0x9c)
.IP \\*(Es\\*(]]
Operating System Command (OSC: 0x9d)
.IP \\*(Es\\*^
Privacy Message (PM: 0x9e)
.IP \\*(Es\\*_
Application Program Command (APC: 0x9f)
.Ed
.sp
.LP
These control characters are used in the vtXXX emulation.
.
.SH
VT100 Mode
.ds RH VT100 Mode
.LP
Most of these control sequences are standard VT102 control sequences,
but there is support for later DEC VT terminals (i.e., VT220 and VT320),
as well as ISO 6429 and \fIaixterm\fP color controls.
VT102 features not supported are
auto-repeat and blinking characters.
There are additional control sequences to provide
\fIxterm-\fPdependent functions, such as the scrollbar or window size.
Where the function is specified by DEC or ISO 6429, the code assigned
to it is given in parentheses.  The escape codes to designate and invoke
character sets are specified by ISO 2022; see that document for a
discussion of character sets.
.
.St
.\"
.LP
.B
Single-character functions
.\"
.IP \\*(Be
Bell (Ctrl-G)
.
.IP \\*(Bs
Backspace (Ctrl-H)
.
.IP \\*(Cr
Carriage Return (Ctrl-M)
.
.IP \\*(En
Return Terminal Status (Ctrl-E).
Default response is the terminal name, e.g., "xterm", but may be overridden
by a resource \fIanswerbackString\fP.
.
.IP \\*(Ff
Form Feed or New Page (NP) (Ctrl-L) same as LF
.
.IP \\*(Lf
Line Feed or New Line (NL) (Ctrl-J)
.
.IP \\*(So
Shift Out (Ctrl-N) \(-> Switch to Alternate Character Set: invokes the
G1 character set.
.
.IP \\*(Sp
Space.
.
.IP \\*(Ta
Horizontal Tab (HT) (Ctrl-I)
.
.IP \\*(Vt
Vertical Tab (Ctrl-K) same as LF
.
.IP \\*(Si
Shift In (Ctrl-O) \(-> Switch to Standard Character Set: invokes the
G0 character set (the default).
.Ed
.\"
.\"
.\"
.St
.LP
.B
Controls beginning with ESC (other than those where ESC is part of a 7-bit equivalent to 8-bit C1 controls), ordered by the final character(s).
.\"
.IP \\*(Es\\*(Sp\\*F
7-bit controls (S7C1T).
.
.IP \\*(Es\\*(Sp\\*G
8-bit controls (S8C1T).
.
.IP \\*(Es\\*(Sp\\*L
Set ANSI conformance level 1 (vt100, 7-bit controls).
.
.IP \\*(Es\\*(Sp\\*M
Set ANSI conformance level 2 (vt200).
.
.IP \\*(Es\\*(Sp\\*N
Set ANSI conformance level 3 (vt300).
.
.IP \\*(Es\\*#\\*3
DEC double-height line, top half (DECDHL)
.
.IP \\*(Es\\*#\\*4
DEC double-height line, bottom half (DECDHL)
.
.IP \\*(Es\\*#\\*5
DEC single-width line (DECSWL)
.
.IP \\*(Es\\*#\\*6
DEC double-width line (DECDWL)
.
.IP \\*(Es\\*#\\*8
DEC Screen Alignment Test (DECALN)
.
.IP \\*(Es\\*%\\*@
Select default character set, ISO 8859-1 (ISO 2022)
.
.IP \\*(Es\\*%\\*G
Select UTF-8 character set (ISO 2022)
.
.IP \\*(Es\\*(((\\*(Cc
Designate G0 Character Set (ISO 2022)
.IP \\*(Es\\*)\\*(Cc
Designate G1 Character Set (ISO 2022)
.
.IP \\*(Es\\**\\*(Cc
Designate G2 Character Set (ISO 2022)
.
.IP \\*(Es\\*+\\*(Cc
Designate G3 Character Set (ISO 2022)
.br
Final character \*(Cc for designating character sets
(\*0, \*A and \*(cB apply to VT100 and up, the remainder to VT220 and up):
  \*(Cc = \*0 \(-> DEC Special Character and Line Drawing Set
  \*(Cc = \*A \(-> United Kingdom (UK)
  \*(Cc = \*(cB \(-> United States (USASCII)
  \*(Cc = \*4 \(-> Dutch
  \*(Cc = \*C or \*5 \(-> Finnish
  \*(Cc = \*R \(-> French
  \*(Cc = \*Q \(-> French Canadian
  \*(Cc = \*K \(-> German
  \*(Cc = \*Y \(-> Italian
  \*(Cc = \*E or \*6 \(-> Norwegian/Danish
  \*(Cc = \*Z \(-> Spanish
  \*(Cc = \*H or \*7 \(-> Swedish
  \*(Cc = \*= \(-> Swiss
.
.IP \\*(Es\\*7
Save Cursor (DECSC)
.
.IP \\*(Es\\*8
Restore Cursor (DECRC)
.
.IP \\*(Es\\*=
Application Keypad (DECPAM)
.
.IP \\*(Es\\*>
Normal Keypad (DECPNM)
.
.IP \\*(Es\\*F
Cursor to lower left corner of screen (if
enabled by the \fBhpLowerleftBugCompat\fP resource).
.
.IP \\*(Es\\*c
Full Reset (RIS)
.
.IP \\*(Es\\*l
Memory Lock (per HP terminals).  Locks memory above the cursor.
.
.IP \\*(Es\\*m
Memory Unlock (per HP terminals)
.
.IP \\*(Es\\*n
Invoke the G2 Character Set (LS2)
.
.IP \\*(Es\\*o
Invoke the G3 Character Set (LS3)
.
.IP \\*(Es\\*|
Invoke the G3 Character Set as GR (LS3R).  Has no visible effect in \fIxterm\fP.
.
.IP \\*(Es\\*}
Invoke the G2 Character Set as GR (LS2R).  Has no visible effect in \fIxterm\fP.
.
.IP \\*(Es\\*(c~
Invoke the G1 Character Set as GR (LS1R).  Has no visible effect in \fIxterm\fP.
.Ed
.
.St
.LP
.B
Application Program-Control functions
.IP \\*(AP\\*(Pt\\*s\\*(ST
\fIxterm\fP implements no APC functions; \*(Pt is ignored.
\*(Pt need not be printable characters.
.Ed
.
.St
.LP
.B
Device-Control functions
.IP \\*(Dc\\*(Ps\\*;\\*(Ps\\*|\\*(Pt\\*s\\*(ST
User-Defined Keys (DECUDK).
The first parameter:
  \*(Ps = \*0 \(-> Clear all UDK definitions before starting (default)
  \*(Ps = \*1 \(-> Erase Below (default)
.br
The second parameter:
  \*(Ps = \*0 \(-> Lock the keys (default)
  \*(Ps = \*1 \(-> Do not lock.
.br
The third parameter is a ';'-separated list of strings denoting
the key-code separated by a '/' from the hex-encoded key value.
The key codes correspond to the DEC function-key codes (e.g., F6=17).
.
.IP \\*(Dc\\*$\\*q\\*(Pt\\*s\\*(ST
Request Status String (DECRQSS).
The string following the "q" is one of the following:
  \*(c"\*q	\(-> DECSCA
  \*(c"\*p	\(-> DECSCL
  \*r		\(-> DECSTBM
  \*m		\(-> SGR
.br
\fIxterm\fP responds with
\*(Dc\*1\*$\*r\*(Pt\*s\*(ST
for valid requests, replacing the \*(Pt with the corresponding \*(Cs
string,
or
\*(Dc\*0\*$\*r\*(Pt\*s\*(ST
for invalid requests.
.
.IP \\*(Dc\\*+\\*q\\*(Pt\\*s\\*(ST
Request Termcap/Terminfo String (xterm, experimental).
The string following the "q" is a list of names
encoded in hexadecimal (2 digits per character)
separated by \*;
which correspond to termcap or terminfo key names.
.br
\fIxterm\fP responds with
\*(Dc\*1\*+\*r\*(Pt\*s\*(ST
for valid requests, adding to \*(Pt an \*=,
and the value of the corresponding string that xterm would send,
or
\*(Dc\*0\*+\*r\*(Pt\*s\*(ST
for invalid requests.
The strings are encoded in hexadecimal (2 digits per character).
.Ed
.\"
.St
.LP
.B
Functions using CSI, ordered by the final character(s)
.IP \\*(Cs\\*(Ps\\*s\\*@
Insert \*(Ps (Blank) Character(s) (default = 1) (ICH)
.
.IP \\*(Cs\\*(Ps\\*s\\*A
Cursor Up \*(Ps Times (default = 1) (CUU)
.
.IP \\*(Cs\\*(Ps\\*s\\*(cB
Cursor Down \*(Ps Times (default = 1) (CUD)
.
.IP \\*(Cs\\*(Ps\\*s\\*C
Cursor Forward \*(Ps Times (default = 1) (CUF)
.
.IP \\*(Cs\\*(Ps\\*s\\*D
Cursor Backward \*(Ps Times (default = 1) (CUB)
.
.IP \\*(Cs\\*(Ps\\*s\\*E
Cursor Next Line \*(Ps Times (default = 1) (CNL)
.
.IP \\*(Cs\\*(Ps\\*s\\*F
Cursor Preceding Line \*(Ps Times (default = 1) (CPL)
.
.IP \\*(Cs\\*(Ps\\*s\\*G
Cursor Character Absolute  [column] (default = [row,1]) (CHA)
.
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*H
Cursor Position [row;column] (default = [1,1]) (CUP)
.
.IP \\*(Cs\\*(Ps\\*s\\*I
Cursor Forward Tabulation \*(Ps tab stops (default = 1) (CHT)
.
.IP \\*(Cs\\*(Ps\\*s\\*J
Erase in Display (ED)
  \*(Ps = \*0 \(-> Erase Below (default)
  \*(Ps = \*1 \(-> Erase Above
  \*(Ps = \*2 \(-> Erase All
  \*(Ps = \*3 \(-> Erase Saved Lines (xterm)
.
.IP \\*(Cs\\*?\\*(Ps\\*s\\*J
Erase in Display (DECSED)
  \*(Ps = \*0 \(-> Selective Erase Below (default)
  \*(Ps = \*1 \(-> Selective Erase Above
  \*(Ps = \*2 \(-> Selective Erase All
.
.IP \\*(Cs\\*(Ps\\*s\\*K
Erase in Line (EL)
  \*(Ps = \*0 \(-> Erase to Right (default)
  \*(Ps = \*1 \(-> Erase to Left
  \*(Ps = \*2 \(-> Erase All
.
.IP \\*(Cs\\*?\\*(Ps\\*s\\*K
Erase in Line (DECSEL)
  \*(Ps = \*0 \(-> Selective Erase to Right (default)
  \*(Ps = \*1 \(-> Selective Erase to Left
  \*(Ps = \*2 \(-> Selective Erase All
.
.IP \\*(Cs\\*(Ps\\*s\\*L
Insert \*(Ps Line(s) (default = 1) (IL)
.
.IP \\*(Cs\\*(Ps\\*s\\*M
Delete \*(Ps Line(s) (default = 1) (DL)
.
.IP \\*(Cs\\*(Ps\\*s\\*P
Delete \*(Ps Character(s) (default = 1) (DCH)
.
.IP \\*(Cs\\*(Ps\\*s\\*S
Scroll up \*(Ps lines (default = 1) (SU)
.
.IP \\*(Cs\\*(Ps\\*s\\*T
Scroll down \*(Ps lines (default = 1) (SD)
.
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*T
Initiate hilite mouse tracking.
Parameters are [func;startx;starty;firstrow;lastrow].
See the section \fBMouse Tracking\fP.
.
.IP \\*(Cs\\*(Ps\\*s\\*(XX
Erase \*(Ps Character(s) (default = 1) (ECH)
.
.IP \\*(Cs\\*(Ps\\*s\\*Z
Cursor Backward Tabulation \*(Ps tab stops (default = 1) (CBT)
.
.IP \\*(Cs\\*(Pm\\*s\\*`
Character Position Absolute  [column] (default = [row,1]) (HPA)
.
.IP \\*(Cs\\*(Ps\\*s\\*b
Repeat the preceding graphic character \*(Ps times (REP)
.
.IP \\*(Cs\\*(Ps\\*s\\*c
Send Device Attributes (Primary DA)
  \*(Ps = \*0, 1 or omitted \(-> request attributes from terminal.
The response depends on the \fBdecTerminalId\fP resource setting.
  \(-> \*(Cs\*?\*1\*;\*2\*c (``VT100 with Advanced Video Option'')
  \(-> \*(Cs\*?\*1\*;\*0\*c (``VT101 with No Options'')
  \(-> \*(Cs\*?\*6\*c (``VT102'')
  \(-> \*(Cs\*?\*6\*0\*;\*1\*;\*2\*;\*6\*;\*8\*;\*9\*;\*1\*5\*;\*c (``VT220'')
.br
The VT100-style response parameters do not mean anything by themselves.
VT220 parameters do, telling the host what features the terminal supports:
  \(-> \*1 132-columns
  \(-> \*2 Printer
  \(-> \*6 Selective erase
  \(-> \*8 User-defined keys
  \(-> \*9 National replacement character sets
  \(-> \*1\*5 Technical characters
.
.IP \\*(Cs\\*>\\*(Ps\\*s\\*c
Send Device Attributes (Secondary DA)
  \*(Ps = \*0, 1 or omitted \(-> request the terminal's identification code.
The response depends on the \fBdecTerminalId\fP resource setting.
It should apply only to VT220 and up, but \fIxterm\fP extends this to VT100.
  \(-> \*(Cs\*(Pp\*s\*;\*(Pv\*s\*;\*(Pc\*s\*c
.br
where \*(Pp denotes the terminal type
  \(-> \*0 (``VT100'')
  \(-> \*1 (``VT220'')
.br
and \*(Pv is the firmware version (for \fIxterm\fP, this is the XFree86
patch number, starting with 95).
In a DEC terminal, \*(Pc indicates the ROM cartridge
registration number and is always zero.
.
.IP \\*(Cs\\*(Pm\\*s\\*d
Line Position Absolute  [row] (default = [1,column]) (VPA)
.
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*f
Horizontal and Vertical Position [row;column] (default = [1,1]) (HVP)
.
.IP \\*(Cs\\*(Ps\\*s\\*g
Tab Clear (TBC)
  \*(Ps = \*0 \(-> Clear Current Column (default)
  \*(Ps = \*3 \(-> Clear All
.
.IP \\*(Cs\\*(Pm\\*s\\*h
Set Mode (SM)
  \*(Ps = \*2 \(-> Keyboard Action Mode (AM)
  \*(Ps = \*4 \(-> Insert Mode (IRM)
  \*(Ps = \*1\*2 \(-> Send/receive (SRM)
  \*(Ps = \*2\*0 \(-> Automatic Newline (LNM)
.
.IP \\*(Cs\\*?\\*(Pm\\*s\\*h
DEC Private Mode Set (DECSET)
  \*(Ps = \*1 \(-> Application Cursor Keys (DECCKM)
  \*(Ps = \*2 \(-> Designate USASCII for character sets G0-G3 (DECANM),
and set VT100 mode.
  \*(Ps = \*3 \(-> 132 Column Mode (DECCOLM)
  \*(Ps = \*4 \(-> Smooth (Slow) Scroll (DECSCLM)
  \*(Ps = \*5 \(-> Reverse Video (DECSCNM)
  \*(Ps = \*6 \(-> Origin Mode (DECOM)
  \*(Ps = \*7 \(-> Wraparound Mode (DECAWM)
  \*(Ps = \*8 \(-> Auto-repeat Keys (DECARM)
  \*(Ps = \*9 \(-> Send Mouse X & Y on button press.
See the section \fBMouse Tracking\fP.
  \*(Ps = \*1\*8 \(-> Print form feed (DECPFF)
  \*(Ps = \*1\*9 \(-> Set print extent to full screen (DECPEX)
  \*(Ps = \*2\*5 \(-> Show Cursor (DECTCEM)
  \*(Ps = \*3\*0 \(-> Show scrollbar (rxvt).
  \*(Ps = \*3\*5 \(-> Enable font-shifting functions (rxvt).
  \*(Ps = \*3\*8 \(-> Enter Tektronix Mode (DECTEK)
  \*(Ps = \*4\*0 \(-> Allow 80 \z\(<-\(-> 132 Mode
  \*(Ps = \*4\*1 \(-> \fImore\fP(1) fix (see \fIcurses\fP resource)
  \*(Ps = \*4\*2 \(-> Enable Nation Replacement Character sets (DECNRCM)
  \*(Ps = \*4\*4 \(-> Turn On Margin Bell
  \*(Ps = \*4\*5 \(-> Reverse-wraparound Mode
  \*(Ps = \*4\*6 \(-> Start Logging
(normally disabled by a compile-time option)
  \*(Ps = \*4\*7 \(-> Use Alternate Screen Buffer (unless
disabled by the \fBtiteInhibit\fP resource)
  \*(Ps = \*6\*6 \(-> Application keypad (DECNKM)
  \*(Ps = \*6\*7 \(-> Backarrow key sends delete (DECBKM)
  \*(Ps = \*1\*0\*0\*0 \(-> Send Mouse X & Y on button press and release.
See the section \fBMouse Tracking\fP.
  \*(Ps = \*1\*0\*0\*1 \(-> Use Hilite Mouse Tracking.
  \*(Ps = \*1\*0\*0\*2 \(-> Use Cell Motion Mouse Tracking.
  \*(Ps = \*1\*0\*0\*3 \(-> Use All Motion Mouse Tracking.
  \*(Ps = \*1\*0\*1\*0 \(-> Scroll to bottom on tty output (rxvt).
  \*(Ps = \*1\*0\*1\*1 \(-> Scroll to bottom on key press (rxvt).
  \*(Ps = \*1\*0\*3\*5 \(-> Enable special modifiers for Alt and NumLock keys.
  \*(Ps = \*1\*0\*3\*6 \(-> Send ESC when Meta modifies a key
(enables the \fBmetaSendsEscape\fP resource).
  \*(Ps = \*1\*0\*3\*7 \(-> Send DEL from the editing-keypad Delete key
  \*(Ps = \*1\*0\*4\*7 \(-> Use Alternate Screen Buffer (unless
disabled by the \fBtiteInhibit\fP resource)
  \*(Ps = \*1\*0\*4\*8 \(-> Save cursor as in DECSC (unless
disabled by the \fBtiteInhibit\fP resource)
  \*(Ps = \*1\*0\*4\*9 \(-> Save cursor as in DECSC
and use Alternate Screen Buffer, clearing it first (unless
disabled by the \fBtiteInhibit\fP resource)
  \*(Ps = \*1\*0\*5\*1 \(-> Set Sun function-key mode.
  \*(Ps = \*1\*0\*5\*2 \(-> Set HP function-key mode.
  \*(Ps = \*1\*0\*6\*0 \(-> Set legacy keyboard emulation (X11R6).
  \*(Ps = \*1\*0\*6\*1 \(-> Set Sun/PC keyboard emulation of VT220 keyboard.
.
.IP \\*(Cs\\*(Pm\\*s\\*i
Media Copy (MC)
  \*(Ps = \*0 \(-> Print screen (default)
  \*(Ps = \*4 \(-> Turn off printer controller mode
  \*(Ps = \*5 \(-> Turn on printer controller mode
.
.IP \\*(Cs\\*?\\*(Pm\\*s\\*i
Media Copy (MC, DEC-specific)
  \*(Ps = \*1 \(-> Print line containing cursor
  \*(Ps = \*4 \(-> Turn off autoprint mode
  \*(Ps = \*5 \(-> Turn on autoprint mode
  \*(Ps = \*1 \*0 \(-> Print composed display, ignores DECPEX
  \*(Ps = \*1 \*1 \(-> Print all pages
.
.IP \\*(Cs\\*(Pm\\*s\\*l
Reset Mode (RM)
  \*(Ps = \*2 \(-> Keyboard Action Mode (AM)
  \*(Ps = \*4 \(-> Replace Mode (IRM)
  \*(Ps = \*1\*2 \(-> Send/receive (SRM)
  \*(Ps = \*2\*0 \(-> Normal Linefeed (LNM)
.
.IP \\*(Cs\\*?\\*(Pm\\*s\\*l
DEC Private Mode Reset (DECRST)
  \*(Ps = \*1 \(-> Normal Cursor Keys (DECCKM)
  \*(Ps = \*2 \(-> Designate VT52 mode (DECANM).
  \*(Ps = \*3 \(-> 80 Column Mode (DECCOLM)
  \*(Ps = \*4 \(-> Jump (Fast) Scroll (DECSCLM)
  \*(Ps = \*5 \(-> Normal Video (DECSCNM)
  \*(Ps = \*6 \(-> Normal Cursor Mode (DECOM)
  \*(Ps = \*7 \(-> No Wraparound Mode (DECAWM)
  \*(Ps = \*8 \(-> No Auto-repeat Keys (DECARM)
  \*(Ps = \*9 \(-> Don't Send Mouse X & Y on button press
  \*(Ps = \*1\*8 \(-> Don't print form feed (DECPFF)
  \*(Ps = \*1\*9 \(-> Limit print to scrolling region (DECPEX)
  \*(Ps = \*2\*5 \(-> Hide Cursor (DECTCEM)
  \*(Ps = \*3\*0 \(-> Don't show scrollbar (rxvt).
  \*(Ps = \*3\*5 \(-> Disable font-shifting functions (rxvt).
  \*(Ps = \*4\*0 \(-> Disallow 80 \z\(<-\(-> 132 Mode
  \*(Ps = \*4\*1 \(-> No \fImore\fP(1) fix (see \fIcurses\fP resource)
  \*(Ps = \*4\*2 \(-> Disable Nation Replacement Character sets (DECNRCM)
  \*(Ps = \*4\*4 \(-> Turn Off Margin Bell
  \*(Ps = \*4\*5 \(-> No Reverse-wraparound Mode
  \*(Ps = \*4\*6 \(-> Stop Logging
(normally disabled by a compile-time option)
  \*(Ps = \*4\*7 \(-> Use Normal Screen Buffer
  \*(Ps = \*6\*6 \(-> Numeric keypad (DECNKM)
  \*(Ps = \*6\*7 \(-> Backarrow key sends backspace (DECBKM)
  \*(Ps = \*1\*0\*0\*0 \(-> Don't Send Mouse X & Y on button press and
release.
See the section \fBMouse Tracking\fP.
  \*(Ps = \*1\*0\*0\*1 \(-> Don't Use Hilite Mouse Tracking
  \*(Ps = \*1\*0\*0\*2 \(-> Don't Use Cell Motion Mouse Tracking
  \*(Ps = \*1\*0\*0\*3 \(-> Don't Use All Motion Mouse Tracking
  \*(Ps = \*1\*0\*1\*0 \(-> Don't scroll to bottom on tty output (rxvt).
  \*(Ps = \*1\*0\*1\*1 \(-> Don't scroll to bottom on key press (rxvt).
  \*(Ps = \*1\*0\*3\*5 \(-> Disable special modifiers for Alt and NumLock keys.
  \*(Ps = \*1\*0\*3\*6 \(-> Don't send ESC when Meta modifies a key
(disables the \fBmetaSendsEscape\fP resource).
  \*(Ps = \*1\*0\*3\*7 \(-> Send VT220 Remove from the editing-keypad Delete key
  \*(Ps = \*1\*0\*4\*7 \(-> Use Normal Screen Buffer, clearing screen
first if in the Alternate Screen (unless
disabled by the \fBtiteInhibit\fP resource)
  \*(Ps = \*1\*0\*4\*8 \(-> Restore cursor as in DECRC (unless
disabled by the \fBtiteInhibit\fP resource)
  \*(Ps = \*1\*0\*4\*9 \(-> Use Normal Screen Buffer and restore cursor
as in DECRC (unless
disabled by the \fBtiteInhibit\fP resource)
  \*(Ps = \*1\*0\*5\*1 \(-> Reset Sun function-key mode.
  \*(Ps = \*1\*0\*5\*2 \(-> Reset HP function-key mode.
  \*(Ps = \*1\*0\*6\*0 \(-> Reset legacy keyboard emulation (X11R6).
  \*(Ps = \*1\*0\*6\*1 \(-> Reset Sun/PC keyboard emulation of VT220 keyboard.
.
.IP \\*(Cs\\*(Pm\\*s\\*m
Character Attributes (SGR)
  \*(Ps = \*0 \(-> Normal (default)
  \*(Ps = \*1 \(-> Bold
  \*(Ps = \*4 \(-> Underlined
  \*(Ps = \*5 \(-> Blink (appears as Bold)
  \*(Ps = \*7 \(-> Inverse
  \*(Ps = \*8 \(-> Invisible (hidden)
  \*(Ps = \*2\*2 \(-> Normal (neither bold nor faint)
  \*(Ps = \*2\*4 \(-> Not underlined
  \*(Ps = \*2\*5 \(-> Steady (not blinking)
  \*(Ps = \*2\*7 \(-> Positive (not inverse)
  \*(Ps = \*2\*8 \(-> Visible (not hidden)
  \*(Ps = \*3\*0 \(-> Set foreground color to Black
  \*(Ps = \*3\*1 \(-> Set foreground color to Red
  \*(Ps = \*3\*2 \(-> Set foreground color to Green
  \*(Ps = \*3\*3 \(-> Set foreground color to Yellow
  \*(Ps = \*3\*4 \(-> Set foreground color to Blue
  \*(Ps = \*3\*5 \(-> Set foreground color to Magenta
  \*(Ps = \*3\*6 \(-> Set foreground color to Cyan
  \*(Ps = \*3\*7 \(-> Set foreground color to White
  \*(Ps = \*3\*9 \(-> Set foreground color to default (original)
  \*(Ps = \*4\*0 \(-> Set background color to Black
  \*(Ps = \*4\*1 \(-> Set background color to Red
  \*(Ps = \*4\*2 \(-> Set background color to Green
  \*(Ps = \*4\*3 \(-> Set background color to Yellow
  \*(Ps = \*4\*4 \(-> Set background color to Blue
  \*(Ps = \*4\*5 \(-> Set background color to Magenta
  \*(Ps = \*4\*6 \(-> Set background color to Cyan
  \*(Ps = \*4\*7 \(-> Set background color to White
  \*(Ps = \*4\*9 \(-> Set background color to default (original).
.sp
If 16-color support is compiled, the following apply.
Assume that \fIxterm\fP's resources
are set so that the ISO color codes are the first 8 of a set of 16.
Then the \fIaixterm\fP colors are the bright versions of the ISO colors:
  \*(Ps = \*9\*0 \(-> Set foreground color to Black
  \*(Ps = \*9\*1 \(-> Set foreground color to Red
  \*(Ps = \*9\*2 \(-> Set foreground color to Green
  \*(Ps = \*9\*3 \(-> Set foreground color to Yellow
  \*(Ps = \*9\*4 \(-> Set foreground color to Blue
  \*(Ps = \*9\*5 \(-> Set foreground color to Magenta
  \*(Ps = \*9\*6 \(-> Set foreground color to Cyan
  \*(Ps = \*9\*7 \(-> Set foreground color to White
  \*(Ps = \*1\*0\*0 \(-> Set background color to Black
  \*(Ps = \*1\*0\*1 \(-> Set background color to Red
  \*(Ps = \*1\*0\*2 \(-> Set background color to Green
  \*(Ps = \*1\*0\*3 \(-> Set background color to Yellow
  \*(Ps = \*1\*0\*4 \(-> Set background color to Blue
  \*(Ps = \*1\*0\*5 \(-> Set background color to Magenta
  \*(Ps = \*1\*0\*6 \(-> Set background color to Cyan
  \*(Ps = \*1\*0\*7 \(-> Set background color to White
.sp
If \fIxterm\fP is compiled with the 16-color support disabled, it supports
the following, from \fIrxvt\fP:
  \*(Ps = \*1\*0\*0 \(-> Set foreground and background color to default
.sp
If 88- or 256-color support is compiled, the following apply.
  \*(Ps = \*3\*8 ; \*5 ; \*(Ps \(-> Set foreground color to the second \*(Ps
  \*(Ps = \*4\*8 ; \*5 ; \*(Ps \(-> Set background color to the second \*(Ps
.sp
.
.IP \\*(Cs\\*(Ps\\*s\\*n
Device Status Report (DSR)
  \*(Ps = \*5 \(-> Status Report \*(Cs\*0\*n (``OK'')
  \*(Ps = \*6 \(-> Report Cursor Position (CPR) [row;column] as
.br
\*(Cs\*(Ir\*s\*;\*(Ic\*s\*R
.
.IP \\*(Cs\\*?\\*(Ps\\*s\\*n
Device Status Report (DSR, DEC-specific)
  \*(Ps = \*6 \(-> Report Cursor Position (CPR) [row;column] as
\*(Cs\*?\*(Ir\*s\*;\*(Ic\*s\*R
(assumes page is zero).
  \*(Ps = \*1\*5 \(-> Report Printer status as
\*(Cs\*?\*1\*0\*s\*n (ready)
or
\*(Cs\*?\*1\*1\*s\*n (not ready)
  \*(Ps = \*2\*5 \(-> Report UDK status as
\*(Cs\*?\*2\*0\*s\*n (unlocked)
or
\*(Cs\*?\*2\*1\*s\*n (locked)
  \*(Ps = \*2\*6 \(-> Report Keyboard status as
.br
\*(Cs\*?\*2\*7\*s\*;\*s\*1\*s\*;\*s\*0\*s\*;\*s\*0\*s\*n (North American)
.br
\*(Cs\*?\*5\*3\*s\*n Locator available, if compiled-in, or
.br
\*(Cs\*?\*5\*0\*s\*n No Locator, if not.
.
.IP \\*(Cs\\*s\\*!\\*p
Soft terminal reset (DECSTR)
.
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*(c"\\*p
Set conformance level (DECSCL)
Valid values for the first parameter:
  \*(Ps = \*6\*1 \(-> VT100
  \*(Ps = \*6\*2 \(-> VT200
  \*(Ps = \*6\*3 \(-> VT300
.br
Valid values for the second parameter:
  \*(Ps = \*0 \(-> 8-bit controls
  \*(Ps = \*1 \(-> 7-bit controls (always set for VT100)
  \*(Ps = \*2 \(-> 8-bit controls
.
.IP \\*(Cs\\*(Ps\\*s\\*(c"\\*q
Select character protection attribute (DECSCA).
Valid values for the parameter:
  \*(Ps = \*0 \(-> DECSED and DECSEL can erase (default)
  \*(Ps = \*1 \(-> DECSED and DECSEL cannot erase
  \*(Ps = \*2 \(-> DECSED and DECSEL can erase
.
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*r
Set Scrolling Region [top;bottom] (default = full size of window) (DECSTBM)
.
.IP \\*(Cs\\*?\\*(Pm\\*s\\*r
Restore DEC Private Mode Values.  The value of \*(Ps previously saved is
restored.  \*(Ps values are the same as for DECSET.
.
.IP \\*(Cs\\*?\\*(Pm\\*s\\*(cs
Save DEC Private Mode Values.  \*(Ps values are the same as for DECSET.
.
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*t
Window manipulation (from \fIdtterm\fP, as well as extensions).
Valid values for the first (and any additional parameters) are:
  \*(Ps = \*1 \(-> De-iconify window.
  \*(Ps = \*2 \(-> Iconify window.
  \*(Ps = \*3 ; \fIx ; y\fP \(-> Move window to [x, y].
  \*(Ps = \*4 ; \fIheight ; width\fP \(-> Resize the \fIxterm\fP window to height and width in pixels.
  \*(Ps = \*5 \(-> Raise the \fIxterm\fP window to the front of the stacking order.
  \*(Ps = \*6 \(-> Lower the \fIxterm\fP window to the bottom of the stacking order.
  \*(Ps = \*7 \(-> Refresh the \fIxterm\fP window.
  \*(Ps = \*8 ; \fIheight ; width\fP \(-> Resize the text area to [height;width] in characters.
  \*(Ps = \*9 ; \*0 \(-> Restore maximized window.
  \*(Ps = \*9 ; \*1 \(-> Maximize window (i.e., resize to screen size).
  \*(Ps = \*1\*1 \(-> Report \fIxterm\fP window state.
If the \fIxterm\fP window is open (non-iconified), it returns \*(Cs\*1\*t.
If the \fIxterm\fP window is iconified, it returns \*(Cs\*2\*t.
  \*(Ps = \*1\*3 \(-> Report \fIxterm\fP window position as
\*(Cs\*3\*;\*(Ix\*;\*(Iy\*t
  \*(Ps = \*1\*4 \(-> Report \fIxterm\fP window in pixels as
\*(Cs\*s\*4\*s\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
  \*(Ps = \*1\*8 \(-> Report the size of the text area in characters as
\*(Cs\*s\*8\*s\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
  \*(Ps = \*1\*9 \(-> Report the size of the screen in characters as
\*(Cs\*s\*9\*s\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
  \*(Ps = \*2\*0 \(-> Report \fIxterm\fP window's icon label as
\*(Os\*s\*L\*s\fIlabel\fP\*s\*(ST
  \*(Ps = \*2\*1 \(-> Report \fIxterm\fP window's title as
\*(Os\*s\*l\*s\fItitle\fP\*s\*(ST
  \*(Ps >= \*2\*4 \(-> Resize to \*(Ps lines (DECSLPP)
.
.IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*(qu\\*w
Enable Filter Rectangle (DECEFR)
.br
Parameters are [top;left;bottom;right].
.br
Defines the coordinates of a filter rectangle and activates it.
Anytime the locator is detected outside of the filter rectangle,
an outside rectangle event is generated and the rectangle is disabled.
Filter rectangles are always treated as "one-shot" events.
Any parameters that are omitted default to the current locator position.
If all parameters are omitted, any locator motion will be reported.
DECELR always cancels any prevous rectangle definition.
.
.IP \\*(Cs\\*(Ps\\*s\\*x
Request Terminal Parameters (DECREQTPARM)
.
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Pu\\*s\\*(qu\\*z
Enable Locator Reporting (DECELR)
.br
Valid values for the first parameter:
  \*(Ps = \*0 \(-> Locator disabled (default)
  \*(Ps = \*1 \(-> Locator enabled
  \*(Ps = \*2 \(-> Locator enabled for one report, then disabled
.br
The second parameter specifies the coordinate unit for locator reports.
.br
Valid values for the second parameter:
  \*(Pu = \*0 or omitted \(-> default to character cells
  \*(Pu = \*1 \(-> device physical pixels
  \*(Pu = \*2 \(-> character cells
.
.IP \\*(Cs\\*(Pm\\*s\\*(qu\\*{
Select Locator Events (DECSLE)
.br
Valid values for the first (and any additional parameters) are:
  \*(Ps = \*0 \(-> only respond to explicit host requests (DECRQLP)
             (default) also cancels any filter rectangle
  \*(Ps = \*1 \(-> report button down transitions
  \*(Ps = \*2 \(-> do not report button down transitions
  \*(Ps = \*3 \(-> report button up transitions
  \*(Ps = \*4 \(-> do not report button up transitions
.
.IP \\*(Cs\\*(Ps\\*s\\*(qu\\*|
Request Locator Position (DECRQLP)
.br
Valid values for the parameter are:
  \*(Ps = \*0, 1 or omitted \(-> transmit a single DECLRP locator report
.sp
If Locator Reporting has been enabled by a DECELR, xterm will respond
with a DECLRP Locator Report.  This report is also generated on button
up and down events if they have been enabled with a DECSLE, or when
the locator is detected outside of a filter rectangle, if filter rectangles
have been enabled with a DECEFR.
.sp
  \(-> \*(Cs\*(Pe\*s\*;\*(Pb\*s\*;\*(Pr\*s\*;\*(Pc\*s\*;\*(Pp\*s\*&\*s\*w
.sp
Parameters are [event;button;row;column;page].
.br
Valid values for the event:
  \*(Pe = \*0 \(-> locator unavailable - no other parameters sent
  \*(Pe = \*1 \(-> request - xterm received a DECRQLP
  \*(Pe = \*2 \(-> left button down
  \*(Pe = \*3 \(-> left button up
  \*(Pe = \*4 \(-> middle button down
  \*(Pe = \*5 \(-> middle button up
  \*(Pe = \*6 \(-> right button down
  \*(Pe = \*7 \(-> right button up
  \*(Pe = \*8 \(-> M4 button down
  \*(Pe = \*9 \(-> M4 button up
  \*(Pe = \*1\*0 \(-> locator outside filter rectangle
.br
``button'' parameter is a bitmask indicating which buttons are pressed:
  \*(Pb = \*0 \(-> no buttons down
  \*(Pb & \*1 \(-> right button down
  \*(Pb & \*2 \(-> middle button down
  \*(Pb & \*4 \(-> left button down
  \*(Pb & \*8 \(-> M4 button down
.br
``row'' and ``column'' parameters are the coordinates of the locator
position in the xterm window, encoded as ASCII decimal.
.br
The ``page'' parameter is not used by xterm, and will be omitted.
.
.Ed
.
.St
.LP
.B
Operating System Controls
.
.IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(ST
.IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(Be
Set Text Parameters.
For colors and font,
if \*(Pt is a "?", the control sequence elicits a response which consists
of the control sequence which would set the corresponding value.
The \fIdtterm\fP control sequences allow you to determine the icon name
and window title.
  \*(Ps = \*0 \(-> Change Icon Name and Window Title to \*(Pt
  \*(Ps = \*1 \(-> Change Icon Name to \*(Pt
  \*(Ps = \*2 \(-> Change Window Title to \*(Pt
  \*(Ps = \*3 \(-> Set X property on top-level window. \*(Pt should be in the form
"\fIprop=value\fP", or just "\fIprop\fP" to delete the property
  \*(Ps = \*4 ; \fIc ; name\fP \(-> Change Color #\fIc\fP to \fIcname\fP.  Any
number of \fIc name\fP pairs may be given.
  \*(Ps = \*1\*0 \(-> Change color names starting with text foreground to \*(Pt
(a list of one or more color names or RGB specifications, separated by
semicolon, up to eight, as per \fIXParseColor\fP).
  \*(Ps = \*1\*1 \(-> Change colors starting with text background to \*(Pt
  \*(Ps = \*1\*2 \(-> Change colors starting with text cursor to \*(Pt
  \*(Ps = \*1\*3 \(-> Change colors starting with mouse foreground to \*(Pt
  \*(Ps = \*1\*4 \(-> Change colors starting with mouse background to \*(Pt
  \*(Ps = \*1\*5 \(-> Change colors starting with Tek foreground to \*(Pt
  \*(Ps = \*1\*6 \(-> Change colors starting with Tek background to \*(Pt
  \*(Ps = \*1\*7 \(-> Change colors starting with highlight to \*(Pt
  \*(Ps = \*4\*6 \(-> Change Log File to \*(Pt (normally disabled by a
compile-time option)
  \*(Ps = \*5\*0 \(-> Set Font to \*(Pt
If \*(Pt begins with a "#", index in the font menu, relative (if the
next character is a plus or minus sign) or absolute.  A number is
expected but not required after the sign (the default is the current
entry for relative, zero for absolute indexing).
.Ed
.
.St
.LP
.B
Privacy Message
.IP \\*(PM\\*(Pt\\*s\\*(ST
\fIxterm\fP implements no PM functions; \*(Pt is ignored.
\*(Pt need not be printable characters.
.Ed
.
.SH
PC-Style Function Keys
.ds RH Function Keys
.LP
If \fIxterm\fP does minimal translation of the function keys, it usually does this
with a PC-style keyboard, so PC-style function keys result.
Sun keyboards are similar to PC keyboards.
Both have cursor and scrolling operations printed on the keypad,
which duplicate the smaller cursor and scrolling keypads.
.LP
X does not predefine NumLock (used for VT220 keyboards) or Alt (used as
an extension for the Sun/PC keyboards) as modifiers.
These keys are recognized as modifiers when enabled
by the \fBnumLock\fP resource,
or by the DECSET \*1\*0\*3\*5 control sequence.
.LP
The cursor keys transmit the following escape sequences depending on the
mode specified via the \fBDECCKM\fP escape sequence.
.TS
center;
cf3	cf3	cf3
lf3w(2c)	lf3w(2c)	lf3w(2c) .
Key	Normal	Application
_
Cursor Up	\*(Cs\*A	\*(S3\*A
Cursor Down	\*(Cs\*(cB	\*(S3\*(cB
Cursor Right	\*(Cs\*C	\*(S3\*C
Cursor Left	\*(Cs\*D	\*(S3\*D
.TE
.LP
The application keypad transmits the following escape sequences depending on the
mode specified via the \fBDECPNM\fP and \fBDECPAM\fP escape sequences.
Use the NumLock key to override the application mode.
.LP
Not all keys are present on the Sun/PC keypad (e.g., PF1, Tab), but are supported by
the program.
.TS
center;
cf3	cf3	cf3	cf3	cf3
lf3w(2c)	lf3w(2c)	lf3w(2c)	lf3w(2c)	lf3w(2c) .
Key	Numeric	Application	Terminfo	Termcap
_
Space	\*(Sp	\*(S3\*(Sp	-	-
Tab	\*(Ta	\*(S3\*I	-	-
Enter	\*(Cr	\*(S3\*M	kent	@8
PF1	\*(S3\*P	\*(S3\*P	kf1	k1
PF2	\*(S3\*Q	\*(S3\*Q	kf2	k2
PF3	\*(S3\*R	\*(S3\*R	kf3	k3
PF4	\*(S3\*S	\*(S3\*S	kf4	k4
* \f1(multiply)\fP	*	\*(S3\*j	-	-
+ \f1(add)\fP	+	\*(S3\*k	-	-
, \f1(comma)\fP	,	\*(S3\*l	-	-
- \f1(minus)\fP	-	\*(S3\*m	-	-
\. \f1(Delete)\fP	\.	\*(S3\*3\*(c~	-	-
/ \f1(divide)\fP	/	\*(S3\*o	-	-
0 \f1(Insert)\fP	0	\*(Cs\*2\*(c~	-	-
1 \f1(End)\fP	1	\*(Cs\*4\*(c~	kc1	K4
2 \f1(DownArrow)\fP	2	\*(Cs\*(cB	-	-
3 \f1(PageDown)\fP	3	\*(Cs\*5\*(c~	kc3	K5
4 \f1(LeftArrow)\fP	4	\*(Cs\*D	-	-
5 \f1(Begin)\fP	5	\*(Cs\*E	kb2	K2
6 \f1(RightArrow)\fP	6	\*(Cs\*C	-	-
7 \f1(Home)\fP	7	\*(Cs\*1\*(c~	ka1	K1
8 \f1(UpArrow)\fP	8	\*(Cs\*A	-	-
9 \f1(PageUp)\fP	9	\*(Cs\*5\*(c~	ka3	K3
= (equal)	\&=	\*(S3\*(XX	-	-
.TE
They also provide 12 function keys, as well as a few other special-purpose keys.
.TS
center;
cf3	cf3
lf3w(2c)	lf3w(2c) .
Key	Escape Sequence
_
F1	\*(S3\*P
F2	\*(S3\*Q
F3	\*(S3\*R
F4	\*(S3\*S
F5	\*(Cs\*1\*5\*(c~
F6	\*(Cs\*1\*7\*(c~
F7	\*(Cs\*1\*8\*(c~
F8	\*(Cs\*1\*9\*(c~
F9	\*(Cs\*2\*0\*(c~
F10	\*(Cs\*2\*1\*(c~
F11	\*(Cs\*2\*3\*(c~
F12	\*(Cs\*2\*4\*(c~
.TE
.LP
Older versions of \fIxterm\fP implement different escape sequences for F1 through F4.
These can be activated by setting the \fIoldXtermFKeys\fP resource.
However, since they do not correspond to any hardware terminal, they have been deprecated.
(The DEC VT220 reserves F1 through F5 for local functions such as \fBSetup\fP).
.TS
center;
cf3	cf3
lf3w(2c)	lf3w(2c) .
Key	Escape Sequence
_
F1	\*(Cs\*1\*1\*(c~
F2	\*(Cs\*1\*2\*(c~
F3	\*(Cs\*1\*3\*(c~
F4	\*(Cs\*1\*4\*(c~
.TE
In normal mode, i.e., a Sun/PC keyboard
when the \fBsunKeyboard\fP resource is false,
\fIxterm\fP recognizes function key modifiers
which are parameters appended before the final character
of the control sequence.
.TS
center;
cf3	lf3
cf3w(2c)	lf3w(2c) .
Code	Modifiers
_
2	Shift
3	Alt
4	Shift + Alt
5	Control
6	Shift + Control
7	Alt + Control
8	Shift + Alt + Control
.TE
For example, shift-F5 would be sent as
\*(Cs\*1\*5\*;\*2\*(c~

If the \fBalwaysUseMods\fP resource is set, the Meta modifier also is
recognized, making parameters 9 through 16.
.SH
VT220-Style Function Keys
.LP
However, \fIxterm\fP is most useful as a DEC VT102 or VT220 emulator.
Set the \fBsunKeyboard\fP resource to true to force a Sun/PC keyboard
to act like a VT220 keyboard.
.LP
The VT102/VT220 application keypad transmits unique escape sequences in
application mode, which are distinct from the cursor and scrolling keypad:
.TS
center;
cf3	cf3	cf3
lf3w(2c)	lf3w(2c)	lf3w(2c) .
Key	Numeric	Application
_
Space	Space	\*(S3\*(Sp
Tab	Tab	\*(S3\*I
Enter	CR	\*(S3\*M
PF1	\*(S3\*P	\*(S3\*P
PF2	\*(S3\*Q	\*(S3\*Q
PF3	\*(S3\*R	\*(S3\*R
PF4	\*(S3\*S	\*(S3\*S
* \f1(multiply)\fP	*	\*(S3\*j
+ \f1(add)\fP	+	\*(S3\*k
, \f1(comma)\fP	,	\*(S3\*l
- \f1(minus)\fP	-	\*(S3\*m
\. \f1(period)\fP	\.	\*(S3\*n
/ \f1(divide)\fP	/	\*(S3\*o
0	0	\*(S3\*p
1	1	\*(S3\*q
2	2	\*(S3\*r
3	3	\*(S3\*(cs
4	4	\*(S3\*t
5	5	\*(S3\*u
6	6	\*(S3\*v
7	7	\*(S3\*w
8	8	\*(S3\*x
9	9	\*(S3\*y
= (equal)	\&=	\*(S3\*(XX
.TE
.LP
The VT220 provides 8 additional function keys.
With a Sun/PC keyboard, access these keys by Control/F1 for F13, etc.
.TS
center;
cf3	cf3
lf3w(2c)	lf3w(2c) .
Key	Escape Sequence
_
F13	\*(Cs\*2\*5\*(c~
F14	\*(Cs\*2\*6\*(c~
F15	\*(Cs\*2\*8\*(c~
F16	\*(Cs\*2\*9\*(c~
F17	\*(Cs\*3\*1\*(c~
F18	\*(Cs\*3\*2\*(c~
F19	\*(Cs\*3\*3\*(c~
F20	\*(Cs\*3\*4\*(c~
.TE
.SH
VT52-Style Function Keys
.LP
A VT52 does not have function keys, but it does have a numeric keypad and cursor keys.
They differ from the other emulations by the prefix.
Also, the cursor keys do not change:
.TS
center;
cf3	cf3
lf3w(2c)	lf3w(2c) .
Key	Normal/Application
_
Cursor Up	\*(Es\*A
Cursor Down	\*(Es\*(cB
Cursor Right	\*(Es\*C
Cursor Left	\*(Es\*D
.TE
The keypad is similar:
.TS
center;
cf3	cf3	cf3
lf3w(2c)	lf3w(2c)	lf3w(2c) .
Key	Numeric	Application
_
Space	Space	\*(Es\*?\*(Sp
Tab	Tab	\*(Es\*?\*I
Enter	CR	\*(Es\*?\*M
PF1	\*(Es\*P	\*(Es\*P
PF2	\*(Es\*Q	\*(Es\*Q
PF3	\*(Es\*R	\*(Es\*R
PF4	\*(Es\*S	\*(Es\*S
* \f1(multiply)\fP	*	\*(Es\*?\*j
+ \f1(add)\fP	+	\*(Es\*?\*k
, \f1(comma)\fP	,	\*(Es\*?\*l
- \f1(minus)\fP	-	\*(Es\*?\*m
\. \f1(period)\fP	\.	\*(Es\*?\*n
/ \f1(divide)\fP	/	\*(Es\*?\*o
0	0	\*(Es\*?\*p
1	1	\*(Es\*?\*q
2	2	\*(Es\*?\*r
3	3	\*(Es\*?\*(cs
4	4	\*(Es\*?\*t
5	5	\*(Es\*?\*u
6	6	\*(Es\*?\*v
7	7	\*(Es\*?\*w
8	8	\*(Es\*?\*x
9	9	\*(Es\*?\*y
= (equal)	\&=	\*(Es\*?\*(XX
.TE
.SH
Sun-Style Function Keys
.LP
The \fIxterm\fP program provides support for Sun keyboards more directly, by
a menu toggle that causes it to send Sun-style function key codes rather than VT220.
Note, however, that the \fIsun\fP and \fIvt100\fP emulations are not really
compatible.  For example, their wrap-margin behavior differs.
.LP
Only function keys are altered; keypad and cursor keys are the same.
The emulation responds identically.
See the xterm-sun terminfo entry for details.
.SH
HP-Style Function Keys
.LP
Similarly, \fIxterm\fP can be compiled to support HP keyboards.
See the xterm-hp terminfo entry for details.
.SH
Mouse Tracking
.ds RH Mouse Tracking
.LP
The VT widget can be set to send the mouse position and other
information on button presses.  These modes are typically used by
editors and other full-screen applications that want to make use of
the mouse.

There are six mutually exclusive modes.  One is DEC Locator mode, enabled by the
DECELR \*(Cs\*(Ps\*s\*;\*(Ps\*s\*s\*'\*s\*z
control sequence, and is not described here.  The remaining five
modes are each enabled (or disabled) by a different parameter in
DECSET \*(Cs\*?\*(Pm\*s\*h
or
DECRST \*(Cs\*?\*(Pm\*s\*l
control sequence.

Manifest constants for the parameter values
are defined in \fBxcharmouse.h\fP as follows:
.
.DS B
#define SET_X10_MOUSE               9
#define SET_VT200_MOUSE             1000
#define SET_VT200_HIGHLIGHT_MOUSE   1001
#define SET_BTN_EVENT_MOUSE         1002
#define SET_ANY_EVENT_MOUSE         1003
.DE
.LP
The motion reporting modes are strictly \fIxterm\fP extensions, and are not
part of any standard, though they are analogous to the DEC VT200 DECELR
locator reports.

Parameters (such as pointer position and button number) for all mouse
tracking escape sequences generated by \fIxterm\fP
encode numeric parameters in a single character as
\fIvalue\fP+32.
For example, \*! specifies the value 1.
The upper left character position on the terminal is denoted as 1,1.

X10 compatibility mode sends an escape sequence only on button press,
encoding the location and the mouse button pressed.
It is enabled by specifying parameter 9 to DECSET.
On button press, \fIxterm\fP sends
\*(Cs\*M\*(Cb\*(Cx\*(Cy (6 characters).
\*(Cb is button\-1.
\*(Cx and \*(Cy are the x and y coordinates of the mouse when the
button was pressed.

Normal tracking mode sends an escape sequence on both button press and
release.  Modifier key (shift, ctrl, meta) information is also sent.
It is enabled by specifying parameter 1000 to DECSET.
On button press or release, \fIxterm\fP sends
\*(Cs\*M\*(Cb\*(Cx\*(Cy.
The low two bits of \*(Cb encode button information:
0=MB1 pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release.
The next three bits encode the modifiers which were down when the button was
pressed and are added together:  4=Shift, 8=Meta, 16=Control.
Note however that the shift and control bits are normally unavailable
because \fIxterm\fP uses the control modifier with mouse for popup menus,
and the shift modifier is used in the default translations for button events.
The \fIMeta\fP modifier recognized by \fIxterm\fP is the \fImod1\fP mask,
and is not necessarily the "Meta" key (see \fIxmodmap\fP).
\*(Cx and \*(Cy are the x and y coordinates of the mouse event, encoded as
in X10 mode.

Wheel mice may return buttons 4 and 5.
Those buttons are represented by adding 64 to the event code.

Mouse hilite tracking notifies a program of a button press, receives a
range of lines from the program, highlights the region covered by
the mouse within that range until button release, and then sends the
program the release coordinates.
It is enabled by specifying parameter 1001 to DECSET.
Highlighting is performed only for button 1, though other button events
can be received.
\fBWarning:\fP use of this mode requires a cooperating program or it will
hang \fIxterm.\fP
On button press, the same information as for normal tracking is
generated; \fIxterm\fP then waits for the program to send mouse
tracking information.
\fIAll X events are ignored until the proper escape sequence is
received from the pty:\fP
\*(Cs\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*;\*(Ps\*s\*T.
The parameters are \fIfunc, startx, starty, firstrow,\fP and \fIlastrow.\fP
\fIfunc\fP is non-zero to initiate hilite tracking and zero to abort.
\fIstartx\fP and \fIstarty\fP give the starting x and y location for
the highlighted region.  The ending location tracks the mouse, but
will never be above row \fIfirstrow\fP and will always be above row
\fIlastrow.\fP  (The top of the screen is row 1.)
When the button is released, \fIxterm\fP reports the ending position
one of two ways: if the start and end coordinates are valid text
locations: \*(Cs\*t\*(Cx\*(Cy.  If either coordinate is past
the end of the line:
\*(Cs\*T\*(Cx\*(Cy\*(Cx\*(Cy\*(Cx\*(Cy.
The parameters are \fIstartx, starty, endx, endy, mousex,\fP and \fImousey.\fP
\fIstartx, starty, endx, \fPand\fI endy\fP give the starting and
ending character positions of the region.  \fImousex\fP and \fImousey\fP
give the location of the mouse at button up, which may not be over a
character.

Button-event tracking is essentially the same as normal tracking, but
\fIxterm\fP also reports button-motion events.  Motion events
are reported only if the mouse pointer has moved to a different character
cell.  It is enabled by specifying parameter 1002 to DECSET.
On button press or release, \fIxterm\fP sends the same codes used by normal
tracking mode.  On button-motion events, \fIxterm\fP adds 32 to the event code
(the third character, \*(Cb).
The other bits of the event code specify button and modifier keys as in normal mode.
For example, motion into cell x,y with button 1
down is reported as \*(Cs\*M\*@\*(Cx\*(Cy.
( \*@ = 32 + 0 (button 1) + 32 (motion indicator) ).
Similarly, motion with button 3
down is reported as \*(Cs\*M\*(cB\*(Cx\*(Cy.
( \*(cB = 32 + 2 (button 3) + 32 (motion indicator) ).

Any-event mode is the same as button-event mode, except that all motion
events are reported instead of just those that enter a new character cell.
It is enabled by specifying 1003 to DECSET.
.
.br
.ds RH Tektronix 4014 Mode
.SH
Tektronix 4014 Mode
.LP
Most of these sequences are standard Tektronix 4014 control sequences.
Graph mode supports the 12-bit addressing of the Tektronix 4014.
The major features missing are
the write-through and defocused modes.
This document does not describe the commands used in the various
Tektronix plotting modes but does describe the commands to switch modes.
.St
.IP \\*(Be
Bell (Ctrl-G)
.IP \\*(Bs
Backspace (Ctrl-H)
.IP \\*(Ta
Horizontal Tab (Ctrl-I)
.IP \\*(Lf
Line Feed or New Line (Ctrl-J)
.IP \\*(Vt
Cursor up (Ctrl-K)
.IP \\*(Ff
Form Feed or New Page (Ctrl-L)
.IP \\*(Cr
Carriage Return (Ctrl-M)
.IP \\*(Es\\*(Et
Switch to VT100 Mode (ESC Ctrl-C)
.IP \\*(Es\\*(En
Return Terminal Status (ESC Ctrl-E)
.IP \\*(Es\\*(Ff
PAGE (Clear Screen) (ESC Ctrl-L)
.IP \\*(Es\\*(So
Begin 4015 APL mode (ignored by \fIxterm\fP) (ESC Ctrl-N)
.IP \\*(Es\\*(Si
End 4015 APL mode (ignored by \fIxterm\fP) (ESC Ctrl-O)
.IP \\*(Es\\*(Eb
COPY (Save Tektronix Codes to file COPYyyyy-mm-dd.hh:mm:ss) (ESC Ctrl-W)
.IP \\*(Es\\*(Ca
Bypass Condition (ESC Ctrl-X)
.IP \\*(Es\\*(Su
GIN mode (ESC Ctrl-Z)
.IP \\*(Es\\*(Fs
Special Point Plot Mode (ESC Ctrl-\e)
.IP \\*(Es\\*8
Select Large Character Set
.IP \\*(Es\\*9
Select #2 Character Set
.IP \\*(Es\\*:
Select #3 Character Set
.IP \\*(Es\\*;
Select Small Character Set
.IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(Be
Set Text Parameters of VT window
  \*(Ps = \*0 \(-> Change Icon Name and Window Title to \*(Pt
  \*(Ps = \*1 \(-> Change Icon Name to \*(Pt
  \*(Ps = \*2 \(-> Change Window Title to \*(Pt
  \*(Ps = \*4\*6 \(-> Change Log File to \*(Pt (normally disabled by a
compile-time option)
.IP \\*(Es\\*`
Normal Z Axis and Normal (solid) Vectors
.IP \\*(Es\\*a
Normal Z Axis and Dotted Line Vectors
.IP \\*(Es\\*b
Normal Z Axis and Dot-Dashed Vectors
.IP \\*(Es\\*c
Normal Z Axis and Short-Dashed Vectors
.IP \\*(Es\\*d
Normal Z Axis and Long-Dashed Vectors
.IP \\*(Es\\*h
Defocused Z Axis and Normal (solid) Vectors
.IP \\*(Es\\*i
Defocused Z Axis and Dotted Line Vectors
.IP \\*(Es\\*j
Defocused Z Axis and Dot-Dashed Vectors
.IP \\*(Es\\*k
Defocused Z Axis and Short-Dashed Vectors
.IP \\*(Es\\*l
Defocused Z Axis and Long-Dashed Vectors
.IP \\*(Es\\*p
Write-Thru Mode and Normal (solid) Vectors
.IP \\*(Es\\*q
Write-Thru Mode and Dotted Line Vectors
.IP \\*(Es\\*r
Write-Thru Mode and Dot-Dashed Vectors
.IP \\*(Es\\*(cs
Write-Thru Mode and Short-Dashed Vectors
.IP \\*(Es\\*t
Write-Thru Mode and Long-Dashed Vectors
.IP \\*(Fs
Point Plot Mode (Ctrl-\e)
.IP \\*(Gs
Graph Mode (Ctrl-])
.IP \\*(Rs
Incremental Plot Mode (Ctrl-^)
.IP \\*(Us
Alpha Mode (Ctrl-_)
.Ed
.
.
.br
.ds RH VT52 Mode
.SH
VT52 Mode
.LP
Parameters for cursor movement are at the end of the \*(Es\*Y escape sequence.
Each ordinate is encoded in a single character as \fIvalue\fP+32.
For example, \*! is 1.
The screen coodinate system is 0-based.
.St
.IP \\*(Es\\*A
Cursor up.
.IP \\*(Es\\*(cB
Cursor down.
.IP \\*(Es\\*C
Cursor right.
.IP \\*(Es\\*D
Cursor left.
.IP \\*(Es\\*F
Enter graphics mode.
.IP \\*(Es\\*G
Exit graphics mode.
.IP \\*(Es\\*H
Move the cursor to the home position.
.IP \\*(Es\\*I
Reverse line feed.
.IP \\*(Es\\*J
Erase from the cursor to the end of the screen.
.IP \\*(Es\\*K
Erase from the cursor to the end of the line.
.IP \\*(Es\\*Y\\*(Ps\\*s\\*(Ps
Move the cursor to given row and column.
.IP \\*(Es\\*Z
Identify
  \(-> \*(Es\*s\*/\*s\*Z (``I am a VT52.'')
.IP \\*(Es\\*=
Enter alternate keypad mode.
.IP \\*(Es\\*>
Exit alternate keypad mode.
.IP \\*(Es\\*<
Exit VT52 mode (Enter VT100 mode).
.Ed
.
.if n .pl \n(nlu+1v