1foot-ctlseqs(7)        Miscellaneous Information Manual        foot-ctlseqs(7)
2
3
4

NAME

6       foot-ctlseqs - terminal control sequences supported by foot
7

DESCRIPTION

9       This document describes all the control sequences supported by foot.
10
11       •   Control characters
12       •   Sequences beginning with ESC
13       •   CSI - Control Sequence Introducer
14             - SGR
15             - Indexed and RGB colors (256-color palette and 24-bit colors)
16             - Private modes
17             - Window manipulation
18             - Other
19       •   OSC - Operating System Command
20       •   DCS - Device Control String
21
22

Control characters

24       ┌─────────┬──────┬─────────────────────────────────────────────────────┐
25Sequence Name Description                                         
26       ├─────────┼──────┼─────────────────────────────────────────────────────┤
27       │\a       │ BEL  │ Depends on what bell in foot.ini(5) is set to.      │
28       ├─────────┼──────┼─────────────────────────────────────────────────────┤
29       │\b       │ BS   │ Backspace; move the cursor left one step. Wrap if   │
30       │         │      │ bw is enabled.                                      │
31       ├─────────┼──────┼─────────────────────────────────────────────────────┤
32       │\t       │ HT   │ Horizontal tab; move the cursor to the next tab     │
33       │         │      │ stop.                                               │
34       ├─────────┼──────┼─────────────────────────────────────────────────────┤
35       │\n       │ LF   │ Line feed; move the cursor down one step, or scroll │
36       │         │      │ content up if at the bottom line.                   │
37       ├─────────┼──────┼─────────────────────────────────────────────────────┤
38       │\v       │ VT   │ Vertical tab; identical to LF.                      │
39       ├─────────┼──────┼─────────────────────────────────────────────────────┤
40       │\f       │ FF   │ Form feed; identical to LF.                         │
41       ├─────────┼──────┼─────────────────────────────────────────────────────┤
42       │\r       │ CR   │ Carriage ret; move the cursor to the leftmost col‐  │
43       │         │      │ umn.                                                │
44       ├─────────┼──────┼─────────────────────────────────────────────────────┤
45       │\x0E     │ SO   │ Shift out; select the G1 character set.             │
46       ├─────────┼──────┼─────────────────────────────────────────────────────┤
47       │\x0F     │ SI   │ Shift in; select the G0 character set.              │
48       └─────────┴──────┴─────────────────────────────────────────────────────┘
49

Sequences beginning with ESC

51       Note: this table excludes sequences where ESC is part of a 7-bit equiv‐
52       alent to 8-bit C1 controls.
53
54       ┌─────────┬─────────┬────────┬─────────────────────────────────────────┐
55Sequence Name    Origin Description                             
56       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
57       │\E 7     │ DECSC   │ VT100  │ Save cursor position.                   │
58       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
59       │\E 8     │ DECRC   │ VT100  │ Restore cursor position.                │
60       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
61       │\E c     │ RIS     │ VT100  │ Reset terminal to initial state.        │
62       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
63       │\E D     │ IND     │ VT100  │ Line feed; move the cursor down one     │
64       │         │         │        │ step, or scroll content up if at the    │
65       │         │         │        │ bottom margin.                          │
66       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
67       │\E E     │ NEL     │ VT100  │ Next line; move the cursor down one     │
68       │         │         │        │ step, and to the first column. Content  │
69       │         │         │        │ is scrolled up if at the bottom line.   │
70       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
71       │\E H     │ HTS     │ VT100  │ Set one horizontal tab stop at the cur‐ │
72       │         │         │        │ rent position.                          │
73       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
74       │\E M     │ RI      │ VT100  │ Reverse index; move the cursor up one   │
75       │         │         │        │ step, or scroll content down if at the  │
76       │         │         │        │ top margin.                             │
77       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
78       │\E N     │ SS2     │ VT220  │ Single shift select of G2 character set │
79       │         │         │        │ (affects next character only).          │
80       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
81       │\E O     │ SS3     │ VT220  │ Single shift select of G3 character set │
82       │         │         │        │ (affects next character only).          │
83       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
84       │\E =     │ DECKPAM │ VT100  │ Switch keypad to application mode.      │
85       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
86       │\E >     │ DECKPNM │ VT100  │ Switch keypad to numeric mode.          │
87       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
88       │\E ( C   │ SCS     │ VT100  │ Designate G0 character set. Supported   │
89       │         │         │        │ values for C are: 0 (DEC Special Char‐  │
90       │         │         │        │ acter and Line Drawing Set), and B (US‐ │
91       │         │         │        │ ASCII).                                 │
92       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
93       │\E ) C   │ SCS     │ VT100  │ Designate G1 character set. Same sup‐   │
94       │         │         │        │ ported values for C as in G0.           │
95       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
96       │\E * C   │ SCS     │ VT220  │ Designate G2 character set. Same sup‐   │
97       │         │         │        │ ported values for C as in G0.           │
98       ├─────────┼─────────┼────────┼─────────────────────────────────────────┤
99       │\E + C   │ SCS     │ VT220  │ Designate G3 character set. Same sup‐   │
100       │         │         │        │ ported values for C as in G0.           │
101       └─────────┴─────────┴────────┴─────────────────────────────────────────┘
102

CSI

104       All sequences begin with \E[, sometimes abbreviated "CSI". Spaces are
105       used in the sequence strings to make them easier to read, but are not
106       actually part of the string (i.e. \E[ 1 m is really \E[1m).
107
108   SGR
109       All SGR sequences are in the form \E[ N m, where N is a decimal number
110       - the parameter. Multiple parameters can be combined in a single CSI
111       sequence by separating them with semicolons: \E[ 1;2;3 m.
112
113       ┌──────────┬───────────────────────────────────────────────────────────┐
114Parameter Description                                               
115       ├──────────┼───────────────────────────────────────────────────────────┤
116       │0         │ Reset all attributes                                      │
117       ├──────────┼───────────────────────────────────────────────────────────┤
118       │1         │ Bold                                                      │
119       ├──────────┼───────────────────────────────────────────────────────────┤
120       │2         │ Dim                                                       │
121       ├──────────┼───────────────────────────────────────────────────────────┤
122       │3         │ Italic                                                    │
123       ├──────────┼───────────────────────────────────────────────────────────┤
124       │4         │ Underline                                                 │
125       ├──────────┼───────────────────────────────────────────────────────────┤
126       │5         │ Blink                                                     │
127       ├──────────┼───────────────────────────────────────────────────────────┤
128       │7         │ Reverse video; swap foreground and background colors      │
129       ├──────────┼───────────────────────────────────────────────────────────┤
130       │8         │ Conceal; text is not visible, but is copiable             │
131       ├──────────┼───────────────────────────────────────────────────────────┤
132       │9         │ Crossed-out/strike                                        │
133       ├──────────┼───────────────────────────────────────────────────────────┤
134       │22        │ Disable bold and dim                                      
135       ├──────────┼───────────────────────────────────────────────────────────┤
136       │23        │ Disable italic                                            │
137       ├──────────┼───────────────────────────────────────────────────────────┤
138       │24        │ Disable underline                                         │
139       ├──────────┼───────────────────────────────────────────────────────────┤
140       │25        │ Disable blink                                             │
141       ├──────────┼───────────────────────────────────────────────────────────┤
142       │27        │ Disable reverse video                                     │
143       ├──────────┼───────────────────────────────────────────────────────────┤
144       │28        │ Disable conceal                                           │
145       ├──────────┼───────────────────────────────────────────────────────────┤
146       │29        │ Disable crossed-out                                       │
147       ├──────────┼───────────────────────────────────────────────────────────┤
148       │30-37     │ Select foreground color (using regularN in foot.ini(5))   │
149       ├──────────┼───────────────────────────────────────────────────────────┤
150       │38        │ See "indexed and RGB colors" below                        │
151       ├──────────┼───────────────────────────────────────────────────────────┤
152       │39        │ Use the default foreground color (foreground in           │
153       │          │ foot.ini(5))                                              │
154       ├──────────┼───────────────────────────────────────────────────────────┤
155       │40-47     │ Select background color (using regularN in foot.ini(5))   │
156       ├──────────┼───────────────────────────────────────────────────────────┤
157       │48        │ See "indexed and RGB colors" below                        │
158       ├──────────┼───────────────────────────────────────────────────────────┤
159       │49        │ Use the default background color (background in           │
160       │          │ foot.ini(5))                                              │
161       ├──────────┼───────────────────────────────────────────────────────────┤
162       │90-97     │ Select foreground color (using brightN in foot.ini(5))    │
163       ├──────────┼───────────────────────────────────────────────────────────┤
164       │100-107   │ Select background color (using brightN in foot.ini(5))    │
165       └──────────┴───────────────────────────────────────────────────────────┘
166
167   Indexed and RGB colors (256-color palette and 24-bit colors)
168       Foot supports both the new sub-parameter based variants, and the older
169       parameter based variants for setting foreground and background colors.
170
171       Indexed colors:
172
173\E[ 38 : 5 : idx m
174\E[ 38 ; 5 ; idx m
175
176
177       RGB colors:
178
179\E[ 38 : 2 : cs : r : g : b m
180\E[ 38 : 2 : r : g : b m
181\E[ 38 ; 2 ; r ; g ; b m
182
183
184       The first variant is the "correct" one (and foot also recognizes, but
185       ignores, the optional tolerance parameters).
186
187       The second one is allowed since many programs "forget" the color space
188       ID, cs.
189
190       The sub-parameter based variants are preferred, and are what foot's
191       terminfo(5) entry uses.
192
193   Private Modes
194       There are several Boolean-like "modes" that affect certain aspects of
195       the terminal's behavior. These modes can be manipulated with the fol‐
196       lowing 4 escape sequences:
197
198       ┌───────────┬───────────┬──────────────────────────────────────────────┐
199Sequence   Name      Description                                  
200       ├───────────┼───────────┼──────────────────────────────────────────────┤
201       │\E[ ? Pm h │ DECSET    │ Enable private mode                          │
202       ├───────────┼───────────┼──────────────────────────────────────────────┤
203       │\E[ ? Pm l │ DECRST    │ Disable private mode                         │
204       ├───────────┼───────────┼──────────────────────────────────────────────┤
205       │\E[ ? Pm s │ XTSAVE    │ Save private mode                            │
206       ├───────────┼───────────┼──────────────────────────────────────────────┤
207       │\E[ ? Pm r │ XTRESTORE │ Restore private mode                         │
208       └───────────┴───────────┴──────────────────────────────────────────────┘
209
210       The Pm parameter in the above sequences denotes a numerical ID that
211       corresponds to one of the following modes:
212
213       ┌──────────┬─────────────┬─────────────────────────────────────────────┐
214Parameter Origin      Description                                 
215       ├──────────┼─────────────┼─────────────────────────────────────────────┤
216       │1         │ VT100       │ Cursor keys mode (DECCKM)                   │
217       ├──────────┼─────────────┼─────────────────────────────────────────────┤
218       │5         │ VT100       │ Reverse video (DECSCNM)                     │
219       ├──────────┼─────────────┼─────────────────────────────────────────────┤
220       │6         │ VT100       │ Origin mode (DECOM)                         │
221       ├──────────┼─────────────┼─────────────────────────────────────────────┤
222       │7         │ VT100       │ Auto-wrap mode (DECAWM)                     │
223       ├──────────┼─────────────┼─────────────────────────────────────────────┤
224       │12        │ AT&T 610    │ Cursor blink                                │
225       ├──────────┼─────────────┼─────────────────────────────────────────────┤
226       │25        │ VT220       │ Cursor visibility (DECTCEM)                 │
227       ├──────────┼─────────────┼─────────────────────────────────────────────┤
228       │45        │ xterm       │ Reverse-wraparound mode                     │
229       ├──────────┼─────────────┼─────────────────────────────────────────────┤
230       │47        │ xterm       │ Same as 1047 (see below)                    │
231       ├──────────┼─────────────┼─────────────────────────────────────────────┤
232       │66        │ VT320       │ Numeric keypad mode (DECNKM); same as DECK‐ │
233       │          │             │ PAM/DECKPNM when enabled/disabled           │
234       ├──────────┼─────────────┼─────────────────────────────────────────────┤
235       │1000      │ xterm       │ Send mouse x/y on button press/release      │
236       ├──────────┼─────────────┼─────────────────────────────────────────────┤
237       │1001      │ xterm       │ Use hilite mouse tracking                   │
238       ├──────────┼─────────────┼─────────────────────────────────────────────┤
239       │1002      │ xterm       │ Use cell motion mouse tracking              │
240       ├──────────┼─────────────┼─────────────────────────────────────────────┤
241       │1003      │ xterm       │ Use all motion mouse tracking               │
242       ├──────────┼─────────────┼─────────────────────────────────────────────┤
243       │1004      │ xterm       │ Send FocusIn/FocusOut events                │
244       ├──────────┼─────────────┼─────────────────────────────────────────────┤
245       │1006      │ xterm       │ SGR mouse mode                              │
246       ├──────────┼─────────────┼─────────────────────────────────────────────┤
247       │1007      │ xterm       │ Alternate scroll mode                       │
248       ├──────────┼─────────────┼─────────────────────────────────────────────┤
249       │1015      │ urxvt       │ urxvt mouse mode                            │
250       ├──────────┼─────────────┼─────────────────────────────────────────────┤
251       │1016      │ xterm       │ SGR-Pixels mouse mode                       │
252       ├──────────┼─────────────┼─────────────────────────────────────────────┤
253       │1034      │ xterm       │ 8-bit Meta mode                             │
254       ├──────────┼─────────────┼─────────────────────────────────────────────┤
255       │1035      │ xterm       │ Num Lock modifier (see xterm numLock op‐    │
256       │          │             │ tion)                                       │
257       ├──────────┼─────────────┼─────────────────────────────────────────────┤
258       │1036      │ xterm       │ Send ESC when Meta modifies a key (see      │
259       │          │             │ xterm metaSendsEscape option)               │
260       ├──────────┼─────────────┼─────────────────────────────────────────────┤
261       │1042      │ xterm       │ Perform action for BEL character (see bell  
262       │          │             │ in foot.ini(5))                             │
263       ├──────────┼─────────────┼─────────────────────────────────────────────┤
264       │1047      │ xterm       │ Use alternate screen buffer                 │
265       ├──────────┼─────────────┼─────────────────────────────────────────────┤
266       │1048      │ xterm       │ Save/restore cursor (DECSET=save, DE‐       │
267       │          │             │ CRST=restore)                               │
268       ├──────────┼─────────────┼─────────────────────────────────────────────┤
269       │1049      │ xterm       │ Equivalent to 1048 and 1047 combined        │
270       ├──────────┼─────────────┼─────────────────────────────────────────────┤
271       │1070      │ xterm       │ Use private color registers for each sixel  │
272       ├──────────┼─────────────┼─────────────────────────────────────────────┤
273       │2004      │ xterm       │ Wrap pasted text with start/end delimiters  │
274       │          │             │ (bracketed paste mode)                      │
275       ├──────────┼─────────────┼─────────────────────────────────────────────┤
276       │2026      │ terminal-wg │ Application synchronized updates mode       │
277       ├──────────┼─────────────┼─────────────────────────────────────────────┤
278       │2027      │ contour     │ Grapheme cluster processing                 │
279       ├──────────┼─────────────┼─────────────────────────────────────────────┤
280       │8452      │ xterm       │ Position cursor to the right of sixels, in‐ │
281       │          │             │ stead of on the next line                   │
282       ├──────────┼─────────────┼─────────────────────────────────────────────┤
283       │737769    │ foot        │ Input Method Editor (IME) mode              │
284       └──────────┴─────────────┴─────────────────────────────────────────────┘
285
286   Window manipulation
287       Foot implements a sub-set of XTerm's (originally dtterm's) window ma‐
288       nipulation sequences. The generic format is:
289
290       \E[ Ps ; Ps ; Ps t
291
292       ┌────────────┬─────────────┬───────────────────────────────────────────┐
293Parameter 1 Parameter 2 Description                               
294       ├────────────┼─────────────┼───────────────────────────────────────────┤
295       │11          │ -           │ Report if window is iconified. Foot al‐   │
296       │            │             │ ways reports 1 - not iconified.           │
297       ├────────────┼─────────────┼───────────────────────────────────────────┤
298       │13          │ -           │ Report window position. Foot always re‐   │
299       │            │             │ ports (0,0), due to Wayland limitations.  │
300       ├────────────┼─────────────┼───────────────────────────────────────────┤
301       │13          │ 2           │ Report text area position. Foot always    │
302       │            │             │ reports (0,0) due to Wayland limitations. │
303       ├────────────┼─────────────┼───────────────────────────────────────────┤
304       │14          │ -           │ Report text area size, in pixels. Foot    │
305       │            │             │ reports the grid size, excluding the mar‐ │
306       │            │             │ gins.                                     │
307       ├────────────┼─────────────┼───────────────────────────────────────────┤
308       │14          │ 2           │ Report window size, in pixels. Foot re‐   │
309       │            │             │ ports the grid size plus the margins.     │
310       ├────────────┼─────────────┼───────────────────────────────────────────┤
311       │15          │ -           │ Report the screen size, in pixels.        │
312       ├────────────┼─────────────┼───────────────────────────────────────────┤
313       │16          │ -           │ Report the cell size, in pixels.          │
314       ├────────────┼─────────────┼───────────────────────────────────────────┤
315       │18          │ -           │ Report text area size, in characters.     │
316       ├────────────┼─────────────┼───────────────────────────────────────────┤
317       │19          │ -           │ Report screen size, in characters.        │
318       ├────────────┼─────────────┼───────────────────────────────────────────┤
319       │22          │ -           │ Push window title+icon. Foot does not     │
320       │            │             │ support pushing the icon.                 │
321       ├────────────┼─────────────┼───────────────────────────────────────────┤
322       │22          │ 2           │ Push window title.                        │
323       ├────────────┼─────────────┼───────────────────────────────────────────┤
324       │23          │ -           │ Pop window title+icon. Foot does not sup‐ │
325       │            │             │ port popping the icon.                    │
326       ├────────────┼─────────────┼───────────────────────────────────────────┤
327       │23          │ 2           │ Pop window title.                         │
328       └────────────┴─────────────┴───────────────────────────────────────────┘
329
330   Other
331       ┌────────────────┬──────────────┬────────────┬─────────────────────────┐
332Parameter       Name         Origin     Description             
333       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
334       │\E[ Ps c        │ DA           │ VT100      │ Send primary device at‐ │
335       │                │              │            │ tributes. Foot responds │
336       │                │              │            │ with "I'm a VT220 with  │
337       │                │              │            │ sixel and ANSI color    │
338       │                │              │            │ support".               │
339       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
340       │\E[ Ps A        │ CUU          │ VT100      │ Cursor up - move cursor │
341       │                │              │            │ up Ps times.            │
342       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
343       │\E[ Ps B        │ CUD          │ VT100      │ Cursor down - move cur‐ │
344       │                │              │            │ sor down Ps times.      │
345       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
346       │\E[ Ps C        │ CUF          │ VT100      │ Cursor forward - move   │
347       │                │              │            │ cursor to the right Ps
348       │                │              │            │ times.                  │
349       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
350       │\E[ Ps D        │ CUB          │ VT100      │ Cursor backward - move  │
351       │                │              │            │ cursor to the left Ps
352       │                │              │            │ times.                  │
353       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
354       │\E[ Ps g        │ TBC          │ VT100      │ Tab clear. Ps=0 ->      │
355       │                │              │            │ clear current column.   │
356       │                │              │            │ Ps=3 -> clear all.      │
357       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
358       │\E[ Ps ; Ps f   │ HVP          │ VT100      │ Horizontal and vertical │
359       │                │              │            │ position - move cursor  │
360       │                │              │            │ to row ; column.        │
361       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
362       │\E[ Ps ; Ps H   │ CUP          │ VT100      │ Cursor position - move  │
363       │                │              │            │ cursor to row ; column. │
364       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
365       │\E[ Ps J        │ ED           │ VT100      │ Erase in display. Ps=0  │
366       │                │              │            │ -> below cursor. Ps=1   │
367       │                │              │            │ -> above                │
368       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
369       │\E[ Ps K        │ EL           │ VT100      │ Erase in line. Ps=0 ->  │
370       │                │              │            │ right of cursor. Ps=1   │
371       │                │              │            │ -> left of cursor. Ps=2 │
372       │                │              │            │ -> all.                 │
373       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
374       │\E[ Pm h        │ SM           │ VT100      │ Set mode. Pm=4 -> en‐   │
375       │                │              │            │ able IRM (insert mode). │
376       │                │              │            │ All other values of Pm
377       │                │              │            │ are unsupported.        │
378       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
379       │\E[ Pm l        │ RM           │ VT100      │ Reset mode. Pm=4 ->     │
380       │                │              │            │ disable IRM (insert     │
381       │                │              │            │ mode). All other values │
382       │                │              │            │ of Pm are unsupported.  │
383       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
384       │\E[ Ps n        │ DSR          │ VT100      │ Device status report.   │
385       │                │              │            │ Ps=5 -> device status.  │
386       │                │              │            │ Ps=6 -> cursor posi‐    │
387       │                │              │            │ tion.                   │
388       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
389       │\E[ Ps L        │ IL           │ VT220      │ Insert Ps lines.        │
390       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
391       │\E[ Ps M        │ DL           │ VT220      │ Delete Ps lines.        │
392       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
393       │\E[ Ps P        │ DCH          │ VT220      │ Delete Ps characters.   │
394       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
395       │\E[ Ps @        │ ICH          │ VT220      │ Insert Ps blank charac‐ │
396       │                │              │            │ ters.                   │
397       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
398       │\E[ Ps X        │ ECH          │ VT220      │ Erase Ps characters.    │
399       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
400       │\E[ > c         │ DA2          │ VT220      │ Send secondary device   │
401       │                │              │            │ attributes. Foot re‐    │
402       │                │              │            │ sponds with "I'm a      │
403       │                │              │            │ VT220 and here's my     │
404       │                │              │            │ version number".        │
405       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
406       │\E[ ! p         │ DECSTR       │ VT220      │ Soft terminal reset.    │
407       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
408       │\E[ ? Ps $ p    │ DECRQM       │ VT320      │ Request DEC private     │
409       │                │              │            │ mode.                   │
410       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
411       │\E[ Ps T        │ SD           │ VT420      │ Scroll down Ps lines.   │
412       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
413       │\E[ s           │ SCOSC        │ SCO, VT510 │ Save cursor position.   │
414       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
415       │\E[ u           │ SCORC        │ SCO, VT510 │ Restore cursor posi‐    │
416       │                │              │            │ tion.                   │
417       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
418       │\E[ Ps SP q     │ DECSCUSR     │ VT510      │ Set cursor style. In    │
419       │                │              │            │ foot, Ps=0 means "use   │
420       │                │              │            │ style from foot.ini".   │
421       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
422       │\E[ = Ps c      │ DA3          │ VT510      │ Send tertiary device    │
423       │                │              │            │ attributes. Foot re‐    │
424       │                │              │            │ sponds with "FOOT", in  │
425       │                │              │            │ hexadecimal.            │
426       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
427       │\E[ Pm d        │ VPA          │ ECMA-48    │ Line position absolute  │
428       │                │              │            │ - move cursor to line   │
429       │                │              │            │ Pm.                     │
430       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
431       │\E[ Pm e        │ VPR          │ ECMA-48    │ Line position relative  │
432       │                │              │            │ - move cursor down Pm
433       │                │              │            │ lines.                  │
434       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
435       │\E[ Pm a        │ HPR          │ ECMA-48    │ Character position rel‐ │
436       │                │              │            │ ative - move cursor to  │
437       │                │              │            │ the right Pm times.     │
438       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
439       │\E[ Ps E        │ CNL          │ ECMA-48    │ Cursor next line - move │
440       │                │              │            │ the cursor down Ps
441       │                │              │            │ times.                  │
442       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
443       │\E[ Ps F        │ CPL          │ ECMA-48    │ Cursor preceding line   │
444       │                │              │            │ - move the cursor up Ps
445       │                │              │            │ times.                  │
446       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
447       │\E[ Pm `        │ HPA          │ ECMA-48    │ Character position ab‐  │
448       │                │              │            │ solute - move cursor to │
449       │                │              │            │ column Pm.              │
450       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
451       │\E[ Ps G        │ CHA          │ ECMA-48    │ Cursor character abso‐  │
452       │                │              │            │ lute - move cursor to   │
453       │                │              │            │ column Ps. cursor. Ps=2 │
454       │                │              │            │ -> all. Ps=3 -> saved   │
455       │                │              │            │ lines.                  │
456       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
457       │\E[ Ps S        │ SU           │ ECMA-48    │ Scroll up Ps lines.     │
458       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
459       │\E[ Ps I        │ CHT          │ ECMA-48    │ Cursor forward tabula‐  │
460       │                │              │            │ tion Ps tab stops.      │
461       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
462       │\E[ Ps Z        │ CBT          │ ECMA-48    │ Cursor backward tabula‐ │
463       │                │              │            │ tion Ps tab stops.      │
464       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
465       │\E[ Ps b        │ REP          │ ECMA-48    │ Repeat the preceding    │
466       │                │              │            │ printable character Ps
467       │                │              │            │ times.                  │
468       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
469       │\E[ ? Pi ; Pa ; │ XTSMGRAPHICS │ xterm      │ Set or request sixel    │
470Pv S            │              │            │ attributes.             │
471       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
472       │\E[ > Ps q      │ XTVERSION    │ xterm      │ Ps=0 -> report terminal │
473       │                │              │            │ name and version, in    │
474       │                │              │            │ the form \EP>|foot(ver‐ 
475       │                │              │            │ sion)\E\.               │
476       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
477       │\E[ > 4 ; Pv m  │ XTMODKEYS    │ xterm      │ Set level of the modi‐
478       │                │              │            │ fyOtherKeys property to │
479       │                │              │            │ Pv. Note that foot only │
480       │                │              │            │ supports level 1 and 2, │
481       │                │              │            │ where level 1 is the    │
482       │                │              │            │ default setting.        │
483       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
484       │\E[ ? Pp m      │ XTQMODKEYS   │ xterm      │ Query key modifier op‐  │
485       │                │              │            │ tions                   │
486       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
487       │\E[ > 4 n       │ <unnamed>    │ xterm      │ Resets the modi‐
488       │                │              │            │ fyOtherKeys property to │
489       │                │              │            │ level 1. Note that in   │
490       │                │              │            │ foot, this sequence     │
491       │                │              │            │ does not completely     │
492       │                │              │            │ disable modi‐
493       │                │              │            │ fyOtherKeys, since foot │
494       │                │              │            │ only supports level 1   │
495       │                │              │            │ and level 2 (and not    │
496       │                │              │            │ level 0).               │
497       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
498       │\E[ ? u         │ <unnamed>    │ kitty      │ Query current values of │
499       │                │              │            │ the Kitty keyboard      │
500       │                │              │            │ flags.                  │
501       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
502       │\E[ > flags u   │ <unnamed>    │ kitty      │ Push a new entry,       │
503       │                │              │            │ flags, to the Kitty     │
504       │                │              │            │ keyboard stack.         │
505       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
506       │\E[ < number u  │ <unnamed>    │ kitty      │ Pop number of entries   │
507       │                │              │            │ from the Kitty keyboard │
508       │                │              │            │ stack.                  │
509       ├────────────────┼──────────────┼────────────┼─────────────────────────┤
510       │\E[ = flags ;   │ <unnamed>    │ kitty      │ Update current Kitty    │
511mode u          │              │            │ keyboard flags, accord‐ │
512       │                │              │            │ ing to mode.            │
513       └────────────────┴──────────────┴────────────┴─────────────────────────┘
514

OSC

516       All OSC sequences begin with \E], sometimes abbreviated OSC.
517
518       ┌────────────────────┬────────────┬────────────────────────────────────┐
519Sequence            Origin     Description                        
520       ├────────────────────┼────────────┼────────────────────────────────────┤
521       │\E] 0 ; Pt \E\      │ xterm      │ Set window icon and title to Pt
522       │                    │            │ (foot does not support setting the │
523       │                    │            │ icon)                              │
524       ├────────────────────┼────────────┼────────────────────────────────────┤
525       │\E] 2 ; Pt \E\      │ xterm      │ Set window title to Pt
526       ├────────────────────┼────────────┼────────────────────────────────────┤
527       │\E] 4 ; c ; spec    │ xterm      │ Change color number c to spec,     │
528       │\E\                 │            │ where spec is a color in XParseC‐  │
529       │                    │            │ olor format. foot only supports    │
530       │                    │            │ RGB colors; either                 │
531       │                    │            │ rgb:<red>/<green>/<blue>, or the   │
532       │                    │            │ legacy format (#rgb).              │
533       ├────────────────────┼────────────┼────────────────────────────────────┤
534       │\E] 7 ; Uri \E\     │ iTerm2     │ Update the terminal's current      │
535       │                    │            │ working directory. Newly spawned   │
536       │                    │            │ terminals will launch in this di‐  │
537       │                    │            │ rectory. Uri must be in the format │
538       │                    │            │ file://<hostname>/<path>. hostname 
539       │                    │            │ must refer to your local host.     │
540       ├────────────────────┼────────────┼────────────────────────────────────┤
541       │\E] 8 ; id=ID ; Uri │ VTE+iTerm2 │ Hyperlink (a.k.a HTML-like an‐     │
542       │\E\                 │            │ chors). id=ID is optional; if as‐  │
543       │                    │            │ signed, all URIs with the same ID
544       │                    │            │ will be treated as a single hyper‐ │
545       │                    │            │ link. An empty URI closes the hy‐  │
546       │                    │            │ perlink.                           │
547       ├────────────────────┼────────────┼────────────────────────────────────┤
548       │\E] 9 ; msg \E\     │ iTerm2     │ Desktop notification, uses notify  
549       │                    │            │ in foot.ini(5).                    │
550       ├────────────────────┼────────────┼────────────────────────────────────┤
551       │\E] 10 ; spec \E\   │ xterm      │ Change the default foreground      │
552       │                    │            │ color to spec, a color in XParseC‐ │
553       │                    │            │ olor format.                       │
554       ├────────────────────┼────────────┼────────────────────────────────────┤
555       │\E] 11 ; spec \E\   │ xterm      │ Change the default background      │
556       │                    │            │ color to spec, a color in XParseC‐ │
557       │                    │            │ olor format. Foot implements       │
558       │                    │            │ URxvt's transparency extension;    │
559       │                    │            │ e.g. spec=[75]#ff00ff or           │
560       │                    │            │ spec=rgba:ff/00/ff/bf (pink with   │
561       │                    │            │ 75% alpha).                        │
562       ├────────────────────┼────────────┼────────────────────────────────────┤
563       │\E] 12 ; spec \E\   │ xterm      │ Change cursor color to spec, a     │
564       │                    │            │ color in XParseColor format.       │
565       ├────────────────────┼────────────┼────────────────────────────────────┤
566       │\E] 17 ; spec \E\   │ xterm      │ Change selection background color  │
567       │                    │            │ to spec, a color in XParseColor    │
568       │                    │            │ format.                            │
569       ├────────────────────┼────────────┼────────────────────────────────────┤
570       │\E] 19 ; spec \E\   │ xterm      │ Change selection foreground color  │
571       │                    │            │ to spec, a color in XParseColor    │
572       │                    │            │ format.                            │
573       ├────────────────────┼────────────┼────────────────────────────────────┤
574       │\E] 22 ; xcursor-   │ xterm      │ Sets the xcursor pointer. An empty │
575pointer-name \E\    │            │ name, or an invalid name resets    │
576       │                    │            │ it.                                │
577       ├────────────────────┼────────────┼────────────────────────────────────┤
578       │\E] 52 ; Pc ; ? \E\ │ xterm      │ Send clipboard data. Pc can be ei‐ │
579       │                    │            │ ther c, s or p. c uses the clip‐   │
580       │                    │            │ board as source, and s and p uses  │
581       │                    │            │ the primary selection. The re‐     │
582       │                    │            │ sponse is \E] 52 ; Pc ;            
583       │                    │            │ <base64-encoded data> E\, where Pc
584       │                    │            │ denotes the source used.           │
585       ├────────────────────┼────────────┼────────────────────────────────────┤
586       │\E] 52 ; Pc ; Pd    │ xterm      │ Copy Pd (base64 encoded text) to   │
587       │\E\                 │            │ the clipboard. Pc denotes the tar‐ │
588       │                    │            │ get: c targets the clipboard and s 
589       │                    │            │ and p the primary selection.       │
590       ├────────────────────┼────────────┼────────────────────────────────────┤
591       │\E] 104 ; c \E\     │ xterm      │ Reset color number c (multiple     │
592       │                    │            │ semicolon separated c values may   │
593       │                    │            │ be provided), or all colors (ex‐   │
594       │                    │            │ cluding the default fore‐          │
595       │                    │            │ ground/background colors) if c is  │
596       │                    │            │ omitted.                           │
597       ├────────────────────┼────────────┼────────────────────────────────────┤
598       │\E] 110 \E\         │ xterm      │ Reset default foreground color     │
599       ├────────────────────┼────────────┼────────────────────────────────────┤
600       │\E] 111 \E\         │ xterm      │ Reset default background color     │
601       ├────────────────────┼────────────┼────────────────────────────────────┤
602       │\E] 112 \E\         │ xterm      │ Reset cursor color                 │
603       ├────────────────────┼────────────┼────────────────────────────────────┤
604       │\E] 117 \E\         │ xterm      │ Reset selection background color   │
605       ├────────────────────┼────────────┼────────────────────────────────────┤
606       │\E] 119 \E\         │ xterm      │ Reset selection foreground color   │
607       ├────────────────────┼────────────┼────────────────────────────────────┤
608       │\E] 133 ; A \E\     │ FinalTerm  │ Mark start of shell prompt         │
609       ├────────────────────┼────────────┼────────────────────────────────────┤
610       │\E] 555 \E\         │ foot       │ Flash the entire terminal (foot    │
611       │                    │            │ extension)                         │
612       ├────────────────────┼────────────┼────────────────────────────────────┤
613       │\E] 777;notify;ti‐  │ urxvt      │ Desktop notification, uses notify  
614tle;msg \E\         │            │ in foot.ini(5).                    │
615       └────────────────────┴────────────┴────────────────────────────────────┘
616

DCS

618       All DCS sequences begin with \EP (sometimes abbreviated DCS), and are
619       terminated by \E\ (ST).
620
621       ┌───────────────────────────┬──────────────────────────────────────────┐
622Sequence                   Description                              
623       ├───────────────────────────┼──────────────────────────────────────────┤
624       │\EP q <sixel data> \E\     │ Emit a sixel image at the current cursor │
625       │                           │ position                                 │
626       ├───────────────────────────┼──────────────────────────────────────────┤
627       │\P $ q <query> \E\         │ Request selection or setting (DECRQSS).  │
628       │                           │ Implemented queries: DECSTBM, SGR and    │
629       │                           │ DECSCUSR.                                │
630       ├───────────────────────────┼──────────────────────────────────────────┤
631       │\EP = C s \E\              │ Begin (C=1) or end (C=2) application     │
632       │                           │ synchronized updates. This sequence is   │
633       │                           │ supported for compatibility reasons, but │
634       │                           │ it's recommended to use private mode     │
635       │                           │ 2026 (see above) instead.                │
636       ├───────────────────────────┼──────────────────────────────────────────┤
637       │\EP + q <hex encoded capa‐ │ Query builtin terminfo database          │
638       │bility name> \E\           │ (XTGETTCAP)                              │
639       └───────────────────────────┴──────────────────────────────────────────┘
640

FOOTNOTE

642       Foot does not support 8-bit control characters ("C1").
643
644
645
646                                  2023-10-14                   foot-ctlseqs(7)
Impressum