blob: e5372d0266f9fa3ee2042ce4505130ab0ef4febc [file] [log] [blame]
Bram Moolenaare4f25e42017-07-07 11:54:15 +02001Sequences documented in parens are implicit ones from parser.c, which move
2between states.
3
41 = VT100
52 = VT220
63 = VT320
7
8 C0 controls
9
10123 0x00 = NUL
11123 0x07 = BEL
12123 0x08 = BS
13123 0x09 = HT
14123 0x0A = LF
15123 0x0B = VT
16123 0x0C = FF
17123 0x0D = CR
18123 0x0E = LS1
19123 0x0F = LS0
20 (0x18 = CAN)
21 (0x1A = SUB)
22 (0x1B = ESC)
23
24123 0x7f = DEL (ignored)
25
26 C1 controls
27
28123 0x84 = IND
29123 0x85 = NEL
30123 0x88 = HTS
31123 0x8D = RI
32 23 0x8e = SS2
33 23 0x8f = SS3
34 (0x90 = DCS)
35 (0x9B = CSI)
36 (0x9C = ST)
37 (0x9D = OSC)
38
39 Escape sequences
40 - excluding sequences that are C1 aliases
41
42123 ESC () = SCS, select character set (G0, G1)
43 23 ESC *+ = SCS, select character set (G2, G3)
44123 ESC 7 = DECSC - save cursor
45123 ESC 8 = DECRC - restore cursor
46123 ESC # 3 = DECDHL, double-height line (top half)
47123 ESC # 4 = DECDHL, double-height line (bottom half)
48123 ESC # 5 = DECSWL, single-width single-height line
49123 ESC # 6 = DECDWL, double-width single-height line
50123 ESC # 8 = DECALN
51123 ESC < = Ignored (used by VT100 to exit VT52 mode)
52123 ESC = = DECKPAM, keypad application mode
53123 ESC > = DECKPNM, keypad numeric mode
54 23 ESC Sp F = S7C1T
55 23 ESC Sp G = S8C1T
56 (ESC P = DCS)
57 (ESC [ = CSI)
58 (ESC \ = ST)
59 (ESC ] = OSC)
60123 ESC c = RIS, reset initial state
61 3 ESC n = LS2
62 3 ESC o = LS3
63 3 ESC ~ = LS1R
64 3 ESC } = LS2R
65 3 ESC | = LS3R
66
67 DCSes
68
69 3 DCS $ q ST = DECRQSS
70 3 m = Request SGR
71 Sp q = Request DECSCUSR
72 3 " q = Request DECSCA
73 3 r = Request DECSTBM
74 s = Request DECSLRM
75
76 CSIs
77 23 CSI @ = ICH
78123 CSI A = CUU
79123 CSI B = CUD
80123 CSI C = CUF
81123 CSI D = CUB
82 CSI E = CNL
83 CSI F = CPL
84 CSI G = CHA
85123 CSI H = CUP
86 CSI I = CHT
87123 CSI J = ED
88 23 CSI ? J = DECSED, selective erase in display
89123 CSI K = EL
90 23 CSI ? K = DECSEL, selective erase in line
91 23 CSI L = IL
92 23 CSI M = DL
93 23 CSI P = DCH
94 CSI S = SU
95 CSI T = SD
96 23 CSI X = ECH
97 CSI Z = CBT
98 CSI ` = HPA
99 CSI a = HPR
100123 CSI c = DA, device attributes
101123 0 = DA
102 23 CSI > c = DECSDA
103 23 0 = SDA
104 CSI d = VPA
105 CSI e = VPR
106123 CSI f = HVP
107123 CSI g = TBC
108123 CSI h = SM, Set mode
109123 CSI ? h = DECSM, DEC set mode
110 CSI j = HPB
111 CSI k = VPB
112123 CSI l = RM, Reset mode
113123 CSI ? l = DECRM, DEC reset mode
114123 CSI m = SGR, Set Graphic Rendition
115123 CSI n = DSR, Device Status Report
116 23 5 = operating status
117 23 6 = CPR = cursor position
118 23 CSI ? n = DECDSR; behaves as DSR but uses CSI ? instead of CSI to respond
119 23 CSI ! p = DECSTR, soft terminal reset
120 3 CSI ? $ p = DECRQM, request mode
121 CSI Sp q = DECSCUSR (odd numbers blink, even numbers solid)
122 1 or 2 = block
123 3 or 4 = underline
124 5 or 6 = I-beam to left
125 23 CSI " q = DECSCA, select character attributes
126123 CSI r = DECSTBM
127 CSI s = DECSLRM
128 CSI ' } = DECIC
129 CSI ' ~ = DECDC
130
131 OSCs
132
133 OSC 0; = Set icon name and title
134 OSC 1; = Set icon name
135 OSC 2; = Set title
136
137 Standard modes
138
139 23 SM 4 = IRM
140123 SM 20 = NLM, linefeed/newline
141
142 DEC modes
143
144123 DECSM 1 = DECCKM, cursor keys
145123 DECSM 5 = DECSCNM, screen
146123 DECSM 6 = DECOM, origin
147123 DECSM 7 = DECAWM, autowrap
148 DECSM 12 = Cursor blink
149 23 DECSM 25 = DECTCEM, text cursor enable
150 DECSM 69 = DECVSSM, vertical screen split
151 DECSM 1000 = Mouse click/release tracking
152 DECSM 1002 = Mouse click/release/drag tracking
153 DECSM 1003 = Mouse all movements tracking
154 DECSM 1005 = Mouse protocol extended (UTF-8) - not recommended
155 DECSM 1006 = Mouse protocol SGR
156 DECSM 1015 = Mouse protocol rxvt
157 DECSM 1047 = Altscreen
158 DECSM 1048 = Save cursor
159 DECSM 1049 = 1047 + 1048
160 DECSM 2004 = Bracketed paste
161
162 Graphic Renditions
163
164123 SGR 0 = Reset
165123 SGR 1 = Bold on
166 SGR 3 = Italic on
167123 SGR 4 = Underline single
168123 SGR 5 = Blink on
169123 SGR 7 = Reverse on
170 SGR 9 = Strikethrough on
171 SGR 10-19 = Select font
172 SGR 21 = Underline double
173 23 SGR 22 = Bold off
174 SGR 23 = Italic off
175 23 SGR 24 = Underline off
176 23 SGR 25 = Blink off
177 23 SGR 27 = Reverse off
178 SGR 29 = Strikethrough off
179 SGR 30-37 = Foreground ANSI
180 SGR 38 = Foreground alternative palette
181 SGR 39 = Foreground default
182 SGR 40-47 = Background ANSI
183 SGR 48 = Background alternative palette
184 SGR 49 = Background default
185 SGR 90-97 = Foreground ANSI high-intensity
186 SGR 100-107 = Background ANSI high-intensity
187
188The state storage used by ESC 7 and DECSM 1048/1049 is shared.
189
190 Unimplemented sequences:
191
192The following sequences are not recognised by libvterm.
193
194123 0x05 = ENQ
195 3 0x11 = DC1 (XON)
196 3 0x13 = DC3 (XOFF)
19712 ESC Z = DECID, identify terminal
198 DCS $ q = [DECRQSS]
199 3 " p = Request DECSCL
200 3 $ } = Request DECSASD
201 3 $ ~ = Request DECSSDT
202 23 DCS { = DECDLD, down-line-loadable character set
203 23 DCS | = DECUDK, user-defined key
204 23 CSI i = DEC printer control
205 23 CSI " p = DECSCL, set compatibility level
2061 CSI q = DECLL, load LEDs
207 3 CSI $ u = DECRQTSR, request terminal state report
208 3 1 = terminal state report
209 3 CSI & u = DECRQUPSS, request user-preferred supplemental set
210 3 CSI $ w = DECRQPSR, request presentation state report
211 3 1 = cursor information report
212 3 2 = tab stop report
2131 CSI x = DECREQTPARM, request terminal parameters
214123 CSI y = DECTST, invoke confidence test
215 3 CSI $ } = DECSASD, select active status display
216 3 CSI $ ~ = DECSSDT, select status line type
217 23 SM 2 = KAM, keyboard action
218123 SM 12 = SRM, send/receive
219123 DECSM 2 = DECANM, ANSI/VT52
220123 DECSM 3 = DECCOLM, 132 column
221123 DECSM 4 = DECSCLM, scrolling
222123 DECSM 8 = DECARM, auto-repeat
22312 DECSM 9 = DECINLM, interlace
224 23 DECSM 18 = DECPFF, print form feed
225 23 DECSM 19 = DECPEX, print extent
226 23 DECSM 42 = DECNRCM, national/multinational character