SCREEN(4)
π SCREEN(4) π
okay bestie, this is the screen(4) page from the Kernel Interfaces Manual β pc display interface tea, and it's giving vintage console main character energy. π
β¨
π NAME π
screen β pc display interface. That's the whole assignment: it's the virtual-console/display interface page, and yes it ate. π
β¨ DESCRIPTION β¨
Access to the virtual consoles is obtained through the device files /dev/ttyv0 - /dev/ttyvb. Each of these files corresponds to a separate virtual console. All virtual console devices can be open at once, but only one is active at a time. The active virtual console "owns" the keyboard and display screen. π
Output to a virtual console that is not currently on the display is saved in a buffer that holds a "screenfull" (normally 25) lines. Any output written to /dev/console (the original console device) is echoed to /dev/ttyv0. π«Ά
To switch between the virtual consoles, one uses the sequence ALT+Fn, which means hold down ALT and press one of the function keys. The virtual console with the same number as the function key is then selected as the current virtual console, and given exclusive use of the keyboard and display. This switch sequence can be changed via the keyboard mapping ioctl call (see keyboard(4)). β¨οΈβ¨
The console allows entering values that are not physically present on the keyboard via a special keysequence. To use this facility, press and hold down ALT, then enter a decimal number from 0-255 via the numerical keypad, then release ALT. The entered value is then used as the ASCII value for one character. This way it is possible to enter any ASCII value. The console driver also includes a history function. It is activated by pressing the scroll-lock key. This holds the display, and enables the cursor arrows for scrolling up and down through the last scrolled out lines. π₯
The console understands a subset of the ANSI x3.64 character sequences. For compatibility with the old pccons, the PC3 character sequences are also supported. π¦
π§ the ANSI / PC3 sequence list, bestie β with ANSI, Seq, Function, and Termcap entry π§
- ANSI:
--; Seq:E7; function: Save cursor position; termcap:sc. - ANSI:
--; Seq:E8; function: Restore saved cursor position; termcap:rc. - ANSI:
--; Seq:Ec; function: Reset; termcap:rs. - ANSI:
--; Seq:EM; function: move cursor up 1 line, scroll if at top; termcap:--. - ANSI:
CUU; Seq:E[nA; function: move cursor up n lines; termcap:up/UP (ku). - ANSI:
CUD; Seq:E[nB; function: move cursor down n lines; termcap:do/DO (kd). - ANSI:
CUF; Seq:E[nC; function: move cursor right n characters; termcap:nd/RI (kr). - ANSI:
CUB; Seq:E[nD; function: move cursor left n characters; termcap:--/LE (kl). - ANSI:
HPA; Seq:E[n`; function: move cursor to character position n; termcap:ch. - ANSI:
HPR; Seq:E[na; function: move cursor right n characters; termcap:--. - ANSI:
VPA; Seq:E[nd; function: move cursor to line n; termcap:cv. - ANSI:
VPR; Seq:E[ne; function: move cursor down n lines; termcap:--. - ANSI:
CPL; Seq:E[nF; function: move cursor to start of line, n lines up; termcap:-- (@7). - ANSI:
CNL; Seq:E[nE; function: move cursor to start of line, n lines down; termcap:nw. - ANSI:
CUP; Seq:E[y;xH; function: Move cursor to x, y; termcap:cm. - ANSI:
HVP; Seq:E[y;xf; function: Move cursor to x, y; termcap:--. - ANSI:
CBT; Seq:E[nZ; function: Move cursor back n tab stops; termcap:bt (kB). - ANSI:
IL; Seq:E[nL; function: Insert n blank lines; termcap:al/AL. - ANSI:
ICH; Seq:E[n@; function: Insert n blank characters; termcap:ic/IC. - ANSI:
DL; Seq:E[nM; function: Delete n lines; termcap:dl/DL. - ANSI:
DCH; Seq:E[nP; function: Delete n characters; termcap:dc/DC. - ANSI:
ED; Seq:E[nJ; function: Erase part or all of display:n=0from cursor to end of display,n=1from begin of display to cursor,n=2entire display.; termcap:cd. - ANSI:
EL; Seq:E[nK; function: Erase part or all of line:n=0from cursor to end of line,n=1from begin of line to cursor,n=2entire line.; termcap:ce. - ANSI:
ECH; Seq:E[nX; function: Erase n characters; termcap:ec. - ANSI:
SU; Seq:E[nS; function: Scroll display n lines up (forward); termcap:sf/SF. - ANSI:
SD; Seq:E[nT; function: Scroll display n lines down (reverse); termcap:sr/SR. - ANSI:
SGR; Seq:E[nm; function: Set character attributes; termcap:--.n= 0normal attribute (all off)n= 1bold (highlight)n= 4underscore (if supported by HW)n= 5blink (if supported by HW)n= 7reversen= 22remove boldn= 24remove underscoren= 25remove blinkn= 27remove reversen= 3Xset ANSI foreground color (see table)n= 4Xset ANSI background color (see table)X=0black;X=1redX=2green;X=3brownX=4blue;X=5magentaX=6cyan;X=7light greyX=9reset to the normal color
- ANSI:
--; Seq:E[s; function: Save cursor position; termcap:sc. - ANSI:
--; Seq:E[u; function: Restore saved cursor position; termcap:rc. - ANSI:
--; Seq:E[x; function: Reset normal colors and attributes to their default values; termcap:--. - ANSI:
--; Seq:E[nz; function: Switch to virtual console n; termcap:--. - ANSI:
--; Seq:E[1;nx; function: Set normal ANSI background color to n (see table); termcap:--. - ANSI:
--; Seq:E[2;nx; function: Set normal ANSI foreground color to n (see table); termcap:--. - ANSI:
--; Seq:E[3;nx; function: Set normal video attribute directly to n (n from 0 to 255); termcap:--. - ANSI:
--; Seq:E[5;nx; function: Set normal ANSI reverse background color to n (see table); termcap:--. - ANSI:
--; Seq:E[6;nx; function: Set normal ANSI reverse foreground color to n (see table); termcap:--.n= 0black;n= 8dark greyn= 1red;n= 9light redn= 2green;n=10light greenn= 3brown;n=11yellown= 4blue;n=12light bluen= 5magenta;n=13light magentan= 6cyan;n=14light cyann= 7light grey;n=15white
- ANSI:
--; Seq:E[7;nx; function: Set normal reverse video attribute directly to n (n from 0 to 255); termcap:--. - ANSI:
--; Seq:E[=p;dB; function: Set bell pitch (p) and duration (d), pitch is in units of 840 nS, duration is units of0,1 S.; termcap:--. - ANSI:
--; Seq:E[=tC; function: Set global cursor type (see table); termcap:--.t=0normal non-blinkingt=1normal blinkingt=2custom non-blinkingt=3custom blinkingt=4reset cursor (resets custom cursor shape and sets current cursor type to 0)t=5hide cursor
- ANSI:
--; Seq:E[=s;eC; function: Set custom cursor shape, where s is the starting and e is the ending scanlines of the cursor.; termcap:--. - ANSI:
--; Seq:E[=s;e;dC; function: Same as above, except d specifies the direction. If 0, scanlines are counted from the top to the bottom. If 1, from the bottom to the top.; termcap:--. - ANSI:
--; Seq:E[=tS; function: Set local cursor type (see table); termcap:--.t=0normal (global); termcap:vet=1invisible; termcap:vit=2very visible; termcap:vs
- ANSI:
--; Seq:E[=nA; function: Set the border color to n (see table) (if supported by HW); termcap:--. - ANSI:
--; Seq:E[=nF; function: Set normal foreground color to n (see table); termcap:--. - ANSI:
--; Seq:E[=nG; function: Set normal background color to n (see table); termcap:--. - ANSI:
--; Seq:E[=nH; function: Set normal reverse foreground color to n (see table); termcap:--. - ANSI:
--; Seq:E[=nI; function: Set normal reverse background color to n (see table); termcap:--.n= 0black;n= 8dark greyn= 1blue;n= 9light bluen= 2green;n=10light greenn= 3cyan;n=11light cyann= 4red;n=12light redn= 5magenta;n=13light magentan= 6brown;n=14yellown= 7light grey;n=15white
note: the firstEin the sequences stands forESC(0x1b). β
π AUTHORS π
SΓΈren Schmidt <sos@FreeBSD.org> β iconic, credited, periodt. π
π this page's source/version isDebian, datedOctober 6, 2000β and that's theSCREEN(4)tea, bestie. π«Άβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms