]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) 1996 Andries Brouwer <aeb@cwi.nl>, Mon Oct 31 22:13:04 1996 |
2 | .\" | |
89e3ffe9 | 3 | .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA) |
fea681da MK |
4 | .\" This is free documentation; you can redistribute it and/or |
5 | .\" modify it under the terms of the GNU General Public License as | |
6 | .\" published by the Free Software Foundation; either version 2 of | |
7 | .\" the License, or (at your option) any later version. | |
8f8359d8 | 8 | .\" %%%LICENSE_END |
fea681da MK |
9 | .\" |
10 | .\" This is combined from many sources. | |
11 | .\" For Linux, the definitive source is of course console.c. | |
12 | .\" About vt100-like escape sequences in general there are | |
13 | .\" the ISO 6429 and ISO 2022 norms, the descriptions of | |
14 | .\" an actual vt100, and the xterm docs (ctlseqs.ms). | |
15 | .\" Substantial portions of this text are derived from a write-up | |
16 | .\" by Eric S. Raymond <esr@thyrsus.com>. | |
17 | .\" | |
18 | .\" Tiny correction, aeb, 961107. | |
19 | .\" | |
2866cb53 MK |
20 | .\" 2006-05-27, Several corrections - Thomas E. Dickey |
21 | .\" | |
1d767b55 | 22 | .TH CONSOLE_CODES 4 2021-03-22 "Linux" "Linux Programmer's Manual" |
fea681da MK |
23 | .SH NAME |
24 | console_codes \- Linux console escape and control sequences | |
25 | .SH DESCRIPTION | |
26 | The Linux console implements a large subset of the VT102 and ECMA-48/ISO | |
27 | 6429/ANSI X3.64 terminal controls, plus certain private-mode sequences | |
28b3cbc5 | 28 | for changing the color palette, character-set mapping, and so on. |
fea681da MK |
29 | In the tabular descriptions below, the second column gives ECMA-48 or DEC |
30 | mnemonics (the latter if prefixed with DEC) for the given function. | |
31 | Sequences without a mnemonic are neither ECMA-48 nor VT102. | |
dd3568a1 | 32 | .PP |
fea681da MK |
33 | After all the normal output processing has been done, and a |
34 | stream of characters arrives at the console driver for actual | |
35 | printing, the first thing that happens is a translation from | |
36 | the code used for processing to the code used for printing. | |
dd3568a1 | 37 | .PP |
fea681da | 38 | If the console is in UTF-8 mode, then the incoming bytes are |
c13182ef | 39 | first assembled into 16-bit Unicode codes. |
2b9b829d | 40 | Otherwise, each byte is transformed according to the current mapping table |
2866cb53 | 41 | (which translates it to a Unicode value). |
511bfbc9 | 42 | See the \fBCharacter Sets\fP section below for discussion. |
dd3568a1 | 43 | .PP |
fea681da MK |
44 | In the normal case, the Unicode value is converted to a font index, |
45 | and this is stored in video memory, so that the corresponding glyph | |
46 | (as found in video ROM) appears on the screen. | |
47 | Note that the use of Unicode (and the design of the PC hardware) | |
48 | allows us to use 512 different glyphs simultaneously. | |
dd3568a1 | 49 | .PP |
fea681da MK |
50 | If the current Unicode value is a control character, or we are |
51 | currently processing an escape sequence, the value will treated | |
c13182ef MK |
52 | specially. |
53 | Instead of being turned into a font index and rendered as | |
fea681da | 54 | a glyph, it may trigger cursor movement or other control functions. |
511bfbc9 | 55 | See the \fBLinux Console Controls\fP section below for discussion. |
dd3568a1 | 56 | .PP |
fea681da | 57 | It is generally not good practice to hard-wire terminal controls into |
c13182ef MK |
58 | programs. |
59 | Linux supports a | |
fea681da | 60 | .BR terminfo (5) |
c13182ef | 61 | database of terminal capabilities. |
fea681da MK |
62 | Rather than emitting console escape sequences by hand, you will almost |
63 | always want to use a terminfo-aware screen library or utility such as | |
64 | .BR ncurses (3), | |
c13182ef | 65 | .BR tput (1), |
fea681da MK |
66 | or |
67 | .BR reset (1). | |
73d8cece | 68 | .SS Linux console controls |
fea681da | 69 | This section describes all the control characters and escape sequences |
75b94dc3 | 70 | that invoke special functions (i.e., anything other than writing a |
c13182ef | 71 | glyph at the current cursor location) on the Linux console. |
1a947a96 MK |
72 | .PP |
73 | .B "Control characters" | |
bdd915e2 | 74 | .PP |
fea681da MK |
75 | A character is a control character if (before transformation |
76 | according to the mapping table) it has one of the 14 codes | |
77 | 00 (NUL), 07 (BEL), 08 (BS), 09 (HT), 0a (LF), 0b (VT), | |
78 | 0c (FF), 0d (CR), 0e (SO), 0f (SI), 18 (CAN), 1a (SUB), | |
79 | 1b (ESC), 7f (DEL). | |
84c517a4 | 80 | One can set a "display control characters" mode (see below), |
fea681da | 81 | and allow 07, 09, 0b, 18, 1a, 7f to be displayed as glyphs. |
9bc87ed0 | 82 | On the other hand, in UTF-8 mode all codes 00\(en1f are regarded |
84c517a4 | 83 | as control characters, regardless of any "display control characters" |
fea681da | 84 | mode. |
2866cb53 | 85 | .PP |
fea681da MK |
86 | If we have a control character, it is acted upon immediately |
87 | and then discarded (even in the middle of an escape sequence) | |
88 | and the escape sequence continues with the next character. | |
89 | (However, ESC starts a new escape sequence, possibly aborting a previous | |
90 | unfinished one, and CAN and SUB abort any escape sequence.) | |
91 | The recognized control characters are BEL, BS, HT, LF, VT, FF, | |
c13182ef MK |
92 | CR, SO, SI, CAN, SUB, ESC, DEL, CSI. |
93 | They do what one would expect: | |
fea681da | 94 | .HP |
9ca13180 | 95 | BEL (0x07, \fB\(haG\fP) beeps; |
fea681da | 96 | .HP |
9ca13180 | 97 | BS (0x08, \fB\(haH\fP) backspaces one column |
fea681da MK |
98 | (but not past the beginning of the line); |
99 | .HP | |
9ca13180 | 100 | HT (0x09, \fB\(haI\fP) goes to the next tab stop or to the end of the line |
fea681da MK |
101 | if there is no earlier tab stop; |
102 | .HP | |
735334d4 | 103 | LF (0x0A, \fB\(haJ\fP), VT (0x0B, \fB\(haK\fP), and |
9ca13180 | 104 | FF (0x0C, \fB\(haL\fP) all give a linefeed, |
d4aa1c16 | 105 | and if LF/NL (new-line mode) is set also a carriage return; |
fea681da | 106 | .HP |
9ca13180 | 107 | CR (0x0D, \fB\(haM\fP) gives a carriage return; |
fea681da | 108 | .HP |
9ca13180 | 109 | SO (0x0E, \fB\(haN\fP) activates the G1 character set; |
fea681da | 110 | .HP |
9ca13180 | 111 | SI (0x0F, \fB\(haO\fP) activates the G0 character set; |
fea681da | 112 | .HP |
9ca13180 | 113 | CAN (0x18, \fB\(haX\fP) and SUB (0x1A, \fB\(haZ\fP) abort escape sequences; |
fea681da | 114 | .HP |
9ca13180 | 115 | ESC (0x1B, \fB\(ha[\fP) starts an escape sequence; |
fea681da MK |
116 | .HP |
117 | DEL (0x7F) is ignored; | |
118 | .HP | |
119 | CSI (0x9B) is equivalent to ESC [. | |
1a947a96 MK |
120 | .PP |
121 | .B "ESC- but not CSI-sequences" | |
0b174fe0 | 122 | .ad l |
fea681da | 123 | .TS |
0b174fe0 | 124 | l l lx. |
fea681da MK |
125 | ESC c RIS Reset. |
126 | ESC D IND Linefeed. | |
127 | ESC E NEL Newline. | |
128 | ESC H HTS Set tab stop at current column. | |
129 | ESC M RI Reverse linefeed. | |
2866cb53 MK |
130 | ESC Z DECID T{ |
131 | DEC private identification. The kernel | |
132 | returns the string ESC [ ? 6 c, claiming | |
133 | that it is a VT102. | |
134 | T} | |
135 | ESC 7 DECSC T{ | |
136 | Save current state (cursor coordinates, | |
137 | attributes, character sets pointed at by G0, G1). | |
138 | T} | |
0b174fe0 MK |
139 | ESC 8 DECRC T{ |
140 | Restore state most recently saved by ESC 7. | |
141 | T} | |
fea681da MK |
142 | ESC [ CSI Control sequence introducer |
143 | ESC % Start sequence selecting character set | |
144 | ESC % @ \0\0\0Select default (ISO 646 / ISO 8859-1) | |
145 | ESC % G \0\0\0Select UTF-8 | |
146 | ESC % 8 \0\0\0Select UTF-8 (obsolete) | |
0b174fe0 MK |
147 | ESC # 8 DECALN T{ |
148 | DEC screen alignment test \- fill screen with E's | |
149 | T} | |
150 | ESC ( T{ | |
151 | Start sequence defining G0 character set | |
152 | (followed by one of B, 0, U, K, as below) | |
153 | T} | |
154 | ESC ( B T{ | |
155 | Select default (ISO 8859-1 mapping) | |
156 | T} | |
157 | ESC ( 0 T{ | |
158 | Select VT100 graphics mapping | |
159 | T} | |
160 | ESC ( U T{ | |
161 | Select null mapping \- straight to character ROM | |
162 | T} | |
163 | ESC ( K T{ | |
164 | Select user mapping \- the map that is loaded by the utility \fBmapscrn\fP(8) | |
165 | T} | |
166 | ESC ) T{ | |
167 | Start sequence defining G1 (followed by one of B, 0, U, K, as above). | |
168 | T} | |
fea681da MK |
169 | ESC > DECPNM Set numeric keypad mode |
170 | ESC = DECPAM Set application keypad mode | |
2866cb53 MK |
171 | ESC ] OSC T{ |
172 | (Should be: Operating system command) | |
173 | ESC ] P \fInrrggbb\fP: set palette, with parameter | |
174 | given in 7 hexadecimal digits after the final P :-(. | |
9bc87ed0 MK |
175 | Here \fIn\fP is the color (0\(en15), and \fIrrggbb\fP indicates |
176 | the red/green/blue values (0\(en255). | |
2866cb53 MK |
177 | ESC ] R: reset palette |
178 | T} | |
fea681da | 179 | .TE |
0b174fe0 | 180 | .ad |
1a947a96 MK |
181 | .PP |
182 | .B "ECMA-48 CSI sequences" | |
bdd915e2 | 183 | .PP |
fea681da MK |
184 | CSI (or ESC [) is followed by a sequence of parameters, |
185 | at most NPAR (16), that are decimal numbers separated by | |
c13182ef MK |
186 | semicolons. |
187 | An empty or absent parameter is taken to be 0. | |
fea681da | 188 | The sequence of parameters may be preceded by a single question mark. |
2866cb53 | 189 | .PP |
fea681da | 190 | However, after CSI [ (or ESC [ [) a single character is read |
c13182ef MK |
191 | and this entire sequence is ignored. |
192 | (The idea is to ignore an echoed function key.) | |
2866cb53 | 193 | .PP |
fea681da | 194 | The action of a CSI sequence is determined by its final character. |
0b174fe0 | 195 | .ad l |
fea681da | 196 | .TS |
0b174fe0 MK |
197 | l l lx. |
198 | @ ICH T{ | |
199 | Insert the indicated # of blank characters. | |
200 | T} | |
201 | A CUU T{ | |
202 | Move cursor up the indicated # of rows. | |
203 | T} | |
204 | B CUD T{ | |
205 | Move cursor down the indicated # of rows. | |
206 | T} | |
207 | C CUF T{ | |
208 | Move cursor right the indicated # of columns. | |
209 | T} | |
210 | D CUB T{ | |
211 | Move cursor left the indicated # of columns. | |
212 | T} | |
213 | E CNL T{ | |
214 | Move cursor down the indicated # of rows, to column 1. | |
215 | T} | |
216 | F CPL T{ | |
217 | Move cursor up the indicated # of rows, to column 1. | |
218 | T} | |
219 | G CHA T{ | |
220 | Move cursor to indicated column in current row. | |
221 | T} | |
222 | H CUP T{ | |
223 | Move cursor to the indicated row, column (origin at 1,1). | |
224 | T} | |
225 | J ED T{ | |
226 | Erase display (default: from cursor to end of display). | |
227 | T} | |
228 | T{ | |
229 | ESC [ 1 J: erase from start to cursor. | |
230 | T} | |
231 | T{ | |
232 | ESC [ 2 J: erase whole display. | |
233 | T} | |
234 | T{ | |
235 | ESC [ 3 J: erase whole display including scroll-back | |
236 | buffer (since Linux 3.0). | |
237 | T} | |
31483837 | 238 | .\" ESC [ 3 J: commit f8df13e0a901fe55631fed66562369b4dba40f8b |
0b174fe0 MK |
239 | K EL T{ |
240 | Erase line (default: from cursor to end of line). | |
241 | T} | |
242 | T{ | |
243 | ESC [ 1 K: erase from start of line to cursor. | |
244 | T} | |
245 | T{ | |
246 | ESC [ 2 K: erase whole line. | |
247 | T} | |
248 | L IL T{ | |
249 | Insert the indicated # of blank lines. | |
250 | T} | |
251 | M DL T{ | |
252 | Delete the indicated # of lines. | |
253 | T} | |
254 | P DCH T{ | |
255 | Delete the indicated # of characters on current line. | |
256 | T} | |
257 | X ECH T{ | |
258 | Erase the indicated # of characters on current line. | |
259 | T} | |
260 | a HPR T{ | |
261 | Move cursor right the indicated # of columns. | |
262 | T} | |
263 | c DA T{ | |
264 | Answer ESC [ ? 6 c: "I am a VT102". | |
265 | T} | |
266 | d VPA T{ | |
267 | Move cursor to the indicated row, current column. | |
268 | T} | |
269 | e VPR T{ | |
270 | Move cursor down the indicated # of rows. | |
271 | T} | |
272 | f HVP T{ | |
273 | Move cursor to the indicated row, column. | |
274 | T} | |
275 | g TBC T{ | |
276 | Without parameter: clear tab stop at current position. | |
277 | T} | |
278 | T{ | |
279 | ESC [ 3 g: delete all tab stops. | |
280 | T} | |
fea681da MK |
281 | h SM Set Mode (see below). |
282 | l RM Reset Mode (see below). | |
283 | m SGR Set attributes (see below). | |
284 | n DSR Status report (see below). | |
285 | q DECLL Set keyboard LEDs. | |
286 | ESC [ 0 q: clear all LEDs | |
287 | ESC [ 1 q: set Scroll Lock LED | |
288 | ESC [ 2 q: set Num Lock LED | |
289 | ESC [ 3 q: set Caps Lock LED | |
0b174fe0 MK |
290 | r DECSTBM T{ |
291 | Set scrolling region; parameters are top and bottom row. | |
292 | T} | |
fea681da MK |
293 | s ? Save cursor location. |
294 | u ? Restore cursor location. | |
0b174fe0 MK |
295 | \` HPA T{ |
296 | Move cursor to indicated column in current row. | |
297 | T} | |
fea681da | 298 | .TE |
0b174fe0 | 299 | .ad |
1a947a96 | 300 | .PP |
f603c6f3 | 301 | .B ECMA-48 Select Graphic Rendition |
bdd915e2 | 302 | .PP |
c13182ef | 303 | The ECMA-48 SGR sequence ESC [ \fIparameters\fP m sets display |
2866cb53 | 304 | attributes. |
c13182ef | 305 | Several attributes can be set in the same sequence, separated by |
2866cb53 | 306 | semicolons. |
c13182ef | 307 | An empty parameter (between semicolons or string initiator or |
2866cb53 | 308 | terminator) is interpreted as a zero. |
0b174fe0 | 309 | .ad l |
fea681da | 310 | .TS |
0b174fe0 | 311 | l lx. |
2866cb53 | 312 | param result |
0b174fe0 MK |
313 | 0 T{ |
314 | reset all attributes to their defaults | |
315 | T} | |
fea681da | 316 | 1 set bold |
0b174fe0 MK |
317 | 2 T{ |
318 | set half-bright (simulated with color on a color display) | |
319 | T} | |
2866cb53 MK |
320 | 4 T{ |
321 | set underscore (simulated with color on a color display) | |
322 | (the colors used to simulate dim or underline are set | |
323 | using ESC ] ...) | |
324 | T} | |
fea681da MK |
325 | 5 set blink |
326 | 7 set reverse video | |
2866cb53 MK |
327 | 10 T{ |
328 | reset selected mapping, display control flag, | |
329 | and toggle meta flag (ECMA-48 says "primary font"). | |
330 | T} | |
331 | 11 T{ | |
332 | select null mapping, set display control flag, | |
333 | reset toggle meta flag (ECMA-48 says "first alternate font"). | |
334 | T} | |
335 | 12 T{ | |
336 | select null mapping, set display control flag, | |
337 | set toggle meta flag (ECMA-48 says "second alternate font"). | |
338 | The toggle meta flag | |
339 | causes the high bit of a byte to be toggled | |
340 | before the mapping table translation is done. | |
341 | T} | |
40fe605b | 342 | 21 T{ |
cb83181d MK |
343 | set underline; before Linux 4.17, this value |
344 | set normal intensity (as is done in many other terminals) | |
40fe605b | 345 | T} |
fea681da MK |
346 | 22 set normal intensity |
347 | 24 underline off | |
348 | 25 blink off | |
349 | 27 reverse video off | |
350 | 30 set black foreground | |
351 | 31 set red foreground | |
352 | 32 set green foreground | |
353 | 33 set brown foreground | |
354 | 34 set blue foreground | |
355 | 35 set magenta foreground | |
356 | 36 set cyan foreground | |
357 | 37 set white foreground | |
40fe605b MK |
358 | 38 T{ |
359 | 256/24-bit foreground color follows, shoehorned into 16 basic colors | |
cb83181d MK |
360 | (before Linux 3.16: set underscore on, set default foreground color) |
361 | T} | |
362 | 39 T{ | |
363 | set default foreground color | |
364 | (before Linux 3.16: set underscore off, set default foreground color) | |
40fe605b | 365 | T} |
fea681da MK |
366 | 40 set black background |
367 | 41 set red background | |
368 | 42 set green background | |
369 | 43 set brown background | |
370 | 44 set blue background | |
371 | 45 set magenta background | |
372 | 46 set cyan background | |
373 | 47 set white background | |
40fe605b MK |
374 | 48 T{ |
375 | 256/24-bit background color follows, shoehorned into 8 basic colors | |
376 | T} | |
fea681da | 377 | 49 set default background color |
0b174fe0 MK |
378 | 90..97 T{ |
379 | set foreground to bright versions of 30..37 | |
380 | T} | |
381 | 100.107 T{ | |
382 | set background, same as 40..47 (bright not supported) | |
383 | T} | |
fea681da | 384 | .TE |
0b174fe0 | 385 | .ad |
1a947a96 | 386 | .PP |
f1779b12 AB |
387 | Commands 38 and 48 require further arguments: |
388 | .TS | |
0b174fe0 | 389 | l lx. |
f1779b12 AB |
390 | ;5;x T{ |
391 | 256 color: values 0..15 are IBGR (black, red, green, ... white), | |
392 | 16..231 a 6x6x6 color cube, 232..255 a grayscale ramp | |
393 | T} | |
0b174fe0 MK |
394 | ;2;r;g;b T{ |
395 | 24-bit color, r/g/b components are in the range 0..255 | |
396 | T} | |
f1779b12 AB |
397 | .TE |
398 | .PP | |
1a947a96 | 399 | .B ECMA-48 Mode Switches |
fea681da MK |
400 | .TP |
401 | ESC [ 3 h | |
402 | DECCRM (default off): Display control chars. | |
403 | .TP | |
404 | ESC [ 4 h | |
405 | DECIM (default off): Set insert mode. | |
406 | .TP | |
407 | ESC [ 20 h | |
735334d4 | 408 | LF/NL (default off): Automatically follow echo of LF, VT, or FF with CR. |
fea681da | 409 | .\" |
1a947a96 MK |
410 | .PP |
411 | .B ECMA-48 Status Report Commands | |
fea681da MK |
412 | .\" |
413 | .TP | |
414 | ESC [ 5 n | |
415 | Device status report (DSR): Answer is ESC [ 0 n (Terminal OK). | |
416 | .TP | |
417 | ESC [ 6 n | |
418 | Cursor position report (CPR): Answer is ESC [ \fIy\fP ; \fIx\fP R, | |
419 | where \fIx,y\fP is the cursor location. | |
420 | .\" | |
1a947a96 MK |
421 | .PP |
422 | .B DEC Private Mode (DECSET/DECRST) sequences | |
bdd915e2 | 423 | .PP |
fea681da | 424 | .\" |
c13182ef MK |
425 | These are not described in ECMA-48. |
426 | We list the Set Mode sequences; | |
f81fb444 MK |
427 | the Reset Mode sequences are obtained by replacing the final \(aqh\(aq |
428 | by \(aql\(aq. | |
fea681da MK |
429 | .TP |
430 | ESC [ ? 1 h | |
431 | DECCKM (default off): When set, the cursor keys send an ESC O prefix, | |
432 | rather than ESC [. | |
433 | .TP | |
434 | ESC [ ? 3 h | |
c13182ef MK |
435 | DECCOLM (default off = 80 columns): 80/132 col mode switch. |
436 | The driver sources note that this alone does not suffice; some user-mode | |
fea681da MK |
437 | utility such as |
438 | .BR resizecons (8) | |
439 | has to change the hardware registers on the console video card. | |
440 | .TP | |
441 | ESC [ ? 5 h | |
442 | DECSCNM (default off): Set reverse-video mode. | |
443 | .TP | |
444 | ESC [ ? 6 h | |
445 | DECOM (default off): When set, cursor addressing is relative to | |
446 | the upper left corner of the scrolling region. | |
447 | .TP | |
448 | ESC [ ? 7 h | |
c13182ef MK |
449 | DECAWM (default on): Set autowrap on. |
450 | In this mode, a graphic | |
fea681da MK |
451 | character emitted after column 80 (or column 132 of DECCOLM is on) |
452 | forces a wrap to the beginning of the following line first. | |
453 | .TP | |
454 | ESC [ ? 8 h | |
e3e12155 | 455 | DECARM (default on): Set keyboard autorepeat on. |
fea681da MK |
456 | .TP |
457 | ESC [ ? 9 h | |
458 | X10 Mouse Reporting (default off): Set reporting mode to 1 (or reset to | |
5503c85e | 459 | 0)\(emsee below. |
fea681da MK |
460 | .TP |
461 | ESC [ ? 25 h | |
2866cb53 | 462 | DECTECM (default on): Make cursor visible. |
fea681da MK |
463 | .TP |
464 | ESC [ ? 1000 h | |
465 | X11 Mouse Reporting (default off): Set reporting mode to 2 (or reset | |
5503c85e | 466 | to 0)\(emsee below. |
fea681da | 467 | .\" |
1a947a96 MK |
468 | .PP |
469 | .B Linux Console Private CSI Sequences | |
bdd915e2 | 470 | .PP |
fea681da | 471 | .\" |
c13182ef MK |
472 | The following sequences are neither ECMA-48 nor native VT102. |
473 | They are native to the Linux console driver. | |
474 | Colors are in SGR parameters: | |
fea681da | 475 | 0 = black, 1 = red, 2 = green, 3 = brown, 4 = blue, 5 = magenta, 6 = |
e224cfce | 476 | cyan, 7 = white; 8\(en15 = bright versions of 0\(en7. |
fea681da | 477 | .TS |
0b174fe0 MK |
478 | l lx. |
479 | ESC [ 1 ; \fIn\fP ] T{ | |
480 | Set color \fIn\fP as the underline color. | |
481 | T} | |
482 | ESC [ 2 ; \fIn\fP ] T{ | |
483 | Set color \fIn\fP as the dim color. | |
484 | T} | |
485 | ESC [ 8 ] T{ | |
486 | Make the current color pair the default attributes. | |
487 | T} | |
488 | ESC [ 9 ; \fIn\fP ] T{ | |
489 | Set screen blank timeout to \fIn\fP minutes. | |
490 | T} | |
491 | ESC [ 10 ; \fIn\fP ] T{ | |
492 | Set bell frequency in Hz. | |
493 | T} | |
494 | ESC [ 11 ; \fIn\fP ] T{ | |
495 | Set bell duration in msec. | |
496 | T} | |
497 | ESC [ 12 ; \fIn\fP ] T{ | |
498 | Bring specified console to the front. | |
499 | T} | |
500 | ESC [ 13 ] T{ | |
501 | Unblank the screen. | |
502 | T} | |
503 | ESC [ 14 ; \fIn\fP ] T{ | |
504 | Set the VESA powerdown interval in minutes. | |
505 | T} | |
ee6a7196 | 506 | ESC [ 15 ] T{ |
f8db29e8 MK |
507 | Bring the previous console to the front |
508 | (since Linux 2.6.0). | |
509 | T} | |
ee6a7196 | 510 | ESC [ 16 ; \fIn\fP ] T{ |
8e085a68 | 511 | Set the cursor blink interval in milliseconds |
db2280ee | 512 | (since Linux 4.2). |
8e085a68 MK |
513 | T} |
514 | .\" commit bd63364caa8df38bad2b25b11b2a1b849475cce5 | |
fea681da | 515 | .TE |
73d8cece | 516 | .SS Character sets |
c13182ef | 517 | The kernel knows about 4 translations of bytes into console-screen |
2866cb53 | 518 | symbols. |
4d9b6984 MK |
519 | The four tables are: a) Latin1 \-> PC, |
520 | b) VT100 graphics \-> PC, c) PC \-> PC, d) user-defined. | |
2866cb53 | 521 | .PP |
fea681da | 522 | There are two character sets, called G0 and G1, and one of them |
6387216b MK |
523 | is the current character set. |
524 | (Initially G0.) | |
9ca13180 MK |
525 | Typing \fB\(haN\fP causes G1 to become current, |
526 | \fB\(haO\fP causes G0 to become current. | |
2866cb53 | 527 | .PP |
c13182ef MK |
528 | These variables G0 and G1 point at a translation table, and can be |
529 | changed by the user. | |
2866cb53 | 530 | Initially they point at tables a) and b), respectively. |
c13182ef | 531 | The sequences ESC ( B and ESC ( 0 and ESC ( U and ESC ( K cause G0 to |
735334d4 | 532 | point at translation table a), b), c), and d), respectively. |
c13182ef | 533 | The sequences ESC ) B and ESC ) 0 and ESC ) U and ESC ) K cause G1 to |
735334d4 | 534 | point at translation table a), b), c), and d), respectively. |
2866cb53 | 535 | .PP |
fea681da | 536 | The sequence ESC c causes a terminal reset, which is what you want if the |
c13182ef | 537 | screen is all garbled. |
9ca13180 | 538 | The oft-advised "echo \(haV\(haO" will make only G0 current, |
fea681da MK |
539 | but there is no guarantee that G0 points at table a). |
540 | In some distributions there is a program | |
541 | .BR reset (1) | |
9ca13180 | 542 | that just does "echo \(ha[c". |
c13182ef | 543 | If your terminfo entry for the console is correct |
d1a71985 | 544 | (and has an entry rs1=\eEc), then "tput reset" will also work. |
2866cb53 | 545 | .PP |
fea681da MK |
546 | The user-defined mapping table can be set using |
547 | .BR mapscrn (8). | |
548 | The result of the mapping is that if a symbol c is printed, the symbol | |
c13182ef MK |
549 | s = map[c] is sent to the video memory. |
550 | The bitmap that corresponds to | |
fea681da | 551 | s is found in the character ROM, and can be changed using |
a5e0a0e4 | 552 | .BR setfont (8). |
73d8cece | 553 | .SS Mouse tracking |
511bfbc9 | 554 | The mouse tracking facility is intended to return |