blob: aa15fec3dfca104cf5c72898dd176e3f0dfc746c [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
Bram Moolenaar2d2970e2020-05-17 16:29:47 +0200100 CSI b = REP
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200101123 CSI c = DA, device attributes
102123 0 = DA
103 23 CSI > c = DECSDA
104 23 0 = SDA
105 CSI d = VPA
106 CSI e = VPR
107123 CSI f = HVP
108123 CSI g = TBC
109123 CSI h = SM, Set mode
110123 CSI ? h = DECSM, DEC set mode
111 CSI j = HPB
112 CSI k = VPB
113123 CSI l = RM, Reset mode
114123 CSI ? l = DECRM, DEC reset mode
115123 CSI m = SGR, Set Graphic Rendition
116123 CSI n = DSR, Device Status Report
117 23 5 = operating status
118 23 6 = CPR = cursor position
119 23 CSI ? n = DECDSR; behaves as DSR but uses CSI ? instead of CSI to respond
120 23 CSI ! p = DECSTR, soft terminal reset
121 3 CSI ? $ p = DECRQM, request mode
122 CSI Sp q = DECSCUSR (odd numbers blink, even numbers solid)
123 1 or 2 = block
124 3 or 4 = underline
125 5 or 6 = I-beam to left
126 23 CSI " q = DECSCA, select character attributes
127123 CSI r = DECSTBM
128 CSI s = DECSLRM
129 CSI ' } = DECIC
130 CSI ' ~ = DECDC
131
132 OSCs
133
134 OSC 0; = Set icon name and title
135 OSC 1; = Set icon name
136 OSC 2; = Set title
137
138 Standard modes
139
140 23 SM 4 = IRM
141123 SM 20 = NLM, linefeed/newline
142
143 DEC modes
144
145123 DECSM 1 = DECCKM, cursor keys
146123 DECSM 5 = DECSCNM, screen
147123 DECSM 6 = DECOM, origin
148123 DECSM 7 = DECAWM, autowrap
149 DECSM 12 = Cursor blink
150 23 DECSM 25 = DECTCEM, text cursor enable
151 DECSM 69 = DECVSSM, vertical screen split
152 DECSM 1000 = Mouse click/release tracking
153 DECSM 1002 = Mouse click/release/drag tracking
154 DECSM 1003 = Mouse all movements tracking
Bram Moolenaarb5b49a32018-03-25 16:20:37 +0200155 DECSM 1004 = Focus in/out reporting
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200156 DECSM 1005 = Mouse protocol extended (UTF-8) - not recommended
157 DECSM 1006 = Mouse protocol SGR
158 DECSM 1015 = Mouse protocol rxvt
159 DECSM 1047 = Altscreen
160 DECSM 1048 = Save cursor
161 DECSM 1049 = 1047 + 1048
162 DECSM 2004 = Bracketed paste
163
164 Graphic Renditions
165
166123 SGR 0 = Reset
167123 SGR 1 = Bold on
168 SGR 3 = Italic on
169123 SGR 4 = Underline single
Bram Moolenaar6fc3b592020-05-17 22:27:55 +0200170 SGR 4:x = Underline style
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200171123 SGR 5 = Blink on
172123 SGR 7 = Reverse on
Bram Moolenaard8637282020-05-20 18:41:41 +0200173 SGR 8 = Conceal on
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200174 SGR 9 = Strikethrough on
175 SGR 10-19 = Select font
176 SGR 21 = Underline double
177 23 SGR 22 = Bold off
178 SGR 23 = Italic off
179 23 SGR 24 = Underline off
180 23 SGR 25 = Blink off
181 23 SGR 27 = Reverse off
Bram Moolenaard8637282020-05-20 18:41:41 +0200182 SGR 28 = Conceal off
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200183 SGR 29 = Strikethrough off
184 SGR 30-37 = Foreground ANSI
185 SGR 38 = Foreground alternative palette
186 SGR 39 = Foreground default
187 SGR 40-47 = Background ANSI
188 SGR 48 = Background alternative palette
189 SGR 49 = Background default
190 SGR 90-97 = Foreground ANSI high-intensity
191 SGR 100-107 = Background ANSI high-intensity
192
193The state storage used by ESC 7 and DECSM 1048/1049 is shared.
194
195 Unimplemented sequences:
196
197The following sequences are not recognised by libvterm.
198
199123 0x05 = ENQ
200 3 0x11 = DC1 (XON)
201 3 0x13 = DC3 (XOFF)
20212 ESC Z = DECID, identify terminal
203 DCS $ q = [DECRQSS]
204 3 " p = Request DECSCL
205 3 $ } = Request DECSASD
206 3 $ ~ = Request DECSSDT
207 23 DCS { = DECDLD, down-line-loadable character set
208 23 DCS | = DECUDK, user-defined key
209 23 CSI i = DEC printer control
210 23 CSI " p = DECSCL, set compatibility level
2111 CSI q = DECLL, load LEDs
212 3 CSI $ u = DECRQTSR, request terminal state report
213 3 1 = terminal state report
214 3 CSI & u = DECRQUPSS, request user-preferred supplemental set
215 3 CSI $ w = DECRQPSR, request presentation state report
216 3 1 = cursor information report
217 3 2 = tab stop report
2181 CSI x = DECREQTPARM, request terminal parameters
219123 CSI y = DECTST, invoke confidence test
220 3 CSI $ } = DECSASD, select active status display
221 3 CSI $ ~ = DECSSDT, select status line type
222 23 SM 2 = KAM, keyboard action
223123 SM 12 = SRM, send/receive
224123 DECSM 2 = DECANM, ANSI/VT52
225123 DECSM 3 = DECCOLM, 132 column
226123 DECSM 4 = DECSCLM, scrolling
227123 DECSM 8 = DECARM, auto-repeat
22812 DECSM 9 = DECINLM, interlace
229 23 DECSM 18 = DECPFF, print form feed
230 23 DECSM 19 = DECPEX, print extent
231 23 DECSM 42 = DECNRCM, national/multinational character