1997-03-07 02:50:01 +00:00
|
|
|
|
.\"
|
1999-08-28 00:22:10 +00:00
|
|
|
|
.\" $FreeBSD$
|
1997-03-07 02:50:01 +00:00
|
|
|
|
.\"
|
2000-10-06 08:40:52 +00:00
|
|
|
|
.Dd October 6, 2000
|
1999-11-15 23:14:32 +00:00
|
|
|
|
.Dt SCREEN 4
|
1993-09-09 00:32:25 +00:00
|
|
|
|
.Os FreeBSD
|
|
|
|
|
.Sh NAME
|
|
|
|
|
.Nm screen
|
|
|
|
|
.Nd pc display interface
|
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
|
Access to the
|
2000-10-06 08:40:52 +00:00
|
|
|
|
.Em virtual consoles
|
1993-09-09 00:32:25 +00:00
|
|
|
|
are obtained through the device files
|
2000-10-06 08:40:52 +00:00
|
|
|
|
.Pa /dev/ttyv0
|
|
|
|
|
-
|
|
|
|
|
.Pa /dev/ttyvb .
|
1998-06-08 06:12:02 +00:00
|
|
|
|
Each of these files correspond to a separate
|
1993-09-09 00:32:25 +00:00
|
|
|
|
virtual console.
|
2000-10-06 08:40:52 +00:00
|
|
|
|
All virtual console devices can be open at once, but only one is
|
2000-03-01 14:50:24 +00:00
|
|
|
|
active at a time.
|
|
|
|
|
The active virtual console "owns" the keyboard and
|
1993-09-09 00:32:25 +00:00
|
|
|
|
display screen.
|
|
|
|
|
.Pp
|
|
|
|
|
Output to a virtual console that not currently is on the display is
|
|
|
|
|
saved in a buffer that holds a "screenfull" (normally 25) lines.
|
2000-10-06 08:40:52 +00:00
|
|
|
|
Any output written to
|
|
|
|
|
.Pa /dev/console
|
1999-11-15 23:14:32 +00:00
|
|
|
|
(the original console device) is echoed to
|
2000-10-06 08:40:52 +00:00
|
|
|
|
.Pa /dev/ttyv0 .
|
1993-09-09 00:32:25 +00:00
|
|
|
|
.Pp
|
2000-10-06 08:40:52 +00:00
|
|
|
|
To switch between the virtual consoles one uses the sequence
|
|
|
|
|
.Em ALT+Fn ,
|
|
|
|
|
which means hold down ALT and press one of the function keys.
|
|
|
|
|
The
|
1993-09-09 00:32:25 +00:00
|
|
|
|
virtual console with the same number as the function key is then
|
|
|
|
|
selected as the current virtual console, and given exclusive use of
|
2000-03-01 14:50:24 +00:00
|
|
|
|
the keyboard and display.
|
|
|
|
|
This switch sequence can be changed via
|
2000-10-06 08:40:52 +00:00
|
|
|
|
the keyboard mapping ioctl call (see
|
|
|
|
|
.Xr keyboard 4 ) .
|
1993-09-09 00:32:25 +00:00
|
|
|
|
.Pp
|
|
|
|
|
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
|
2000-03-01 14:50:24 +00:00
|
|
|
|
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
|
1995-01-12 11:47:05 +00:00
|
|
|
|
arrows for scrolling up and down through the last scrolled out lines.
|
2000-10-06 08:40:52 +00:00
|
|
|
|
.Pp
|
|
|
|
|
The console understands a subset of the ANSI x3.64 character
|
2000-03-01 14:50:24 +00:00
|
|
|
|
sequences.
|
|
|
|
|
For compatibility with the old pccons, the PC3 character
|
1993-09-09 00:32:25 +00:00
|
|
|
|
sequences is also supported.
|
|
|
|
|
.Pp
|
2000-10-06 08:40:52 +00:00
|
|
|
|
.Bd -literal
|
1993-09-09 00:32:25 +00:00
|
|
|
|
ANSI Seq Function Termcap entry
|
|
|
|
|
======= ======= ===================================== ==============
|
|
|
|
|
|
1997-01-26 23:27:15 +00:00
|
|
|
|
-- E7 Save cursor position sc
|
|
|
|
|
|
|
|
|
|
-- E8 Restore saved cursor position rc
|
|
|
|
|
|
2000-07-21 14:28:08 +00:00
|
|
|
|
-- Ec Reset rs
|
|
|
|
|
|
2000-10-06 08:40:52 +00:00
|
|
|
|
-- EM move cursor up 1 line, --
|
|
|
|
|
scroll if at top
|
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
CUU E[nA move cursor up n lines up/UP (ku)
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
CUD E[nB move cursor down n lines do/DO (kd)
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
CUF E[nC move cursor right n characters nd/RI (kr)
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
CUB E[nD move cursor left n characters --/LE (kl)
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
HPA E[n` move cursor to character position n ch
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
|
|
|
|
HPR E[na move cursor right n characters --
|
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
VPA E[nd move cursor to line n cv
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
|
|
|
|
VPR E[ne move cursor down n lines --
|
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
CPL E[nF move cursor to start of line, -- (@7)
|
1993-09-09 00:32:25 +00:00
|
|
|
|
n lines up
|
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
CNL E[nE move cursor to start of line, nw
|
1993-09-09 00:32:25 +00:00
|
|
|
|
n lines down
|
|
|
|
|
|
|
|
|
|
CUP E[y;xH Move cursor to x, y cm
|
|
|
|
|
|
|
|
|
|
HVP E[y;xf Move cursor to x, y --
|
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
CBT E[nZ Move cursor back n tab stops bt (kB)
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
IL E[nL Insert n blank lines al/AL
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
ICH E[n@ Insert n blank characters ic/IC
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
DL E[nM Delete n lines dl/DL
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
DCH E[nP Delete n characters dc/DC
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
|
|
|
|
ED E[nJ Erase part or all of display: cd
|
|
|
|
|
n=0 from cursor to end of display,
|
|
|
|
|
n=1 from begin of display to cursor,
|
|
|
|
|
n=2 entire display.
|
|
|
|
|
|
|
|
|
|
EL E[nK Erase part or all of line: ce
|
|
|
|
|
n=0 from cursor to end of line,
|
|
|
|
|
n=1 from begin of line to cursor,
|
|
|
|
|
n=2 entire line.
|
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
ECH E[nX Erase n characters ec
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
SU E[nS Scroll display n lines up (forward) sf/SF
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1995-01-13 00:14:52 +00:00
|
|
|
|
SD E[nT Scroll display n lines down (reverse) sr/SR
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SGR E[nm Set character attributes: --
|
2000-07-20 18:50:12 +00:00
|
|
|
|
n= 0 normal attribute (all off)
|
|
|
|
|
n= 1 bold (highlight)
|
|
|
|
|
n= 4 underscore (if supported by HW)
|
|
|
|
|
n= 5 blink (if supported by HW)
|
|
|
|
|
n= 7 reverse
|
|
|
|
|
n= 22 remove bold
|
|
|
|
|
n= 24 remove underscore
|
|
|
|
|
n= 25 remove blink
|
|
|
|
|
n= 27 remove reverse
|
|
|
|
|
n= 3X set ANSI foreground color
|
|
|
|
|
(see table)
|
|
|
|
|
n= 4X set ANSI background color
|
|
|
|
|
(see table)
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
|
|
|
|
X=0 black X=1 red
|
|
|
|
|
X=2 green X=3 brown
|
|
|
|
|
X=4 blue X=5 magenta
|
2000-06-05 23:50:00 +00:00
|
|
|
|
X=6 cyan X=7 light grey
|
2000-06-06 06:14:37 +00:00
|
|
|
|
X=9 reset to the normal color
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
1997-01-26 23:27:15 +00:00
|
|
|
|
-- E[s Save cursor position sc
|
|
|
|
|
|
|
|
|
|
-- E[u Restore saved cursor position rc
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
2000-06-06 00:03:38 +00:00
|
|
|
|
-- E[x Reset normal colors and attributes --
|
2000-06-05 23:01:58 +00:00
|
|
|
|
to their default values
|
|
|
|
|
|
2000-10-06 08:40:52 +00:00
|
|
|
|
-- E[nz Switch to virtual console n --
|
|
|
|
|
|
2000-06-06 00:03:38 +00:00
|
|
|
|
-- E[1;nx Set normal ANSI background color --
|
2000-06-05 23:50:00 +00:00
|
|
|
|
to n (see table)
|
2000-06-05 23:01:58 +00:00
|
|
|
|
|
2000-06-06 00:03:38 +00:00
|
|
|
|
-- E[2;nx Set normal ANSI foreground color --
|
2000-06-05 23:50:00 +00:00
|
|
|
|
to n (see table)
|
2000-06-05 23:01:58 +00:00
|
|
|
|
|
2000-06-06 00:19:51 +00:00
|
|
|
|
-- E[3;nx Set normal video attribute directly --
|
2000-06-05 23:24:37 +00:00
|
|
|
|
to n (n from 0 to 255)
|
2000-06-05 23:01:58 +00:00
|
|
|
|
|
2000-06-06 00:03:38 +00:00
|
|
|
|
-- E[5;nx Set normal ANSI reverse background --
|
2000-06-05 23:50:00 +00:00
|
|
|
|
color to n (see table)
|
2000-06-05 23:01:58 +00:00
|
|
|
|
|
2000-06-06 00:03:38 +00:00
|
|
|
|
-- E[6;nx Set normal ANSI reverse foreground --
|
2000-06-05 23:50:00 +00:00
|
|
|
|
color to n (see table)
|
|
|
|
|
|
|
|
|
|
n= 0 black n= 8 dark grey
|
|
|
|
|
n= 1 red n= 9 light red
|
|
|
|
|
n= 2 green n=10 light green
|
|
|
|
|
n= 3 brown n=11 yellow
|
|
|
|
|
n= 4 blue n=12 light blue
|
|
|
|
|
n= 5 magenta n=13 light magenta
|
|
|
|
|
n= 6 cyan n=14 light cyan
|
|
|
|
|
n= 7 light grey n=15 white
|
2000-06-05 23:01:58 +00:00
|
|
|
|
|
2000-06-06 00:19:51 +00:00
|
|
|
|
-- E[7;nx Set normal reverse video attribute --
|
2000-06-05 23:24:37 +00:00
|
|
|
|
directly to n (n from 0 to 255)
|
2000-06-05 23:01:58 +00:00
|
|
|
|
|
1993-09-09 00:32:25 +00:00
|
|
|
|
-- E[=p;dB Set bell pitch (p) and duration (d), --
|
2000-10-06 08:40:52 +00:00
|
|
|
|
pitch is in units of 840 nS,
|
1993-09-09 00:32:25 +00:00
|
|
|
|
duration is units of 0,1 S.
|
|
|
|
|
|
2000-10-06 08:40:52 +00:00
|
|
|
|
-- E[=tC Set cursor type (see table) --
|
|
|
|
|
|
|
|
|
|
t=0 normal non-blinking
|
|
|
|
|
t=1 normal blinking
|
|
|
|
|
t=2 custom non-blinking
|
|
|
|
|
t=3 custom blinking
|
|
|
|
|
|
|
|
|
|
-- E[=s;eC Set custom cursor shape, where --
|
|
|
|
|
s is the starting and e is the ending
|
|
|
|
|
scanlines of the cursor.
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
2000-06-06 00:03:38 +00:00
|
|
|
|
-- E[=nA Set the border color to n --
|
1993-09-09 00:32:25 +00:00
|
|
|
|
(see table) (if supported by HW)
|
|
|
|
|
|
2000-06-06 00:03:38 +00:00
|
|
|
|
-- E[=nF Set normal foreground color to n --
|
1993-09-09 00:32:25 +00:00
|
|
|
|
(see table)
|
|
|
|
|
|
2000-06-06 00:03:38 +00:00
|
|
|
|
-- E[=nG Set normal background color to n --
|
1993-09-09 00:32:25 +00:00
|
|
|
|
(see table)
|
|
|
|
|
|
2000-06-06 00:03:38 +00:00
|
|
|
|
-- E[=nH Set normal reverse foreground color --
|
2000-06-05 23:50:00 +00:00
|
|
|
|
to n (see table)
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
2000-06-06 00:03:38 +00:00
|
|
|
|
-- E[=nI Set normal reverse background color --
|
2000-06-05 23:50:00 +00:00
|
|
|
|
to n (see table)
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
2000-06-05 23:50:00 +00:00
|
|
|
|
n= 0 black n= 8 dark grey
|
|
|
|
|
n= 1 blue n= 9 light blue
|
|
|
|
|
n= 2 green n=10 light green
|
|
|
|
|
n= 3 cyan n=11 light cyan
|
|
|
|
|
n= 4 red n=12 light red
|
|
|
|
|
n= 5 magenta n=13 light magenta
|
|
|
|
|
n= 6 brown n=14 yellow
|
|
|
|
|
n= 7 light grey n=15 white
|
1993-09-09 00:32:25 +00:00
|
|
|
|
|
|
|
|
|
note: the first E in the sequences stands for ESC (0x1b)
|
|
|
|
|
.Ed
|
1998-03-12 07:31:21 +00:00
|
|
|
|
.Sh AUTHORS
|
|
|
|
|
.An S<EFBFBD>ren Schmidt Aq sos@FreeBSD.org
|