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