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