9 .Nd pc display interface
13 are obtained through the device files
17 Each of these files correspond to a separate
19 All virtual console devices can be open at once, but only one is
21 The active virtual console "owns" the keyboard and
24 Output to a virtual console that not currently is on the display is
25 saved in a buffer that holds a "screenfull" (normally 25) lines.
28 (the original console device) is echoed to
31 To switch between the virtual consoles one uses the sequence
33 which means hold down ALT and press one of the function keys.
35 virtual console with the same number as the function key is then
36 selected as the current virtual console, and given exclusive use of
37 the keyboard and display.
38 This switch sequence can be changed via
39 the keyboard mapping ioctl call (see
42 The console allows entering values that are not physically
43 present on the keyboard via a special keysequence.
44 To use this facility press and hold down ALT,
45 then enter a decimal number from 0-255 via the numerical keypad, then
47 The entered value is then used as the ASCII value for one
49 This way it is possible to enter any ASCII value.
50 The console driver also includes a history function.
52 pressing the scroll-lock key.
53 This holds the display, and enables the cursor
54 arrows for scrolling up and down through the last scrolled out lines.
56 The console understands a subset of the ANSI x3.64 character
58 For compatibility with the old pccons, the PC3 character
59 sequences are also supported.
62 ANSI Seq Function Termcap entry
63 ======= ======= ===================================== ==============
65 -- E7 Save cursor position sc
67 -- E8 Restore saved cursor position rc
71 -- EM move cursor up 1 line, --
74 CUU E[nA move cursor up n lines up/UP (ku)
76 CUD E[nB move cursor down n lines do/DO (kd)
78 CUF E[nC move cursor right n characters nd/RI (kr)
80 CUB E[nD move cursor left n characters --/LE (kl)
82 HPA E[n` move cursor to character position n ch
84 HPR E[na move cursor right n characters --
86 VPA E[nd move cursor to line n cv
88 VPR E[ne move cursor down n lines --
90 CPL E[nF move cursor to start of line, -- (@7)
93 CNL E[nE move cursor to start of line, nw
96 CUP E[y;xH Move cursor to x, y cm
98 HVP E[y;xf Move cursor to x, y --
100 CBT E[nZ Move cursor back n tab stops bt (kB)
102 IL E[nL Insert n blank lines al/AL
104 ICH E[n@ Insert n blank characters ic/IC
106 DL E[nM Delete n lines dl/DL
108 DCH E[nP Delete n characters dc/DC
110 ED E[nJ Erase part or all of display: cd
111 n=0 from cursor to end of display,
112 n=1 from begin of display to cursor,
115 EL E[nK Erase part or all of line: ce
116 n=0 from cursor to end of line,
117 n=1 from begin of line to cursor,
120 ECH E[nX Erase n characters ec
122 SU E[nS Scroll display n lines up (forward) sf/SF
124 SD E[nT Scroll display n lines down (reverse) sr/SR
127 SGR E[nm Set character attributes: --
128 n= 0 normal attribute (all off)
129 n= 1 bold (highlight)
130 n= 4 underscore (if supported by HW)
131 n= 5 blink (if supported by HW)
134 n= 24 remove underscore
137 n= 3X set ANSI foreground color
139 n= 4X set ANSI background color
145 X=6 cyan X=7 light grey
146 X=9 reset to the normal color
148 -- E[s Save cursor position sc
150 -- E[u Restore saved cursor position rc
152 -- E[x Reset normal colors and attributes --
153 to their default values
155 -- E[nz Switch to virtual console n --
157 -- E[1;nx Set normal ANSI background color --
160 -- E[2;nx Set normal ANSI foreground color --
163 -- E[3;nx Set normal video attribute directly --
164 to n (n from 0 to 255)
166 -- E[5;nx Set normal ANSI reverse background --
167 color to n (see table)
169 -- E[6;nx Set normal ANSI reverse foreground --
170 color to n (see table)
172 n= 0 black n= 8 dark grey
173 n= 1 red n= 9 light red
174 n= 2 green n=10 light green
175 n= 3 brown n=11 yellow
176 n= 4 blue n=12 light blue
177 n= 5 magenta n=13 light magenta
178 n= 6 cyan n=14 light cyan
179 n= 7 light grey n=15 white
181 -- E[7;nx Set normal reverse video attribute --
182 directly to n (n from 0 to 255)
184 -- E[=p;dB Set bell pitch (p) and duration (d), --
185 pitch is in units of 840 nS,
186 duration is units of 0,1 S.
188 -- E[=tC Set global cursor type (see table) --
190 t=0 normal non-blinking
192 t=2 custom non-blinking
194 t=4 reset cursor (resets custom
195 cursor shape and sets current
199 -- E[=s;eC Set custom cursor shape, where --
200 s is the starting and e is the ending
201 scanlines of the cursor.
204 Same as above, except d specifies the
205 direction. If 0, scanlines are counted
206 from the top to the bottom. If 1, from
207 the bottom to the top.
209 -- E[=tS Set local cursor type (see table) --
211 t=0 normal (global) ve
215 -- E[=nA Set the border color to n --
216 (see table) (if supported by HW)
218 -- E[=nF Set normal foreground color to n --
221 -- E[=nG Set normal background color to n --
224 -- E[=nH Set normal reverse foreground color --
227 -- E[=nI Set normal reverse background color --
230 n= 0 black n= 8 dark grey
231 n= 1 blue n= 9 light blue
232 n= 2 green n=10 light green
233 n= 3 cyan n=11 light cyan
234 n= 4 red n=12 light red
235 n= 5 magenta n=13 light magenta
236 n= 6 brown n=14 yellow
237 n= 7 light grey n=15 white
239 note: the first E in the sequences stands for ESC (0x1b)
242 .An S\(/oren Schmidt Aq sos@FreeBSD.org