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