screen.4 revision 735
158551Skris.Dd April 7, 1993
258551Skris.Dt SCREEN 4
358551Skris.Os FreeBSD
458551Skris.Sh NAME
558551Skris.Nm screen
658551Skris.Nd pc display interface
758551Skris.Sh DESCRIPTION
858551Skris
958551SkrisAccess to the
1058551Skris.Ar virtual consoles 
1158551Skrisare obtained through the device files
1258551Skristtyv0 - ttyvb in /dev.
1358551SkrisEach of these files correspond to a seperate
1458551Skrisvirtual console.
1558551SkrisAll virtual console devices can be open at once, but only one is 
1658551Skrisactive at a time. The active virtual console "owns" the keyboard and
1758551Skrisdisplay screen.
1858551Skris.Pp
1958551SkrisOutput to a virtual console that not currently is on the display is
2058551Skrissaved in a buffer that holds a "screenfull" (normally 25) lines.
2158551SkrisAny output written to 
2258551Skris.Ar /dev/console 
2358551Skris(the original console device) is echoed to /dev/ttyv0.
2458551Skris.Pp
2558551SkrisTo switch between the virtual consoles one uses the sequence 
2658551Skris.Ar ALT+Fn
2758551Skris, which means hold down ALT and press one of the function keys. The 
2858551Skrisvirtual console with the same number as the function key is then
2958551Skrisselected as the current virtual console, and given exclusive use of
3058551Skristhe keyboard and display. This switch sequence can be changed via
3158551Skristhe keyboard mapping ioctl call (see keyboard.man)
3258551Skris.Pp
3358551SkrisThe number of virtual consoles is changeable in the system config 
3458551Skrisfile, and need recompilation of the kernel to take any effect. The
3558551Skrisdefault is 12.
3658551Skris
3758551SkrisThe console allows entering values that are not physically
3858551Skrispresent on the keyboard via a special keysequence.
3958551SkrisTo use this facility press and hold down ALT,
4058551Skristhen enter a decimal number from 0-255 via the numerical keypad, then
4158551Skrisrelease ALT. The entered value is then used as the ASCII value for one
4258551Skrischaracter. This way it is possible to enter any ASCII value.
4358551Skris
4458551SkrisThe console understands a subset of the ANSI x3.64 character 
4558551Skrissequences. For compatibility with the old pccons, the PC3 character
4658551Skrissequences is also supported.
4758551Skris.Pp
4858551Skris.Bd -literal 
4958551SkrisANSI	Seq	Function				Termcap entry
5058551Skris======= ======= =====================================   ==============
5158551Skris
5258551SkrisCUU	E[nA	move cursor up n lines			up (ku)
5358551Skris
5458551SkrisCUD	E[nB	move cursor down n lines		do (kd)
5558551Skris
5658551SkrisCUF	E[nC	move cursor right n characters		nd (kr)
5758551Skris
5858551SkrisCUB	E[nD	move cursor left n characters		bs (kl)
5958551Skris
6058551SkrisHPA	E[n`	move cursor character position n	--
6158551Skris
6258551SkrisHPR	E[na	move cursor right n characters 		--
63
64VPA	E[nd	move cursor to line n			--
65
66VPR	E[ne	move cursor down n lines		--
67
68CPL	E[nF	move cursor to start of line,		--
69		n lines up
70
71CNL	E[nF	move cursor to start of line,		--
72		n lines down
73
74CUP	E[y;xH	Move cursor to x, y			cm
75
76HVP	E[y;xf	Move cursor to x, y			--
77
78CBT	E[nZ	Move cursor back n tab stops		bt
79
80IL	E[nL	Insert n blank lines			al
81
82ICH	E[n@	Insert n blank characters		ic
83
84DL	E[nM	Delete n lines				dl
85
86DCH	E[nP	Delete n characters			dc
87
88ED	E[nJ	Erase part or all of display:		cd
89		n=0 from cursor to end of display,
90		n=1 from begin of display to cursor,
91		n=2 entire display.
92
93EL	E[nK	Erase part or all of line:		ce
94		n=0 from cursor to end of line,
95		n=1 from begin of line to cursor,
96		n=2 entire line.
97
98ECH	E[nX	Erase n characters			--
99
100SU	E[nS	Scroll display n lines up (forward)	sf
101
102SD	E[nT	Scroll display n lines down (reverse)	sr
103
104
105SGR	E[nm	Set character attributes:		--
106		n= 0 normal attribute (all off)
107		n= 1 bold (highlight)
108		n= 4 underscore (if supported by HW)
109		n= 5 blink (if supported by HW)
110		n= 7 reverse 
111		n=3X set foreground color (see table)
112		n=4X set background color (see table)
113
114		   X=0 black 	X=1 red
115		   X=2 green	X=3 brown
116		   X=4 blue	X=5 magenta
117		   X=6 cyan 	X=7 white
118
119
120--	E[=p;dB	Set bell pitch (p) and duration (d),	--
121			picth is in units of 840 nS, 
122			duration is units of 0,1 S.
123
124--	E[=s:eC	Set cursor start and end scanline,	--
125			start on line s, end on line e.
126
127--	E[=nA	Set the border color to color n
128		(see table) (if supported by HW)
129
130--	E[=cF	set normal foreground color to n 	--
131		(see table)
132
133--	E[=cG	set normal background color to n 	--
134		(see table)
135
136--	E[=cH	set reverse foreground color to n 	--
137		(see table)
138
139--	E[=cI	set reverse background color to n 	--
140		(see table)
141
142		   n= 0 black	n= 8 grey
143		   n= 1 blue	n= 9 light blue
144		   n= 2 green	n=10 light green
145		   n= 3 cyan	n=11 light cyan
146		   n= 4 red	n=12 light red
147		   n= 5 magenta n=13 light magenta
148		   n= 6 brown	n=14 yellow
149		   n= 7 white	n=15 light white
150
151note: the first E in the sequences stands for ESC (0x1b)
152
153.Ed
154.Pp
155.Sh AUTHOR
156 S_ren Schmidt 
157 Email: (baukno@login.dkuug.dk -or- sos@kmd-ac.dk)
158