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