1.\" 2.\" $FreeBSD$ 3.\" 4.Dd January 8, 1995 5.Dt SCREEN 4 6.Os FreeBSD 7.Sh NAME 8.Nm screen 9.Nd pc display interface 10.Sh DESCRIPTION 11 12Access to the 13.Ar virtual consoles 14are obtained through the device files 15ttyv0 - ttyvb in 16.Pa /dev . 17Each of these files correspond to a separate 18virtual console. 19All virtual console devices can be open at once, but only one is 20active at a time. 21The active virtual console "owns" the keyboard and 22display screen. 23.Pp 24Output to a virtual console that not currently is on the display is 25saved in a buffer that holds a "screenfull" (normally 25) lines. 26Any output written to 27.Pa /dev/console 28(the original console device) is echoed to 29.Pa /dev/ttyv0. 30.Pp 31To switch between the virtual consoles one uses the sequence 32.Ar ALT+Fn 33, which means hold down ALT and press one of the function keys. 34The 35virtual console with the same number as the function key is then 36selected as the current virtual console, and given exclusive use of 37the keyboard and display. 38This switch sequence can be changed via 39the keyboard mapping ioctl call (see keyboard.4) 40.Pp 41 42The console allows entering values that are not physically 43present on the keyboard via a special keysequence. 44To use this facility press and hold down ALT, 45then enter a decimal number from 0-255 via the numerical keypad, then 46release ALT. 47The entered value is then used as the ASCII value for one 48character. 49This way it is possible to enter any ASCII value. 50The console driver also includes a history function. 51It is activated by 52pressing the scroll-lock key. 53This holds the display, and enables the cursor 54arrows for scrolling up and down through the last scrolled out lines. 55 56The console understands a subset of the ANSI x3.64 character 57sequences. 58For compatibility with the old pccons, the PC3 character 59sequences is also supported. 60.Pp 61.Bd -literal 62ANSI Seq Function Termcap entry 63======= ======= ===================================== ============== 64 65-- E7 Save cursor position sc 66 67-- E8 Restore saved cursor position rc 68 69-- Ec Reset rs 70 71CUU E[nA move cursor up n lines up/UP (ku) 72 73CUD E[nB move cursor down n lines do/DO (kd) 74 75CUF E[nC move cursor right n characters nd/RI (kr) 76 77CUB E[nD move cursor left n characters --/LE (kl) 78 79HPA E[n` move cursor to character position n ch 80 81HPR E[na move cursor right n characters -- 82 83VPA E[nd move cursor to line n cv 84 85VPR E[ne move cursor down n lines -- 86 87CPL E[nF move cursor to start of line, -- (@7) 88 n lines up 89 90CNL E[nE move cursor to start of line, nw 91 n lines down 92 93CUP E[y;xH Move cursor to x, y cm 94 95HVP E[y;xf Move cursor to x, y -- 96 97CBT E[nZ Move cursor back n tab stops bt (kB) 98 99IL E[nL Insert n blank lines al/AL 100 101ICH E[n@ Insert n blank characters ic/IC 102 103DL E[nM Delete n lines dl/DL 104 105DCH E[nP Delete n characters dc/DC 106 107ED E[nJ Erase part or all of display: cd 108 n=0 from cursor to end of display, 109 n=1 from begin of display to cursor, 110 n=2 entire display. 111 112EL E[nK Erase part or all of line: ce 113 n=0 from cursor to end of line, 114 n=1 from begin of line to cursor, 115 n=2 entire line. 116 117ECH E[nX Erase n characters ec 118 119SU E[nS Scroll display n lines up (forward) sf/SF 120 121SD E[nT Scroll display n lines down (reverse) sr/SR 122 123 124SGR E[nm Set character attributes: -- 125 n= 0 normal attribute (all off) 126 n= 1 bold (highlight) 127 n= 4 underscore (if supported by HW) 128 n= 5 blink (if supported by HW) 129 n= 7 reverse 130 n= 22 remove bold 131 n= 24 remove underscore 132 n= 25 remove blink 133 n= 27 remove reverse 134 n= 3X set ANSI foreground color 135 (see table) 136 n= 4X set ANSI background color 137 (see table) 138 139 X=0 black X=1 red 140 X=2 green X=3 brown 141 X=4 blue X=5 magenta 142 X=6 cyan X=7 light grey 143 X=9 reset to the normal color 144 145-- E[s Save cursor position sc 146 147-- E[u Restore saved cursor position rc 148 149-- E[x Reset normal colors and attributes -- 150 to their default values 151 152-- E[1;nx Set normal ANSI background color -- 153 to n (see table) 154 155-- E[2;nx Set normal ANSI foreground color -- 156 to n (see table) 157 158-- E[3;nx Set normal video attribute directly -- 159 to n (n from 0 to 255) 160 161-- E[5;nx Set normal ANSI reverse background -- 162 color to n (see table) 163 164-- E[6;nx Set normal ANSI reverse foreground -- 165 color to n (see table) 166 167 n= 0 black n= 8 dark grey 168 n= 1 red n= 9 light red 169 n= 2 green n=10 light green 170 n= 3 brown n=11 yellow 171 n= 4 blue n=12 light blue 172 n= 5 magenta n=13 light magenta 173 n= 6 cyan n=14 light cyan 174 n= 7 light grey n=15 white 175 176-- E[7;nx Set normal reverse video attribute -- 177 directly to n (n from 0 to 255) 178 179-- E[=p;dB Set bell pitch (p) and duration (d), -- 180 picth is in units of 840 nS, 181 duration is units of 0,1 S. 182 183-- E[=tC Set cursor type, 1 selects a blinking -- 184 cursor, 0 a steady cursor. 185 186-- E[=nA Set the border color to n -- 187 (see table) (if supported by HW) 188 189-- E[=nF Set normal foreground color to n -- 190 (see table) 191 192-- E[=nG Set normal background color to n -- 193 (see table) 194 195-- E[=nH Set normal reverse foreground color -- 196 to n (see table) 197 198-- E[=nI Set normal reverse background color -- 199 to n (see table) 200 201 n= 0 black n= 8 dark grey 202 n= 1 blue n= 9 light blue 203 n= 2 green n=10 light green 204 n= 3 cyan n=11 light cyan 205 n= 4 red n=12 light red 206 n= 5 magenta n=13 light magenta 207 n= 6 brown n=14 yellow 208 n= 7 light grey n=15 white 209 210note: the first E in the sequences stands for ESC (0x1b) 211 212.Ed 213.Pp 214.Sh AUTHORS 215.An S�ren Schmidt Aq sos@FreeBSD.org 216