-
Notifications
You must be signed in to change notification settings - Fork 1
/
ctlseqs.txt
2179 lines (1811 loc) · 94.5 KB
/
ctlseqs.txt
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
This is the modified txt version of a document retrieved from https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
where the copyright notice can be found:
Authors:
Edward Moy
University of California, Berkeley
Revised by
Stephen Gildea
X Consortium (1994)
Thomas Dickey
XFree86 Project (1996-2006)
invisible-island.net (2006-2019)
updated for XTerm Patch #350 (2019/11/02)
Functions using CSI , ordered by the final character(s)
CSI Ps @ Insert Ps (Blank) Character(s) (default = 1) (ICH).
CSI Ps SP @
Shift left Ps columns(s) (default = 1) (SL), ECMA-48.
CSI Ps A Cursor Up Ps Times (default = 1) (CUU).
CSI Ps SP A
Shift right Ps columns(s) (default = 1) (SR), ECMA-48.
CSI Ps B Cursor Down Ps Times (default = 1) (CUD).
CSI Ps C Cursor Forward Ps Times (default = 1) (CUF).
CSI Ps D Cursor Backward Ps Times (default = 1) (CUB).
CSI Ps E Cursor Next Line Ps Times (default = 1) (CNL).
CSI Ps F Cursor Preceding Line Ps Times (default = 1) (CPL).
CSI Ps G Cursor Character Absolute [column] (default = [row,1]) (CHA).
CSI Ps ; Ps H
Cursor Position [row;column] (default = [1,1]) (CUP).
CSI Ps I Cursor Forward Tabulation Ps tab stops (default = 1) (CHT).
CSI Ps J Erase in Display (ED), VT100.
Ps = 0 ? Erase Below (default).
Ps = 1 ? Erase Above.
Ps = 2 ? Erase All.
Ps = 3 ? Erase Saved Lines, xterm.
CSI ? Ps J
Erase in Display (DECSED), VT220.
Ps = 0 ? Selective Erase Below (default).
Ps = 1 ? Selective Erase Above.
Ps = 2 ? Selective Erase All.
Ps = 3 ? Selective Erase Saved Lines, xterm.
CSI Ps K Erase in Line (EL), VT100.
Ps = 0 ? Erase to Right (default).
Ps = 1 ? Erase to Left.
Ps = 2 ? Erase All.
CSI ? Ps K
Erase in Line (DECSEL), VT220.
Ps = 0 ? Selective Erase to Right (default).
Ps = 1 ? Selective Erase to Left.
Ps = 2 ? Selective Erase All.
CSI Ps L Insert Ps Line(s) (default = 1) (IL).
CSI Ps M Delete Ps Line(s) (default = 1) (DL).
CSI Ps P Delete Ps Character(s) (default = 1) (DCH).
CSI Ps S Scroll up Ps lines (default = 1) (SU), VT420, ECMA-48.
CSI ? Pi ; Pa ; Pv S
Set or request graphics attribute, xterm. If configured to
support either Sixel Graphics or ReGIS Graphics, xterm accepts
a three-parameter control sequence, where Pi, Pa and Pv are
the item, action and value:
Pi = 1 ? item is number of color registers.
Pi = 2 ? item is Sixel graphics geometry (in pixels).
Pi = 3 ? item is ReGIS graphics geometry (in pixels).
Pa = 1 ? read attribute.
Pa = 2 ? reset to default.
Pa = 3 ? set to value in Pv.
Pa = 4 ? read the maximum allowed value.
Pv can be omitted except when setting (Pa == 3 ).
Pv = n ? A single integer is used for color registers.
Pv = width ; height ? Two integers for graphics geometry.
xterm replies with a control sequence of the same form:
CSI ? Pi ; Ps ; Pv S
where Ps is the status:
Ps = 0 ? success.
Ps = 1 ? error in Pi.
Ps = 2 ? error in Pa.
Ps = 3 ? failure.
On success, Pv represents the value read or set.
Notes:
o The current implementation allows reading the graphics
sizes, but disallows modifying those sizes because that is
done once, using resource-values.
o Graphics geometry is not necessarily the same as "window
size" (see the dtterm window manipulation extensions).
For example, xterm limits the maximum graphics geometry at
compile time (1000x1000 as of version 328) although the
window size can be larger.
o While resizing a window will always change the current
graphics geometry, the reverse is not true. Setting
graphics geometry does not affect the window size.
CSI Ps T Scroll down Ps lines (default = 1) (SD), VT420.
CSI Ps ; Ps ; Ps ; Ps ; Ps T
Initiate highlight mouse tracking. Parameters are
[func;startx;starty;firstrow;lastrow]. See the section Mouse
Tracking.
CSI > Pm T
Reset title mode features to default value, xterm. Normally,
"reset" disables the feature. It is possible to disable the
ability to reset features by compiling a different default for
the title modes into xterm.
Ps = 0 ? Do not set window/icon labels using hexadecimal.
Ps = 1 ? Do not query window/icon labels using hexadeci-
mal.
Ps = 2 ? Do not set window/icon labels using UTF-8.
Ps = 3 ? Do not query window/icon labels using UTF-8.
(See discussion of Title Modes).
CSI Ps X Erase Ps Character(s) (default = 1) (ECH).
CSI Ps Z Cursor Backward Tabulation Ps tab stops (default = 1) (CBT).
CSI Ps ^ Scroll down Ps lines (default = 1) (SD), ECMA-48.
This was a publication error in the original ECMA-48 5th edi-
tion (1991) corrected in 2003.
CSI Pm ` Character Position Absolute [column] (default = [row,1])
(HPA).
CSI Pm a Character Position Relative [columns] (default = [row,col+1])
(HPR).
CSI Ps b Repeat the preceding graphic character Ps times (REP).
CSI Ps c Send Device Attributes (Primary DA).
Ps = 0 or omitted ? request attributes from terminal. The
response depends on the decTerminalID resource setting.
? CSI ? 1 ; 2 c ("VT100 with Advanced Video Option")
? CSI ? 1 ; 0 c ("VT101 with No Options")
? CSI ? 6 c ("VT102")
? CSI ? 6 2 ; Psc ("VT220")
? CSI ? 6 3 ; Psc ("VT320")
? CSI ? 6 4 ; Psc ("VT420")
The VT100-style response parameters do not mean anything by
themselves. VT220 (and higher) parameters do, telling the
host what features the terminal supports:
Ps = 1 ? 132-columns.
Ps = 2 ? Printer.
Ps = 3 ? ReGIS graphics.
Ps = 4 ? Sixel graphics.
Ps = 6 ? Selective erase.
Ps = 8 ? User-defined keys.
Ps = 9 ? National Replacement Character sets.
Ps = 1 5 ? Technical characters.
Ps = 1 6 ? Locator port.
Ps = 1 7 ? Terminal state interrogation.
Ps = 1 8 ? User windows.
Ps = 2 1 ? Horizontal scrolling.
Ps = 2 2 ? ANSI color, e.g., VT525.
Ps = 2 8 ? Rectangular editing.
Ps = 2 9 ? ANSI text locator (i.e., DEC Locator mode).
XTerm supports part of the User windows feature, providing a
single page (which corresponds to its visible window). Rather
than resizing the font to change the number of lines/columns
in a fixed-size display, xterm uses the window extension con-
trols (DECSNLS, DECSCPP, DECSLPP) to adjust its visible win-
dow's size. The "cursor coupling" controls (DECHCCM, DECPCCM,
DECVCCM) are ignored.
CSI = Ps c
Send Device Attributes (Tertiary DA).
Ps = 0 ? report Terminal Unit ID (default), VT400. XTerm
uses zeros for the site code and serial number in its DECRPTUI
response.
CSI > Ps c
Send Device Attributes (Secondary DA).
Ps = 0 or omitted ? request the terminal's identification
code. The response depends on the decTerminalID resource set-
ting. It should apply only to VT220 and up, but xterm extends
this to VT100.
? CSI > Pp ; Pv ; Pc c
where Pp denotes the terminal type
Pp = 0 ? "VT100".
Pp = 1 ? "VT220".
Pp = 2 ? "VT240".
Pp = 1 8 ? "VT330".
Pp = 1 9 ? "VT340".
Pp = 2 4 ? "VT320".
Pp = 4 1 ? "VT420".
Pp = 6 1 ? "VT510".
Pp = 6 4 ? "VT520".
Pp = 6 5 ? "VT525".
and Pv is the firmware version (for xterm, this was originally
the XFree86 patch number, starting with 95). In a DEC termi-
nal, Pc indicates the ROM cartridge registration number and is
always zero.
CSI Pm d Line Position Absolute [row] (default = [1,column]) (VPA).
CSI Pm e Line Position Relative [rows] (default = [row+1,column])
(VPR).
CSI Ps ; Ps f
Horizontal and Vertical Position [row;column] (default =
[1,1]) (HVP).
CSI Ps g Tab Clear (TBC).
Ps = 0 ? Clear Current Column (default).
Ps = 3 ? Clear All.
CSI Pm 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).
CSI ? Pm h
DEC Private Mode Set (DECSET).
Ps = 1 ? Application Cursor Keys (DECCKM), VT100.
Ps = 2 ? Designate USASCII for character sets G0-G3
(DECANM), VT100, and set VT100 mode.
Ps = 3 ? 132 Column Mode (DECCOLM), VT100.
Ps = 4 ? Smooth (Slow) Scroll (DECSCLM), VT100.
Ps = 5 ? Reverse Video (DECSCNM), VT100.
Ps = 6 ? Origin Mode (DECOM), VT100.
Ps = 7 ? Auto-wrap Mode (DECAWM), VT100.
Ps = 8 ? Auto-repeat Keys (DECARM), VT100.
Ps = 9 ? Send Mouse X & Y on button press. See the sec-
tion Mouse Tracking. This is the X10 xterm mouse protocol.
Ps = 1 0 ? Show toolbar (rxvt).
Ps = 1 2 ? Start Blinking Cursor (AT&T 610).
Ps = 1 3 ? Start Blinking Cursor (set only via resource or
menu).
Ps = 1 4 ? Enable XOR of Blinking Cursor control sequence
and menu.
Ps = 1 8 ? Print form feed (DECPFF), VT220.
Ps = 1 9 ? Set print extent to full screen (DECPEX),
VT220.
Ps = 2 5 ? Show Cursor (DECTCEM), VT220.
Ps = 3 0 ? Show scrollbar (rxvt).
Ps = 3 5 ? Enable font-shifting functions (rxvt).
Ps = 3 8 ? Enter Tektronix Mode (DECTEK), VT240, xterm.
Ps = 4 0 ? Allow 80 ? 132 Mode, xterm.
Ps = 4 1 ? more(1) fix (see curses resource).
Ps = 4 2 ? Enable National Replacement Character sets
(DECNRCM), VT220.
Ps = 4 4 ? Turn On Margin Bell, xterm.
Ps = 4 5 ? Reverse-wraparound Mode, xterm.
Ps = 4 6 ? Start Logging, xterm. This is normally dis-
abled by a compile-time option.
Ps = 4 7 ? Use Alternate Screen Buffer, xterm. This may
be disabled by the titeInhibit resource.
Ps = 6 6 ? Application keypad (DECNKM), VT320.
Ps = 6 7 ? Backarrow key sends backspace (DECBKM), VT340,
VT420. This sets the backarrowKey resource to "true".
Ps = 6 9 ? Enable left and right margin mode (DECLRMM),
VT420 and up.
Ps = 8 0 ? Enable Sixel Scrolling (DECSDM).
Ps = 9 5 ? Do not clear screen when DECCOLM is set/reset
(DECNCSM), VT510 and up.
Ps = 1 0 0 0 ? Send Mouse X & Y on button press and
release. See the section Mouse Tracking. This is the X11
xterm mouse protocol.
Ps = 1 0 0 1 ? Use Hilite Mouse Tracking, xterm.
Ps = 1 0 0 2 ? Use Cell Motion Mouse Tracking, xterm. See
the section Button-event tracking.
Ps = 1 0 0 3 ? Use All Motion Mouse Tracking, xterm. See
the section Any-event tracking.
Ps = 1 0 0 4 ? Send FocusIn/FocusOut events, xterm.
Ps = 1 0 0 5 ? Enable UTF-8 Mouse Mode, xterm.
Ps = 1 0 0 6 ? Enable SGR Mouse Mode, xterm.
Ps = 1 0 0 7 ? Enable Alternate Scroll Mode, xterm. This
corresponds to the alternateScroll resource.
Ps = 1 0 1 0 ? Scroll to bottom on tty output (rxvt).
This sets the scrollTtyOutput resource to "true".
Ps = 1 0 1 1 ? Scroll to bottom on key press (rxvt). This
sets the scrollKey resource to "true".
Ps = 1 0 1 5 ? Enable urxvt Mouse Mode.
Ps = 1 0 3 4 ? Interpret "meta" key, xterm. This sets the
eighth bit of keyboard input (and enables the eightBitInput
resource).
Ps = 1 0 3 5 ? Enable special modifiers for Alt and Num-
Lock keys, xterm. This enables the numLock resource.
Ps = 1 0 3 6 ? Send ESC when Meta modifies a key, xterm.
This enables the metaSendsEscape resource.
Ps = 1 0 3 7 ? Send DEL from the editing-keypad Delete
key, xterm.
Ps = 1 0 3 9 ? Send ESC when Alt modifies a key, xterm.
This enables the altSendsEscape resource, xterm.
Ps = 1 0 4 0 ? Keep selection even if not highlighted,
xterm. This enables the keepSelection resource.
Ps = 1 0 4 1 ? Use the CLIPBOARD selection, xterm. This
enables the selectToClipboard resource.
Ps = 1 0 4 2 ? Enable Urgency window manager hint when
Control-G is received, xterm. This enables the bellIsUrgent
resource.
Ps = 1 0 4 3 ? Enable raising of the window when Control-G
is received, xterm. This enables the popOnBell resource.
Ps = 1 0 4 4 ? Reuse the most recent data copied to CLIP-
BOARD, xterm. This enables the keepClipboard resource.
Ps = 1 0 4 6 ? Enable switching to/from Alternate Screen
Buffer, xterm. This works for terminfo-based systems, updat-
ing the titeInhibit resource.
Ps = 1 0 4 7 ? Use Alternate Screen Buffer, xterm. This
may be disabled by the titeInhibit resource.
Ps = 1 0 4 8 ? Save cursor as in DECSC, xterm. This may
be disabled by the titeInhibit resource.
Ps = 1 0 4 9 ? Save cursor as in DECSC, xterm. After sav-
ing the cursor, switch to the Alternate Screen Buffer, clear-
ing it first. This may be disabled by the titeInhibit
resource. This control combines the effects of the 1 0 4 7
and 1 0 4 8 modes. Use this with terminfo-based applications
rather than the 4 7 mode.
Ps = 1 0 5 0 ? Set terminfo/termcap function-key mode,
xterm.
Ps = 1 0 5 1 ? Set Sun function-key mode, xterm.
Ps = 1 0 5 2 ? Set HP function-key mode, xterm.
Ps = 1 0 5 3 ? Set SCO function-key mode, xterm.
Ps = 1 0 6 0 ? Set legacy keyboard emulation, i.e, X11R6,
xterm.
Ps = 1 0 6 1 ? Set VT220 keyboard emulation, xterm.
Ps = 2 0 0 4 ? Set bracketed paste mode, xterm.
CSI Pm i Media Copy (MC).
Ps = 0 ? Print screen (default).
Ps = 4 ? Turn off printer controller mode.
Ps = 5 ? Turn on printer controller mode.
Ps = 1 0 ? HTML screen dump, xterm.
Ps = 1 1 ? SVG screen dump, xterm.
CSI ? Pm 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.
CSI Pm 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).
CSI ? Pm l
DEC Private Mode Reset (DECRST).
Ps = 1 ? Normal Cursor Keys (DECCKM), VT100.
Ps = 2 ? Designate VT52 mode (DECANM), VT100.
Ps = 3 ? 80 Column Mode (DECCOLM), VT100.
Ps = 4 ? Jump (Fast) Scroll (DECSCLM), VT100.
Ps = 5 ? Normal Video (DECSCNM), VT100.
Ps = 6 ? Normal Cursor Mode (DECOM), VT100.
Ps = 7 ? No Auto-wrap Mode (DECAWM), VT100.
Ps = 8 ? No Auto-repeat Keys (DECARM), VT100.
Ps = 9 ? Don't send Mouse X & Y on button press, xterm.
Ps = 1 0 ? Hide toolbar (rxvt).
Ps = 1 2 ? Stop Blinking Cursor (AT&T 610).
Ps = 1 3 ? Disable Blinking Cursor (reset only via
resource or menu).
Ps = 1 4 ? Disable XOR of Blinking Cursor control sequence
and menu.
Ps = 1 8 ? Don't print form feed (DECPFF).
Ps = 1 9 ? Limit print to scrolling region (DECPEX).
Ps = 2 5 ? Hide Cursor (DECTCEM), VT220.
Ps = 3 0 ? Don't show scrollbar (rxvt).
Ps = 3 5 ? Disable font-shifting functions (rxvt).
Ps = 4 0 ? Disallow 80 ? 132 Mode, xterm.
Ps = 4 1 ? No more(1) fix (see curses resource).
Ps = 4 2 ? Disable National Replacement Character sets
(DECNRCM), VT220.
Ps = 4 4 ? Turn Off Margin Bell, xterm.
Ps = 4 5 ? No Reverse-wraparound Mode, xterm.
Ps = 4 6 ? Stop Logging, xterm. This is normally disabled
by a compile-time option.
Ps = 4 7 ? Use Normal Screen Buffer, xterm.
Ps = 6 6 ? Numeric keypad (DECNKM), VT320.
Ps = 6 7 ? Backarrow key sends delete (DECBKM), VT340,
VT420. This sets the backarrowKey resource to "false".
Ps = 6 9 ? Disable left and right margin mode (DECLRMM),
VT420 and up.
Ps = 8 0 ? Disable Sixel Scrolling (DECSDM).
Ps = 9 5 ? Clear screen when DECCOLM is set/reset (DEC-
NCSM), VT510 and up.
Ps = 1 0 0 0 ? Don't send Mouse X & Y on button press and
release. See the section Mouse Tracking.
Ps = 1 0 0 1 ? Don't use Hilite Mouse Tracking, xterm.
Ps = 1 0 0 2 ? Don't use Cell Motion Mouse Tracking,
xterm. See the section Button-event tracking.
Ps = 1 0 0 3 ? Don't use All Motion Mouse Tracking, xterm.
See the section Any-event tracking.
Ps = 1 0 0 4 ? Don't send FocusIn/FocusOut events, xterm.
Ps = 1 0 0 5 ? Disable UTF-8 Mouse Mode, xterm.
Ps = 1 0 0 6 ? Disable SGR Mouse Mode, xterm.
Ps = 1 0 0 7 ? Disable Alternate Scroll Mode, xterm. This
corresponds to the alternateScroll resource.
Ps = 1 0 1 0 ? Don't scroll to bottom on tty output
(rxvt). This sets the scrollTtyOutput resource to "false".
Ps = 1 0 1 1 ? Don't scroll to bottom on key press (rxvt).
This sets the scrollKey resource to "false".
Ps = 1 0 1 5 ? Disable urxvt Mouse Mode.
Ps = 1 0 3 4 ? Don't interpret "meta" key, xterm. This
disables the eightBitInput resource.
Ps = 1 0 3 5 ? Disable special modifiers for Alt and Num-
Lock keys, xterm. This disables the numLock resource.
Ps = 1 0 3 6 ? Don't send ESC when Meta modifies a key,
xterm. This disables the metaSendsEscape resource.
Ps = 1 0 3 7 ? Send VT220 Remove from the editing-keypad
Delete key, xterm.
Ps = 1 0 3 9 ? Don't send ESC when Alt modifies a key,
xterm. This disables the altSendsEscape resource.
Ps = 1 0 4 0 ? Do not keep selection when not highlighted,
xterm. This disables the keepSelection resource.
Ps = 1 0 4 1 ? Use the PRIMARY selection, xterm. This
disables the selectToClipboard resource.
Ps = 1 0 4 2 ? Disable Urgency window manager hint when
Control-G is received, xterm. This disables the bellIsUrgent
resource.
Ps = 1 0 4 3 ? Disable raising of the window when Control-
G is received, xterm. This disables the popOnBell resource.
Ps = 1 0 4 6 ? Disable switching to/from Alternate Screen
Buffer, xterm. This works for terminfo-based systems, updat-
ing the titeInhibit resource. If currently using the Alter-
nate Screen Buffer, xterm switches to the Normal Screen Buf-
fer.
Ps = 1 0 4 7 ? Use Normal Screen Buffer, xterm. Clear the
screen first if in the Alternate Screen Buffer. This may be
disabled by the titeInhibit resource.
Ps = 1 0 4 8 ? Restore cursor as in DECRC, xterm. This
may be disabled by the titeInhibit resource.
Ps = 1 0 4 9 ? Use Normal Screen Buffer and restore cursor
as in DECRC, xterm. This may be disabled by the titeInhibit
resource. This combines the effects of the 1 0 4 7 and 1 0 4
8 modes. Use this with terminfo-based applications rather
than the 4 7 mode.
Ps = 1 0 5 0 ? Reset terminfo/termcap function-key mode,
xterm.
Ps = 1 0 5 1 ? Reset Sun function-key mode, xterm.
Ps = 1 0 5 2 ? Reset HP function-key mode, xterm.
Ps = 1 0 5 3 ? Reset SCO function-key mode, xterm.
Ps = 1 0 6 0 ? Reset legacy keyboard emulation, i.e,
X11R6, xterm.
Ps = 1 0 6 1 ? Reset keyboard emulation to Sun/PC style,
xterm.
Ps = 2 0 0 4 ? Reset bracketed paste mode, xterm.
CSI Pm m Character Attributes (SGR).
Ps = 0 ? Normal (default), VT100.
Ps = 1 ? Bold, VT100.
Ps = 2 ? Faint, decreased intensity, ECMA-48 2nd.
Ps = 3 ? Italicized, ECMA-48 2nd.
Ps = 4 ? Underlined, VT100.
Ps = 5 ? Blink, VT100.
This appears as Bold in X11R6 xterm.
Ps = 7 ? Inverse, VT100.
Ps = 8 ? Invisible, i.e., hidden, ECMA-48 2nd, VT300.
Ps = 9 ? Crossed-out characters, ECMA-48 3rd.
Ps = 2 1 ? Doubly-underlined, ECMA-48 3rd.
Ps = 2 2 ? Normal (neither bold nor faint), ECMA-48 3rd.
Ps = 2 3 ? Not italicized, ECMA-48 3rd.
Ps = 2 4 ? Not underlined, ECMA-48 3rd.
Ps = 2 5 ? Steady (not blinking), ECMA-48 3rd.
Ps = 2 7 ? Positive (not inverse), ECMA-48 3rd.
Ps = 2 8 ? Visible, i.e., not hidden, ECMA-48 3rd, VT300.
Ps = 2 9 ? Not crossed-out, ECMA-48 3rd.
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, ECMA-48 3rd.
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, ECMA-48 3rd.
Some of the above note the edition of ECMA-48 which first
describes a feature. In its successive editions from 1979 to
1991 (2nd 1979, 3rd 1984, 4th 1986, and 5th 1991), ECMA-48
listed codes through 6 5 (skipping several toward the end of
the range). Most of the ECMA-48 codes not implemented in
xterm were never implemented in a hardware terminal. Several
(such as 3 9 and 4 9 ) are either noted in ECMA-48 as imple-
mentation defined, or described in vague terms.
The successive editions of ECMA-48 give little attention to
changes from one edition to the next, except to comment on
features which have become obsolete. ECMA-48 1st (1976) is
unavailable; there is no reliable source of information which
states whether "ANSI" color was defined in that edition, or
later (1979). The VT100 (1978) implemented the most commonly
used non-color video attributes which are given in the 2nd
edition.
While 8-color support is described in ECMA-48 2nd edition, the
VT500 series (introduced in 1993) were the first DEC terminals
implementing "ANSI" color. The DEC terminal's use of color is
known to differ from xterm; useful documentation on this
series became available too late to influence xterm.
If 16-color support is compiled, the following aixterm con-
trols apply. Assume that xterm's resources are set so that
the ISO color codes are the first 8 of a set of 16. Then the
aixterm 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.
If xterm is compiled with the 16-color support disabled, it
supports the following, from rxvt:
Ps = 1 0 0 ? Set foreground and background color to
default.
XTerm maintains a color palette whose entries are identified
by an index beginning with zero. If 88- or 256-color support
is compiled, the following apply:
o All parameters are decimal integers.
o RGB values range from zero (0) to 255.
o ISO-8613-6 has been interpreted in more than one way;
xterm allows the semicolons separating the subparameters
in this control to be replaced by colons (but after the
first colon, colons must be used).
These ISO-8613-6 controls (marked in ECMA-48 5th edition as
"reserved for future standardization") are supported by xterm:
Pm = 3 8 ; 2 ; Pi ; Pr ; Pg ; Pb ? Set foreground color
using RGB values. If xterm is not compiled with direct-color
support, it uses the closest match in its palette for the
given RGB Pr/Pg/Pb. The color space identifier Pi is ignored.
Pm = 3 8 ; 5 ; Ps ? Set foreground color to Ps, using
indexed color.
Pm = 4 8 ; 2 ; Pi ; Pr ; Pg ; Pb ? Set background color
using RGB values. If xterm is not compiled with direct-color
support, it uses the closest match in its palette for the
given RGB Pr/Pg/Pb. The color space identifier Pi is ignored.
Pm = 4 8 ; 5 ; Ps ? Set background color to Ps, using
indexed color.
This variation on ISO-8613-6 is supported for compatibility
with KDE konsole:
Pm = 3 8 ; 2 ; Pr ; Pg ; Pb ? Set foreground color using
RGB values. If xterm is not compiled with direct-color sup-
port, it uses the closest match in its palette for the given
RGB Pr/Pg/Pb.
Pm = 4 8 ; 2 ; Pr ; Pg ; Pb ? Set background color using
RGB values. If xterm is not compiled with direct-color sup-
port, it uses the closest match in its palette for the given
RGB Pr/Pg/Pb.
In each case, if xterm is compiled with direct-color support,
and the resource directColor is true, then rather than choos-
ing the closest match, xterm asks the X server to directly
render a given color.
CSI > Pp ; Pv m
CSI > Pp m
Set/reset key modifier options, xterm. Set or reset resource-
values used by xterm to decide whether to construct escape
sequences holding information about the modifiers pressed with
a given key.
The first parameter Pp identifies the resource to set/reset.
The second parameter Pv is the value to assign to the
resource.
If the second parameter is omitted, the resource is reset to
its initial value. Values 3 and 5 are reserved for keypad-
keys and string-keys.
Pp = 0 ? modifyKeyboard.
Pp = 1 ? modifyCursorKeys.
Pp = 2 ? modifyFunctionKeys.
Pp = 4 ? modifyOtherKeys.
If no parameters are given, all resources are reset to their
initial values.
CSI Ps n Device Status Report (DSR).
Ps = 5 ? Status Report.
Result ("OK") is CSI 0 n
Ps = 6 ? Report Cursor Position (CPR) [row;column].
Result is CSI r ; c R
Note: it is possible for this sequence to be sent by a func-
tion key. For example, with the default keyboard configura-
tion the shifted F1 key may send (with shift-, control-, alt-
modifiers)
CSI 1 ; 2 R , or
CSI 1 ; 5 R , or
CSI 1 ; 6 R , etc.
The second parameter encodes the modifiers; values range from
2 to 16. See the section PC-Style Function Keys for the
codes. The modifyFunctionKeys and modifyKeyboard resources
can change the form of the string sent from the modified F1
key.
CSI > Pm n
Disable key modifier options, xterm. These modifiers may be
enabled via the CSI > Pm m sequence. This control sequence
corresponds to a resource value of "-1", which cannot be set
with the other sequence.
The parameter identifies the resource to be disabled:
Ps = 0 ? modifyKeyboard.
Ps = 1 ? modifyCursorKeys.
Ps = 2 ? modifyFunctionKeys.
Ps = 4 ? modifyOtherKeys.
If the parameter is omitted, modifyFunctionKeys is disabled.
When modifyFunctionKeys is disabled, xterm uses the modifier
keys to make an extended sequence of function keys rather than
adding a parameter to each function key to denote the modi-
fiers.
CSI ? Ps n
Device Status Report (DSR, DEC-specific).
Ps = 6 ? Report Cursor Position (DECXCPR). The response
[row;column] is returned as
CSI ? r ; c R
(assumes the default page, i.e., "1").
Ps = 1 5 ? Report Printer status. The response is
CSI ? 1 0 n (ready). or
CSI ? 1 1 n (not ready).
Ps = 2 5 ? Report UDK status. The response is
CSI ? 2 0 n (unlocked)
or
CSI ? 2 1 n (locked).
Ps = 2 6 ? Report Keyboard status. The response is
CSI ? 2 7 ; 1 ; 0 ; 0 n (North American).
The last two parameters apply to VT300 & up (keyboard ready)
and VT400 & up (LK01) respectively.
Ps = 5 3 ? Report Locator status. The response is CSI ? 5
3 n Locator available, if compiled-in, or CSI ? 5 0 n No
Locator, if not.
Ps = 5 5 ? Report Locator status. The response is CSI ? 5
3 n Locator available, if compiled-in, or CSI ? 5 0 n No
Locator, if not.
Ps = 5 6 ? Report Locator type. The response is CSI ? 5 7
; 1 n Mouse, if compiled-in, or CSI ? 5 7 ; 0 n Cannot iden-
tify, if not.
Ps = 6 2 ? Report macro space (DECMSR). The response is
CSI Pn * { .
Ps = 6 3 ? Report memory checksum (DECCKSR). The response
is DCS Pt ! x x x x ST .
Pt is the request id (from an optional parameter to the
request).
The x's are hexadecimal digits 0-9 and A-F.
Ps = 7 5 ? Report data integrity. The response is CSI ? 7
0 n (ready, no errors).
Ps = 8 5 ? Report multi-session configuration. The
response is CSI ? 8 3 n (not configured for multiple-session
operation).
CSI > Ps p
Set resource value pointerMode. This is used by xterm to
decide whether to hide the pointer cursor as the user types.
Valid values for the parameter:
Ps = 0 ? never hide the pointer.
Ps = 1 ? hide if the mouse tracking mode is not enabled.
Ps = 2 ? always hide the pointer, except when leaving the
window.
Ps = 3 ? always hide the pointer, even if leaving/entering
the window.
If no parameter is given, xterm uses the default, which is 1 .
CSI ! p Soft terminal reset (DECSTR), VT220 and up.
CSI Pl ; Pc " p
Set conformance level (DECSCL), VT220 and up.
The first parameter selects the conformance level. Valid val-
ues are:
Pl = 6 1 ? level 1, e.g., VT100.
Pl = 6 2 ? level 2, e.g., VT200.
Pl = 6 3 ? level 3, e.g., VT300.
Pl = 6 4 ? level 4, e.g., VT400.
Pl = 6 5 ? level 5, e.g., VT500.
The second parameter selects the C1 control transmission mode.
This is an optional parameter, ignored in conformance level 1.
Valid values are:
Pc = 0 ? 8-bit controls.
Pc = 1 ? 7-bit controls (DEC factory default).
Pc = 2 ? 8-bit controls.
The 7-bit and 8-bit control modes can also be set by S7C1T and
S8C1T, but DECSCL is preferred.
CSI Ps $ p
Request ANSI mode (DECRQM). For VT300 and up, reply DECRPM is
CSI Ps; Pm$ y
where Ps is the mode number as in SM/RM, and Pm is the mode
value:
0 - not recognized
1 - set
2 - reset
3 - permanently set
4 - permanently reset
CSI ? Ps $ p
Request DEC private mode (DECRQM). For VT300 and up, reply
DECRPM is
CSI ? Ps; Pm$ y
where Ps is the mode number as in DECSET/DECSET, Pm is the
mode value as in the ANSI DECRQM.
Two private modes are read-only (i.e., 1 3 and 1 4 ), pro-
vided only for reporting their values using this control
sequence. They correspond to the resources cursorBlink and
cursorBlinkXOR.
CSI # p
CSI Pm # p
Push video attributes onto stack (XTPUSHSGR), xterm. This is
an alias for CSI # { , used to work around language limita-
tions of C#.
CSI Ps q Load LEDs (DECLL), VT100.
Ps = 0 ? Clear all LEDS (default).
Ps = 1 ? Light Num Lock.
Ps = 2 ? Light Caps Lock.
Ps = 3 ? Light Scroll Lock.
Ps = 2 1 ? Extinguish Num Lock.
Ps = 2 2 ? Extinguish Caps Lock.
Ps = 2 3 ? Extinguish Scroll Lock.
CSI Ps SP q
Set cursor style (DECSCUSR), VT520.
Ps = 0 ? blinking block.
Ps = 1 ? blinking block (default).
Ps = 2 ? steady block.
Ps = 3 ? blinking underline.
Ps = 4 ? steady underline.
Ps = 5 ? blinking bar, xterm.
Ps = 6 ? steady bar, xterm.
CSI Ps " 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.
CSI # q Pop video attributes from stack (XTPOPSGR), xterm. This is an
alias for CSI # } , used to work around language limitations
of C#.
CSI Ps ; Ps r
Set Scrolling Region [top;bottom] (default = full size of win-
dow) (DECSTBM), VT100.
CSI ? Pm r
Restore DEC Private Mode Values. The value of Ps previously
saved is restored. Ps values are the same as for DECSET.
CSI Pt ; Pl ; Pb ; Pr ; Ps $ r
Change Attributes in Rectangular Area (DECCARA), VT400 and up.
Pt ; Pl ; Pb ; Pr denotes the rectangle.
Ps denotes the SGR attributes to change: 0, 1, 4, 5, 7.
CSI s Save cursor, available only when DECLRMM is disabled (SCOSC,
also ANSI.SYS).
CSI Pl ; Pr s
Set left and right margins (DECSLRM), VT420 and up. This is
available only when DECLRMM is enabled.
CSI ? Pm s
Save DEC Private Mode Values. Ps values are the same as for
DECSET.
CSI Ps ; Ps ; Ps t
Window manipulation (from dtterm, as well as extensions by
xterm). These controls may be disabled using the allowWin-
dowOps resource.
xterm uses Extended Window Manager Hints (EWMH) to maximize
the window. Some window managers have incomplete support for
EWMH. For instance, fvwm, flwm and quartz-wm advertise sup-
port for maximizing windows horizontally or vertically, but in
fact equate those to the maximize operation.
Valid values for the first (and any additional parameters)
are:
Ps = 1 ? De-iconify window.
Ps = 2 ? Iconify window.
Ps = 3 ; x ; y ? Move window to [x, y].
Ps = 4 ; height ; width ? Resize the xterm window to
given height and width in pixels. Omitted parameters reuse
the current height or width. Zero parameters use the dis-
play's height or width.
Ps = 5 ? Raise the xterm window to the front of the stack-
ing order.
Ps = 6 ? Lower the xterm window to the bottom of the
stacking order.
Ps = 7 ? Refresh the xterm window.
Ps = 8 ; height ; width ? Resize the text area to given
height and width in characters. Omitted parameters reuse the
current height or width. Zero parameters use the display's
height or width.
Ps = 9 ; 0 ? Restore maximized window.
Ps = 9 ; 1 ? Maximize window (i.e., resize to screen
size).
Ps = 9 ; 2 ? Maximize window vertically.
Ps = 9 ; 3 ? Maximize window horizontally.
Ps = 1 0 ; 0 ? Undo full-screen mode.
Ps = 1 0 ; 1 ? Change to full-screen.
Ps = 1 0 ; 2 ? Toggle full-screen.
Ps = 1 1 ? Report xterm window state.
If the xterm window is non-iconified, it returns CSI 1 t .
If the xterm window is iconified, it returns CSI 2 t .
Ps = 1 3 ? Report xterm window position.
Note: X Toolkit positions can be negative, but the reported
values are unsigned, in the range 0-65535. Negative values
correspond to 32768-65535.
Result is CSI 3 ; x ; y t
Ps = 1 3 ; 2 ? Report xterm text-area position.
Result is CSI 3 ; x ; y t
Ps = 1 4 ? Report xterm text area size in pixels.
Result is CSI 4 ; height ; width t
Ps = 1 4 ; 2 ? Report xterm window size in pixels.
Normally xterm's window is larger than its text area, since it
includes the frame (or decoration) applied by the window man-
ager, as well as the area used by a scroll-bar.
Result is CSI 4 ; height ; width t
Ps = 1 5 ? Report size of the screen in pixels.
Result is CSI 5 ; height ; width t
Ps = 1 6 ? Report xterm character cell size in pixels.
Result is CSI 6 ; height ; width t
Ps = 1 8 ? Report the size of the text area in characters.
Result is CSI 8 ; height ; width t
Ps = 1 9 ? Report the size of the screen in characters.
Result is CSI 9 ; height ; width t
Ps = 2 0 ? Report xterm window's icon label.
Result is OSC L label ST
Ps = 2 1 ? Report xterm window's title.
Result is OSC l label ST
Ps = 2 2 ; 0 ? Save xterm icon and window title on stack.
Ps = 2 2 ; 1 ? Save xterm icon title on stack.
Ps = 2 2 ; 2 ? Save xterm window title on stack.
Ps = 2 3 ; 0 ? Restore xterm icon and window title from
stack.
Ps = 2 3 ; 1 ? Restore xterm icon title from stack.
Ps = 2 3 ; 2 ? Restore xterm window title from stack.
Ps >= 2 4 ? Resize to Ps lines (DECSLPP), VT340 and VT420.
xterm adapts this by resizing its window.
CSI > Pm t
This xterm control sets one or more features of the title
modes. Each parameter enables a single feature.
Ps = 0 ? Set window/icon labels using hexadecimal.
Ps = 1 ? Query window/icon labels using hexadecimal.
Ps = 2 ? Set window/icon labels using UTF-8.
Ps = 3 ? Query window/icon labels using UTF-8. (See dis-
cussion of Title Modes)
CSI Ps SP t
Set warning-bell volume (DECSWBV), VT520.
Ps = 0 or 1 ? off.
Ps = 2 , 3 or 4 ? low.
Ps = 5 , 6 , 7 , or 8 ? high.
CSI Pt ; Pl ; Pb ; Pr ; Ps $ t
Reverse Attributes in Rectangular Area (DECRARA), VT400 and
up.
Pt ; Pl ; Pb ; Pr denotes the rectangle.
Ps denotes the attributes to reverse, i.e., 1, 4, 5, 7.
CSI u Restore cursor (SCORC, also ANSI.SYS).
CSI Ps SP u
Set margin-bell volume (DECSMBV), VT520.
Ps = 0 , 5 , 6 , 7 , or 8 ? high.
Ps = 1 ? off.
Ps = 2 , 3 or 4 ? low.
CSI Pt ; Pl ; Pb ; Pr ; Pp ; Pt ; Pl ; Pp $ v
Copy Rectangular Area (DECCRA), VT400 and up.
Pt ; Pl ; Pb ; Pr denotes the rectangle.
Pp denotes the source page.
Pt ; Pl denotes the target location.
Pp denotes the target page.
CSI Ps $ w
Request presentation state report (DECRQPSR), VT320 and up.
Ps = 0 ? error.
Ps = 1 ? cursor information report (DECCIR).
Response is
DCS 1 $ u Pt ST
Refer to the VT420 programming manual, which requires six
pages to document the data string Pt,
Ps = 2 ? tab stop report (DECTABSR).
Response is
DCS 2 $ u Pt ST
The data string Pt is a list of the tab-stops, separated by
"/" characters.
CSI Pt ; Pl ; Pb ; Pr ' w
Enable Filter Rectangle (DECEFR), VT420 and up.
Parameters are [top;left;bottom;right].
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 omit-
ted, any locator motion will be reported. DECELR always can-
cels any prevous rectangle definition.
CSI Ps x Request Terminal Parameters (DECREQTPARM).
if Ps is a "0" (default) or "1", and xterm is emulating VT100,
the control sequence elicits a response of the same form whose
parameters describe the terminal:
Ps ? the given Ps incremented by 2.
Pn = 1 ? no parity.
Pn = 1 ? eight bits.
Pn = 1 ? 2 8 transmit 38.4k baud.
Pn = 1 ? 2 8 receive 38.4k baud.
Pn = 1 ? clock multiplier.
Pn = 0 ? STP flags.
CSI Ps * x
Select Attribute Change Extent (DECSACE), VT420 and up.
Ps = 0 ? from start to end position, wrapped.
Ps = 1 ? from start to end position, wrapped.
Ps = 2 ? rectangle (exact).
CSI Pc ; Pt ; Pl ; Pb ; Pr $ x
Fill Rectangular Area (DECFRA), VT420 and up.
Pc is the character to use.
Pt ; Pl ; Pb ; Pr denotes the rectangle.
CSI Ps # y
Select checksum extension (XTCHECKSUM), xterm. The bits of Ps
modify the calculation of the checksum returned by DECRQCRA:
0 ? do not negate the result.
1 ? do not report the VT100 video attributes.
2 ? do not omit checksum for blanks.
3 ? omit checksum for cells not explicitly initialized.
4 ? do not mask cell value to 8 bits or ignore combining
characters.
5 ? do not mask cell value to 7 bits.