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