1 | .\" Copyright (c) 1980 Regents of the University of California.
|
---|
2 | .\" All rights reserved. The Berkeley software License Agreement
|
---|
3 | .\" specifies the terms and conditions for redistribution.
|
---|
4 | .\"
|
---|
5 | .\" @(#)termcap.5 6.4 (Berkeley) 5/15/86
|
---|
6 | .\"
|
---|
7 | .tr ||
|
---|
8 | .tr *\(**
|
---|
9 | .TH TERMCAP 5 "1 November 1985"
|
---|
10 | .UC
|
---|
11 | .SH NAME
|
---|
12 | termcap \- terminal capability data base
|
---|
13 | .SH SYNOPSIS
|
---|
14 | .B /etc/termcap
|
---|
15 | .SH DESCRIPTION
|
---|
16 | .B Termcap\^
|
---|
17 | is a data base describing terminals,
|
---|
18 | used,
|
---|
19 | .IR e.g. ,
|
---|
20 | by
|
---|
21 | .BR vi\^ (1)
|
---|
22 | and
|
---|
23 | .BR curses\^ (3).
|
---|
24 | Terminals are described in
|
---|
25 | .B termcap\^
|
---|
26 | by giving a set of capabilities that they have and by describing
|
---|
27 | how operations are performed.
|
---|
28 | Padding requirements and initialization sequences
|
---|
29 | are included in
|
---|
30 | .BR termcap\^ .
|
---|
31 | .PP
|
---|
32 | Entries in
|
---|
33 | .B termcap\^
|
---|
34 | consist of a number of `:'-separated fields.
|
---|
35 | The first entry for each terminal gives the names that are known for the
|
---|
36 | terminal, separated by `|' characters.
|
---|
37 | The first name is always two characters
|
---|
38 | long and is used by older systems which store the terminal type
|
---|
39 | in a 16-bit word in a system-wide data base.
|
---|
40 | The second name given is the most common abbreviation for the terminal,
|
---|
41 | the last name given should be a long name fully identifying the terminal,
|
---|
42 | and all others are understood as synonyms for the terminal name.
|
---|
43 | All names but the first and last
|
---|
44 | should be in lower case and contain no blanks;
|
---|
45 | the last name may well contain
|
---|
46 | upper case and blanks for readability.
|
---|
47 | .PP
|
---|
48 | Terminal names (except for the last, verbose entry)
|
---|
49 | should be chosen using the following conventions.
|
---|
50 | The particular piece of hardware making up the terminal
|
---|
51 | should have a root name chosen, thus \*(lqhp2621\*(rq.
|
---|
52 | This name should not contain hyphens.
|
---|
53 | Modes that the hardware can be in
|
---|
54 | or user preferences
|
---|
55 | should be indicated by appending a hyphen and an indicator of the mode.
|
---|
56 | Therefore, a \*(lqvt100\*(rq in 132-column mode would be \*(lqvt100-w\*(rq.
|
---|
57 | The following suffixes should be used where possible:
|
---|
58 | .sp
|
---|
59 | .ta
|
---|
60 | .if t .ta \w'\fBSuffix\fP\ \ \ 'u +\w'With automatic margins (usually default)\ \ 'u
|
---|
61 | .if n .ta \w'Suffix\ \ \ 'u +\w'With automatic margins (usually default)\ \ 'u
|
---|
62 | .nf
|
---|
63 | .if t .nr Xx \n(.lu-\n(.i-\w'\fBSuffix\fP\ \ \ With automatic margins (usually default)\ \ vt100-am'u
|
---|
64 | .if t .in +\n(Xxu/2u
|
---|
65 | \fBSuffix Meaning Example\fP
|
---|
66 | -w Wide mode (more than 80 columns) vt100-w
|
---|
67 | -am With automatic margins (usually default) vt100-am
|
---|
68 | -nam Without automatic margins vt100-nam
|
---|
69 | -\fIn\fP Number of lines on the screen aaa-60
|
---|
70 | -na No arrow keys (leave them in local) concept100-na
|
---|
71 | -\fIn\^\fPp Number of pages of memory concept100-4p
|
---|
72 | -rv Reverse video concept100-rv
|
---|
73 | .fi
|
---|
74 | .SH CAPABILITIES
|
---|
75 | .PP
|
---|
76 | The characters in the
|
---|
77 | .B Notes
|
---|
78 | field in the table have the following meanings
|
---|
79 | (more than one may apply to a capability):
|
---|
80 | .PP
|
---|
81 | .ta
|
---|
82 | .ta \w'N\ \ \ 'u
|
---|
83 | .nr fi \w'N\ \ \ '
|
---|
84 | .in +\n(fiu
|
---|
85 | .ti -\n(fiu
|
---|
86 | N indicates numeric parameter(s)
|
---|
87 | .ti -\n(fiu
|
---|
88 | P indicates that padding may be specified
|
---|
89 | .ti -\n(fiu
|
---|
90 | * indicates that padding may be based on the number of lines affected
|
---|
91 | .ti -\n(fiu
|
---|
92 | o indicates capability is obsolete
|
---|
93 | .in +\n(fiu
|
---|
94 | .PP
|
---|
95 | \*(lqObsolete\*(rq capabilities have no
|
---|
96 | .B terminfo\^
|
---|
97 | equivalents,
|
---|
98 | since they were considered useless,
|
---|
99 | or are subsumed by other capabilities.
|
---|
100 | New software should not rely on them at all.
|
---|
101 | .PP
|
---|
102 | .if t .ta \w'\fBName \fP'u +\w'\fBType \fP'u +\w'\fBNotes \fP'u
|
---|
103 | .if n .ta \w'Name 'u +\w'Type 'u +\w'Notes 'u \" Cawf troubled by \w'\fB
|
---|
104 | .if t .nr fi \w'\fBName Type Notes \fP'
|
---|
105 | .if n .nr fi \w'Name Type Notes '
|
---|
106 | .in +\n(fiu
|
---|
107 | .ti -\n(fiu
|
---|
108 | \fBName Type Notes Description\fP
|
---|
109 | .ti -\n(fiu
|
---|
110 | ae str (P) End alternate character set
|
---|
111 | .ti -\n(fiu
|
---|
112 | AL str (NP*) Add \fIn\^\fP new blank lines
|
---|
113 | .ti -\n(fiu
|
---|
114 | al str (P*) Add new blank line
|
---|
115 | .ti -\n(fiu
|
---|
116 | am bool Terminal has automatic margins
|
---|
117 | .ti -\n(fiu
|
---|
118 | as str (P) Start alternate character set
|
---|
119 | .ti -\n(fiu
|
---|
120 | bc str (o) Backspace if not \fB^H\fP
|
---|
121 | .ti -\n(fiu
|
---|
122 | bl str (P) Audible signal (bell)
|
---|
123 | .ti -\n(fiu
|
---|
124 | bs bool (o) Terminal can backspace with \fB^H\fP
|
---|
125 | .ti -\n(fiu
|
---|
126 | bt str (P) Back tab
|
---|
127 | .ti -\n(fiu
|
---|
128 | bw bool \fBle\fP (backspace) wraps from column 0 to last column
|
---|
129 | .ti -\n(fiu
|
---|
130 | CC str Terminal settable command character in prototype
|
---|
131 | .ti -\n(fiu
|
---|
132 | cd str (P*) Clear to end of display
|
---|
133 | .ti -\n(fiu
|
---|
134 | ce str (P) Clear to end of line
|
---|
135 | .ti -\n(fiu
|
---|
136 | ch str (NP) Set cursor column (horizontal position)
|
---|
137 | .ti -\n(fiu
|
---|
138 | cl str (P*) Clear screen and home cursor
|
---|
139 | .ti -\n(fiu
|
---|
140 | CM str (NP) Memory-relative cursor addressing
|
---|
141 | .ti -\n(fiu
|
---|
142 | cm str (NP) Screen-relative cursor motion
|
---|
143 | .ti -\n(fiu
|
---|
144 | co num Number of columns in a line (See BUGS section below)
|
---|
145 | .ti -\n(fiu
|
---|
146 | cr str (P) Carriage return
|
---|
147 | .ti -\n(fiu
|
---|
148 | cs str (NP) Change scrolling region (VT100)
|
---|
149 | .ti -\n(fiu
|
---|
150 | ct str (P) Clear all tab stops
|
---|
151 | .ti -\n(fiu
|
---|
152 | cv str (NP) Set cursor row (vertical position)
|
---|
153 | .ti -\n(fiu
|
---|
154 | da bool Display may be retained above the screen
|
---|
155 | .ti -\n(fiu
|
---|
156 | dB num (o) Milliseconds of \fBbs\fP delay needed (default 0)
|
---|
157 | .ti -\n(fiu
|
---|
158 | db bool Display may be retained below the screen
|
---|
159 | .ti -\n(fiu
|
---|
160 | DC str (NP*) Delete \fIn\^\fP characters
|
---|
161 | .ti -\n(fiu
|
---|
162 | dC num (o) Milliseconds of \fBcr\fP delay needed (default 0)
|
---|
163 | .ti -\n(fiu
|
---|
164 | dc str (P*) Delete character
|
---|
165 | .ti -\n(fiu
|
---|
166 | dF num (o) Milliseconds of \fBff\fP delay needed (default 0)
|
---|
167 | .ti -\n(fiu
|
---|
168 | DL str (NP*) Delete \fIn\^\fP lines
|
---|
169 | .ti -\n(fiu
|
---|
170 | dl str (P*) Delete line
|
---|
171 | .ti -\n(fiu
|
---|
172 | dm str Enter delete mode
|
---|
173 | .ti -\n(fiu
|
---|
174 | dN num (o) Milliseconds of \fBnl\fP delay needed (default 0)
|
---|
175 | .ti -\n(fiu
|
---|
176 | DO str (NP*) Move cursor down \fIn\^\fP lines
|
---|
177 | .ti -\n(fiu
|
---|
178 | do str Down one line
|
---|
179 | .ti -\n(fiu
|
---|
180 | ds str Disable status line
|
---|
181 | .ti -\n(fiu
|
---|
182 | dT num (o) Milliseconds of horizontal tab delay needed (default 0)
|
---|
183 | .ti -\n(fiu
|
---|
184 | dV num (o) Milliseconds of vertical tab delay needed (default 0)
|
---|
185 | .ti -\n(fiu
|
---|
186 | ec str (NP) Erase \fIn\^\fP characters
|
---|
187 | .ti -\n(fiu
|
---|
188 | ed str End delete mode
|
---|
189 | .ti -\n(fiu
|
---|
190 | ei str End insert mode
|
---|
191 | .ti -\n(fiu
|
---|
192 | eo bool Can erase overstrikes with a blank
|
---|
193 | .ti -\n(fiu
|
---|
194 | EP bool (o) Even parity
|
---|
195 | .ti -\n(fiu
|
---|
196 | es bool Escape can be used on the status line
|
---|
197 | .ti -\n(fiu
|
---|
198 | ff str (P*) Hardcopy terminal page eject
|
---|
199 | .ti -\n(fiu
|
---|
200 | fs str Return from status line
|
---|
201 | .ti -\n(fiu
|
---|
202 | gn bool Generic line type (\fIe.g.\fP dialup, switch)
|
---|
203 | .ti -\n(fiu
|
---|
204 | hc bool Hardcopy terminal
|
---|
205 | .ti -\n(fiu
|
---|
206 | HD bool (o) Half-duplex
|
---|
207 | .ti -\n(fiu
|
---|
208 | hd str Half-line down (forward 1/2 linefeed)
|
---|
209 | .ti -\n(fiu
|
---|
210 | ho str (P) Home cursor
|
---|
211 | .ti -\n(fiu
|
---|
212 | hs bool Has extra \*(lqstatus line\*(rq
|
---|
213 | .ti -\n(fiu
|
---|
214 | hu str Half-line up (reverse 1/2 linefeed)
|
---|
215 | .ti -\n(fiu
|
---|
216 | hz bool Cannot print ~s (Hazeltine)
|
---|
217 | .ti -\n(fiu
|
---|
218 | i1-i3 str Terminal initialization strings (\fBterminfo\^\fP only)
|
---|
219 | .ti -\n(fiu
|
---|
220 | IC str (NP*) Insert \fIn\^\fP blank characters
|
---|
221 | .ti -\n(fiu
|
---|
222 | ic str (P*) Insert character
|
---|
223 | .ti -\n(fiu
|
---|
224 | if str Name of file containing initialization string
|
---|
225 | .ti -\n(fiu
|
---|
226 | im str Enter insert mode
|
---|
227 | .ti -\n(fiu
|
---|
228 | in bool Insert mode distinguishes nulls
|
---|
229 | .ti -\n(fiu
|
---|
230 | iP str Pathname of program for initialization (\fBterminfo\^\fP only)
|
---|
231 | .ti -\n(fiu
|
---|
232 | ip str (P*) Insert pad after character inserted
|
---|
233 | .ti -\n(fiu
|
---|
234 | is str Terminal initialization string (\fBtermcap\^\fP only)
|
---|
235 | .ti -\n(fiu
|
---|
236 | it num Tabs initially every \fIn\^\fP positions
|
---|
237 | .ti -\n(fiu
|
---|
238 | K1 str Sent by keypad upper left
|
---|
239 | .ti -\n(fiu
|
---|
240 | K2 str Sent by keypad upper right
|
---|
241 | .ti -\n(fiu
|
---|
242 | K3 str Sent by keypad center
|
---|
243 | .ti -\n(fiu
|
---|
244 | K4 str Sent by keypad lower left
|
---|
245 | .ti -\n(fiu
|
---|
246 | K5 str Sent by keypad lower right
|
---|
247 | .ti -\n(fiu
|
---|
248 | k0-k9 str Sent by function keys 0-9
|
---|
249 | .ti -\n(fiu
|
---|
250 | kA str Sent by insert-line key
|
---|
251 | .ti -\n(fiu
|
---|
252 | ka str Sent by clear-all-tabs key
|
---|
253 | .ti -\n(fiu
|
---|
254 | kb str Sent by backspace key
|
---|
255 | .ti -\n(fiu
|
---|
256 | kC str Sent by clear-screen or erase key
|
---|
257 | .ti -\n(fiu
|
---|
258 | kD str Sent by delete-character key
|
---|
259 | .ti -\n(fiu
|
---|
260 | kd str Sent by down-arrow key
|
---|
261 | .ti -\n(fiu
|
---|
262 | kE str Sent by clear-to-end-of-line key
|
---|
263 | .ti -\n(fiu
|
---|
264 | ke str Out of \*(lqkeypad transmit\*(rq mode
|
---|
265 | .ti -\n(fiu
|
---|
266 | kF str Sent by scroll-forward/down key
|
---|
267 | .ti -\n(fiu
|
---|
268 | kH str Sent by home-down key
|
---|
269 | .ti -\n(fiu
|
---|
270 | kh str Sent by home key
|
---|
271 | .ti -\n(fiu
|
---|
272 | kI str Sent by insert-character or enter-insert-mode key
|
---|
273 | .ti -\n(fiu
|
---|
274 | kL str Sent by delete-line key
|
---|
275 | .ti -\n(fiu
|
---|
276 | kl str Sent by left-arrow key
|
---|
277 | .ti -\n(fiu
|
---|
278 | kM str Sent by insert key while in insert mode
|
---|
279 | .ti -\n(fiu
|
---|
280 | km bool Has a \*(lqmeta\*(rq key (shift, sets parity bit)
|
---|
281 | .ti -\n(fiu
|
---|
282 | kN str Sent by next-page key
|
---|
283 | .ti -\n(fiu
|
---|
284 | kn num (o) Number of function (\fBk0\fP\-\fBk9\fP) keys (default 0)
|
---|
285 | .ti -\n(fiu
|
---|
286 | ko str (o) Termcap entries for other non-function keys
|
---|
287 | .ti -\n(fiu
|
---|
288 | kP str Sent by previous-page key
|
---|
289 | .ti -\n(fiu
|
---|
290 | kR str Sent by scroll-backward/up key
|
---|
291 | .ti -\n(fiu
|
---|
292 | kr str Sent by right-arrow key
|
---|
293 | .ti -\n(fiu
|
---|
294 | kS str Sent by clear-to-end-of-screen key
|
---|
295 | .ti -\n(fiu
|
---|
296 | ks str Put terminal in \*(lqkeypad transmit\*(rq mode
|
---|
297 | .ti -\n(fiu
|
---|
298 | kT str Sent by set-tab key
|
---|
299 | .ti -\n(fiu
|
---|
300 | kt str Sent by clear-tab key
|
---|
301 | .ti -\n(fiu
|
---|
302 | ku str Sent by up-arrow key
|
---|
303 | .ti -\n(fiu
|
---|
304 | l0-l9 str Labels on function keys if not \*(lqf\fIn\^\fP\*(rq
|
---|
305 | .ti -\n(fiu
|
---|
306 | LC bool (o) Lower-case only
|
---|
307 | .ti -\n(fiu
|
---|
308 | LE str (NP) Move cursor left \fIn\^\fP positions
|
---|
309 | .ti -\n(fiu
|
---|
310 | le str (P) Move cursor left one position
|
---|
311 | .ti -\n(fiu
|
---|
312 | li num Number of lines on screen or page (See BUGS section below)
|
---|
313 | .ti -\n(fiu
|
---|
314 | ll str Last line, first column
|
---|
315 | .ti -\n(fiu
|
---|
316 | lm num Lines of memory if > \fBli\fP (0 means varies)
|
---|
317 | .ti -\n(fiu
|
---|
318 | ma str (o) Arrow key map (used by \fBvi\^\fP version 2 only)
|
---|
319 | .ti -\n(fiu
|
---|
320 | mb str Turn on blinking attribute
|
---|
321 | .ti -\n(fiu
|
---|
322 | md str Turn on bold (extra bright) attribute
|
---|
323 | .ti -\n(fiu
|
---|
324 | me str Turn off all attributes
|
---|
325 | .ti -\n(fiu
|
---|
326 | mh str Turn on half-bright attribute
|
---|
327 | .ti -\n(fiu
|
---|
328 | mi bool Safe to move while in insert mode
|
---|
329 | .ti -\n(fiu
|
---|
330 | mk str Turn on blank attribute (characters invisible)
|
---|
331 | .ti -\n(fiu
|
---|
332 | ml str (o) Memory lock on above cursor
|
---|
333 | .ti -\n(fiu
|
---|
334 | mm str Turn on \*(lqmeta mode\*(rq (8th bit)
|
---|
335 | .ti -\n(fiu
|
---|
336 | mo str Turn off \*(lqmeta mode\*(rq
|
---|
337 | .ti -\n(fiu
|
---|
338 | mp str Turn on protected attribute
|
---|
339 | .ti -\n(fiu
|
---|
340 | mr str Turn on reverse-video attibute
|
---|
341 | .ti -\n(fiu
|
---|
342 | ms bool Safe to move in standout modes
|
---|
343 | .ti -\n(fiu
|
---|
344 | mu str (o) Memory unlock (turn off memory lock)
|
---|
345 | .ti -\n(fiu
|
---|
346 | nc bool (o) No correctly-working \fBcr\fP (Datamedia 2500, Hazeltine 2000)
|
---|
347 | .ti -\n(fiu
|
---|
348 | nd str Non-destructive space (cursor right)
|
---|
349 | .ti -\n(fiu
|
---|
350 | NL bool (o) \fB\\n\fP is newline, not line feed
|
---|
351 | .ti -\n(fiu
|
---|
352 | nl str (o) Newline character if not \fB\\n\fP
|
---|
353 | .ti -\n(fiu
|
---|
354 | ns bool (o) Terminal is a \s-1CRT\s0 but doesn't scroll
|
---|
355 | .ti -\n(fiu
|
---|
356 | nw str (P) Newline (behaves like \fBcr\fP followed by \fBdo\fP)
|
---|
357 | .ti -\n(fiu
|
---|
358 | OP bool (o) Odd parity
|
---|
359 | .ti -\n(fiu
|
---|
360 | os bool Terminal overstrikes
|
---|
361 | .ti -\n(fiu
|
---|
362 | pb num Lowest baud where delays are required
|
---|
363 | .ti -\n(fiu
|
---|
364 | pc str Pad character (default \s-2NUL\s0)
|
---|
365 | .ti -\n(fiu
|
---|
366 | pf str Turn off the printer
|
---|
367 | .ti -\n(fiu
|
---|
368 | pk str Program function key \fIn\^\fP to type string \fIs\fP (\fBterminfo\^\fP only)
|
---|
369 | .ti -\n(fiu
|
---|
370 | pl str Program function key \fIn\^\fP to execute string \fIs\fP (\fBterminfo\^\fP only)
|
---|
371 | .ti -\n(fiu
|
---|
372 | pO str (N) Turn on the printer for \fIn\^\fP bytes
|
---|
373 | .ti -\n(fiu
|
---|
374 | po str Turn on the printer
|
---|
375 | .ti -\n(fiu
|
---|
376 | ps str Print contents of the screen
|
---|
377 | .ti -\n(fiu
|
---|
378 | pt bool (o) Has hardware tabs (may need to be set with \fBis\fP)
|
---|
379 | .ti -\n(fiu
|
---|
380 | px str Program function key \fIn\^\fP to transmit string \fIs\fP (\fBterminfo\^\fP only)
|
---|
381 | .ti -\n(fiu
|
---|
382 | r1-r3 str Reset terminal completely to sane modes (\fBterminfo\^\fP only)
|
---|
383 | .ti -\n(fiu
|
---|
384 | rc str (P) Restore cursor to position of last \fBsc\fP
|
---|
385 | .ti -\n(fiu
|
---|
386 | rf str Name of file containing reset codes
|
---|
387 | .ti -\n(fiu
|
---|
388 | RI str (NP) Move cursor right \fIn\^\fP positions
|
---|
389 | .ti -\n(fiu
|
---|
390 | rp str (NP*) Repeat character \fIc n\^\fP times
|
---|
391 | .ti -\n(fiu
|
---|
392 | rs str Reset terminal completely to sane modes (\fBtermcap\^\fP only)
|
---|
393 | .ti -\n(fiu
|
---|
394 | sa str (NP) Define the video attributes
|
---|
395 | .ti -\n(fiu
|
---|
396 | sc str (P) Save cursor position
|
---|
397 | .ti -\n(fiu
|
---|
398 | se str End standout mode
|
---|
399 | .ti -\n(fiu
|
---|
400 | SF str (NP*) Scroll forward \fIn\^\fP lines
|
---|
401 | .ti -\n(fiu
|
---|
402 | sf str (P) Scroll text up
|
---|
403 | .ti -\n(fiu
|
---|
404 | sg num Number of garbage chars left by \fBso\fP or \fBse\fP (default 0)
|
---|
405 | .ti -\n(fiu
|
---|
406 | so str Begin standout mode
|
---|
407 | .ti -\n(fiu
|
---|
408 | SR str (NP*) Scroll backward \fIn\^\fP lines
|
---|
409 | .ti -\n(fiu
|
---|
410 | sr str (P) Scroll text down
|
---|
411 | .ti -\n(fiu
|
---|
412 | st str Set a tab in all rows, current column
|
---|
413 | .ti -\n(fiu
|
---|
414 | ta str (P) Tab to next 8-position hardware tab stop
|
---|
415 | .ti -\n(fiu
|
---|
416 | tc str Entry of similar terminal \- must be last
|
---|
417 | .ti -\n(fiu
|
---|
418 | te str String to end programs that use \fBtermcap\fP
|
---|
419 | .ti -\n(fiu
|
---|
420 | ti str String to begin programs that use \fBtermcap\fP
|
---|
421 | .ti -\n(fiu
|
---|
422 | ts str (N) Go to status line, column \fIn\^\fP
|
---|
423 | .ti -\n(fiu
|
---|
424 | UC bool (o) Upper-case only
|
---|
425 | .ti -\n(fiu
|
---|
426 | uc str Underscore one character and move past it
|
---|
427 | .ti -\n(fiu
|
---|
428 | ue str End underscore mode
|
---|
429 | .ti -\n(fiu
|
---|
430 | ug num Number of garbage chars left by \fBus\fP or \fBue\fP (default 0)
|
---|
431 | .ti -\n(fiu
|
---|
432 | ul bool Underline character overstrikes
|
---|
433 | .ti -\n(fiu
|
---|
434 | UP str (NP*) Move cursor up \fIn\^\fP lines
|
---|
435 | .ti -\n(fiu
|
---|
436 | up str Upline (cursor up)
|
---|
437 | .ti -\n(fiu
|
---|
438 | us str Start underscore mode
|
---|
439 | .ti -\n(fiu
|
---|
440 | vb str Visible bell (must not move cursor)
|
---|
441 | .ti -\n(fiu
|
---|
442 | ve str Make cursor appear normal (undo \fBvs\fP/\fBvi\fP)
|
---|
443 | .ti -\n(fiu
|
---|
444 | vi str Make cursor invisible
|
---|
445 | .ti -\n(fiu
|
---|
446 | vs str Make cursor very visible
|
---|
447 | .ti -\n(fiu
|
---|
448 | vt num Virtual terminal number (not supported on all systems)
|
---|
449 | .ti -\n(fiu
|
---|
450 | wi str (N) Set current window
|
---|
451 | .ti -\n(fiu
|
---|
452 | ws num Number of columns in status line
|
---|
453 | .ti -\n(fiu
|
---|
454 | xb bool Beehive (f1=\s-2ESC\s0, f2=^C)
|
---|
455 | .ti -\n(fiu
|
---|
456 | xn bool Newline ignored after 80 cols (Concept)
|
---|
457 | .ti -\n(fiu
|
---|
458 | xo bool Terminal uses xoff/xon (\s-2DC3\s0/\s-2DC1\s0) handshaking
|
---|
459 | .ti -\n(fiu
|
---|
460 | xr bool (o) Return acts like \fBce cr nl\fP (Delta Data)
|
---|
461 | .ti -\n(fiu
|
---|
462 | xs bool Standout not erased by overwriting (Hewlett-Packard)
|
---|
463 | .ti -\n(fiu
|
---|
464 | xt bool Tabs ruin, magic \fBso\fP char (Teleray 1061)
|
---|
465 | .ti -\n(fiu
|
---|
466 | xx bool (o) Tektronix 4025 insert-line
|
---|
467 | .in -\n(fiu
|
---|
468 | .PP
|
---|
469 | .B A Sample Entry
|
---|
470 | .PP
|
---|
471 | The following entry, which describes the Concept\-100, is among the more
|
---|
472 | complex entries in the
|
---|
473 | .B termcap\^
|
---|
474 | file as of this writing.
|
---|
475 | .PP
|
---|
476 | .nf
|
---|
477 | .if t .ta 8n +8n
|
---|
478 | .if n .ta 2n +2n
|
---|
479 | ca\||\|concept100\||\|c100\||\|concept\||\|c104\||\|concept100-4p\||\|HDS Concept\-100:\e
|
---|
480 | :al=3*\eE^R:am:bl=^G:cd=16*\eE^C:ce=16\eE^U:cl=2*^L:cm=\eEa%+ %+ :\e
|
---|
481 | :co#80:.cr=9^M:db:dc=16\eE^A:dl=3*\eE^B:do=^J:ei=\eE\e200:eo:im=\eE^P:in:\e
|
---|
482 | :ip=16*:is=\eEU\eEf\eE7\eE5\eE8\eEl\eENH\eEK\eE\e200\eEo&\e200\eEo\e47\eE:k1=\eE5:\e
|
---|
483 | :k2=\eE6:k3=\eE7:kb=^h:kd=\eE<:ke=\eEx:kh=\eE?:kl=\eE>:kr=\eE=:ks=\eEX:\e
|
---|
484 | :ku=\eE;:le=^H:li#24:mb=\eEC:me=\eEN\e200:mh=\eEE:mi:mk=\eEH:mp=\eEI:\e
|
---|
485 | :mr=\eED:nd=\eE=:pb#9600:rp=0.2*\eEr%.%+ :se=\eEd\eEe:sf=^J:so=\eEE\eED:\e
|
---|
486 | :.ta=8\et:te=\eEv \e200\e200\e200\e200\e200\e200\eEp\er\en:\e
|
---|
487 | :ti=\eEU\eEv 8p\eEp\er:ue=\eEg:ul:up=\eE;:us=\eEG:\e
|
---|
488 | :vb=\eEk\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\eEK:\e
|
---|
489 | :ve=\eEw:vs=\eEW:vt#8:xn:\e
|
---|
490 | :bs:cr=^M:dC#9:dT#8:nl=^J:ta=^I:pt:
|
---|
491 | .fi
|
---|
492 | .PP
|
---|
493 | Entries may continue onto multiple lines by giving a \e as the last
|
---|
494 | character of a line, and empty fields
|
---|
495 | may be included for readability (here between the last field on a line
|
---|
496 | and the first field on the next).
|
---|
497 | Comments may be included on lines beginning with \*(lq#\*(rq.
|
---|
498 | .br
|
---|
499 | .ne 5
|
---|
500 | .PP
|
---|
501 | .B Types of Capabilities
|
---|
502 | .PP
|
---|
503 | Capabilities in
|
---|
504 | .B termcap\^
|
---|
505 | are of three types: Boolean capabilities,
|
---|
506 | which indicate particular features that the terminal has;
|
---|
507 | numeric capabilities,
|
---|
508 | giving the size of the display or the size of other attributes;
|
---|
509 | and string capabilities,
|
---|
510 | which give character sequences that can be used to perform particular
|
---|
511 | terminal operations.
|
---|
512 | All capabilities have two-letter codes.
|
---|
513 | For instance, the fact that
|
---|
514 | the Concept has
|
---|
515 | .I automatic margins
|
---|
516 | .RI ( i.e. ,
|
---|
517 | an automatic return and linefeed
|
---|
518 | when the end of a line is reached) is indicated by the Boolean capability
|
---|
519 | .BR am .
|
---|
520 | Hence the description of the Concept includes
|
---|
521 | .BR am .
|
---|
522 | .PP
|
---|
523 | Numeric capabilities are followed by the character `#' then the value.
|
---|
524 | In the example above
|
---|
525 | .BR co ,
|
---|
526 | which indicates the number of columns the display has,
|
---|
527 | gives the value `80' for the Concept.
|
---|
528 | .PP
|
---|
529 | Finally, string-valued capabilities, such as
|
---|
530 | .B ce
|
---|
531 | (clear-to-end-of-line
|
---|
532 | sequence) are given by the two-letter code, an `=', then a string
|
---|
533 | ending at the next following `:'.
|
---|
534 | A delay in milliseconds may appear after
|
---|
535 | the `=' in such a capability,
|
---|
536 | which causes padding characters to be supplied by
|
---|
537 | .B tputs\^
|
---|
538 | after the remainder of the string is sent to provide this delay.
|
---|
539 | The delay can be either a number,
|
---|
540 | .I e.g.
|
---|
541 | `20', or a number followed by
|
---|
542 | an `*',
|
---|
543 | .IR i.e. ,
|
---|
544 | `3*'.
|
---|
545 | An `*' indicates that the padding required is proportional
|
---|
546 | to the number of lines affected by the operation, and the amount given is
|
---|
547 | the per-affected-line padding required.
|
---|
548 | (In the case of insert-character,
|
---|
549 | the factor is still the number of
|
---|
550 | .I lines\^
|
---|
551 | affected;
|
---|
552 | this is always 1 unless the terminal has
|
---|
553 | .B in
|
---|
554 | and the software uses it.)
|
---|
555 | When an `*' is specified, it is sometimes useful to give a delay of the form
|
---|
556 | `3.5' to specify a delay per line to tenths of milliseconds.
|
---|
557 | (Only one decimal place is allowed.)
|
---|
558 | .PP
|
---|
559 | A number of escape sequences are provided in the string-valued capabilities
|
---|
560 | for easy encoding of control characters there.
|
---|
561 | .B \eE
|
---|
562 | maps to an \s-2ESC\s0
|
---|
563 | character,
|
---|
564 | .B ^X
|
---|
565 | maps to a control-X for any appropriate X,
|
---|
566 | and the sequences
|
---|
567 | .B \en
|
---|
568 | .B \er
|
---|
569 | .B \et
|
---|
570 | .B \eb
|
---|
571 | .B \ef
|
---|
572 | map to linefeed, return, tab, backspace, and formfeed, respectively.
|
---|
573 | Finally, characters may be given as three octal digits after a
|
---|
574 | .BR \e ,
|
---|
575 | and the characters
|
---|
576 | .B ^
|
---|
577 | and
|
---|
578 | .B \e
|
---|
579 | may be given as
|
---|
580 | .B \e^
|
---|
581 | and
|
---|
582 | .BR \e\e .
|
---|
583 | If it is necessary to place a
|
---|
584 | .B :
|
---|
585 | in a capability it must be escaped in
|
---|
586 | octal as
|
---|
587 | .BR \e072 .
|
---|
588 | If it is necessary to place a \s-2NUL\s0
|
---|
589 | character in a string capability it
|
---|
590 | must be encoded as
|
---|
591 | .BR \e200 .
|
---|
592 | (The routines that deal with
|
---|
593 | .B termcap\^
|
---|
594 | use C strings and strip the high bits of the output very late, so that
|
---|
595 | a
|
---|
596 | .B \e200
|
---|
597 | comes out as a
|
---|
598 | .B \e000
|
---|
599 | would.)
|
---|
600 | .PP
|
---|
601 | Sometimes individual capabilities must be commented out.
|
---|
602 | To do this, put a period before the capability name.
|
---|
603 | For example, see the first
|
---|
604 | .B cr
|
---|
605 | and
|
---|
606 | .B ta
|
---|
607 | in the example above.
|
---|
608 | .br
|
---|
609 | .ne 5
|
---|
610 | .PP
|
---|
611 | .B Preparing Descriptions
|
---|
612 | .PP
|
---|
613 | We now outline how to prepare descriptions of terminals.
|
---|
614 | The most effective way to prepare a terminal description is by imitating
|
---|
615 | the description of a similar terminal in
|
---|
616 | .B termcap\^
|
---|
617 | and to build up a description gradually, using partial descriptions
|
---|
618 | with
|
---|
619 | .B vi\^
|
---|
620 | to check that they are correct.
|
---|
621 | Be aware that a very unusual terminal may expose deficiencies in
|
---|
622 | the ability of the
|
---|
623 | .B termcap\^
|
---|
624 | file to describe it
|
---|
625 | or bugs in
|
---|
626 | .BR vi\^ .
|
---|
627 | To easily test a new terminal description you can set the environment variable
|
---|
628 | .B
|
---|
629 | .SM TERMCAP
|
---|
630 | to the absolute pathname of a file containing the description you are working
|
---|
631 | on and programs will look there rather than in
|
---|
632 | .BR /etc/termcap\^ .
|
---|
633 | .B
|
---|
634 | .SM TERMCAP
|
---|
635 | can also be set to the
|
---|
636 | .B termcap\^
|
---|
637 | entry itself
|
---|
638 | to avoid reading the file when starting up a program.
|
---|
639 | .PP
|
---|
640 | To get the padding for insert-line right
|
---|
641 | (if the terminal manufacturer did not document it),
|
---|
642 | a severe test is to use
|
---|
643 | .B vi\^
|
---|
644 | to edit
|
---|
645 | .B /etc/passwd\^
|
---|
646 | at 9600 baud, delete roughly 16 lines from the middle of the screen,
|
---|
647 | then hit the `u' key several times quickly.
|
---|
648 | If the display messes up, more padding is usually needed.
|
---|
649 | A similar test can be used for insert-character.
|
---|
650 | .br
|
---|
651 | .ne 5
|
---|
652 | .PP
|
---|
653 | .B Basic Capabilities
|
---|
654 | .PP
|
---|
655 | The number of columns on each line of the display is given by the
|
---|
656 | .B co
|
---|
657 | numeric capability.
|
---|
658 | If the display is a \s-1CRT\s0, then the
|
---|
659 | number of lines on the screen is given by the
|
---|
660 | .B li
|
---|
661 | capability.
|
---|
662 | If the display wraps around to the beginning of the next line when
|
---|
663 | the cursor reaches the right margin, then it should have the
|
---|
664 | .B am
|
---|
665 | capability.
|
---|
666 | If the terminal can clear its screen,
|
---|
667 | the code to do this is given by the
|
---|
668 | .B cl
|
---|
669 | string capability.
|
---|
670 | If the terminal overstrikes
|
---|
671 | (rather than clearing the position when a character is overwritten),
|
---|
672 | it should have the
|
---|
673 | .B os
|
---|
674 | capability.
|
---|
675 | If the terminal is a printing terminal,
|
---|
676 | with no soft copy unit,
|
---|
677 | give it both
|
---|
678 | .B hc
|
---|
679 | and
|
---|
680 | .BR os .
|
---|
681 | .RB ( os
|
---|
682 | applies to storage scope terminals,
|
---|
683 | such as the Tektronix 4010 series,
|
---|
684 | as well as to hard copy and
|
---|
685 | .SM APL
|
---|
686 | terminals.)
|
---|
687 | If there is a code to move the cursor to the left edge of the current row,
|
---|
688 | give this as
|
---|
689 | .BR cr .
|
---|
690 | (Normally this will be carriage-return,
|
---|
691 | .BR ^M .)
|
---|
692 | If there is a code to produce an audible signal (bell, beep,
|
---|
693 | .IR etc.\^ ),
|
---|
694 | give this as
|
---|
695 | .BR bl .
|
---|
696 | .PP
|
---|
697 | If there is a code (such as backspace)
|
---|
698 | to move the cursor one position to the left,
|
---|
699 | that capability should be given as
|
---|
700 | .BR le .
|
---|
701 | Similarly,
|
---|
702 | codes to move to the right, up, and down
|
---|
703 | should be given as
|
---|
704 | .BR nd ,
|
---|
705 | .BR up ,
|
---|
706 | and
|
---|
707 | .BR do ,
|
---|
708 | respectively.
|
---|
709 | These
|
---|
710 | .I local cursor motions\^
|
---|
711 | should not alter the text they pass over;
|
---|
712 | for example, you would not normally use
|
---|
713 | \*(lqnd=\ \*(rq
|
---|
714 | unless the terminal has the
|
---|
715 | .B os
|
---|
716 | capability,
|
---|
717 | because the space would erase the character moved over.
|
---|
718 | .PP
|
---|
719 | A very important point here is that the local cursor motions encoded
|
---|
720 | in
|
---|
721 | .B termcap\^
|
---|
722 | have undefined behavior at the left and top edges of a
|
---|
723 | .SM CRT
|
---|
724 | display.
|
---|
725 | Programs should never attempt to backspace around the left edge,
|
---|
726 | unless
|
---|
727 | .B bw
|
---|
728 | is given, and never attempt to go up off the top
|
---|
729 | using local cursor motions.
|
---|
730 | .PP
|
---|
731 | In order to scroll text up,
|
---|
732 | a program goes to the bottom left corner of the screen and sends the
|
---|
733 | .B sf
|
---|
734 | (index) string.
|
---|
735 | To scroll text down,
|
---|
736 | a program goes to the top left corner of the screen and sends the
|
---|
737 | .B sr
|
---|
738 | (reverse index) string.
|
---|
739 | The strings
|
---|
740 | .B sf
|
---|
741 | and
|
---|
742 | .B sr
|
---|
743 | have undefined behavior
|
---|
744 | when not on their respective corners of the screen.
|
---|
745 | Parameterized versions of the scrolling sequences are
|
---|
746 | .B SF
|
---|
747 | and
|
---|
748 | .BR SR ,
|
---|
749 | which have the same semantics as
|
---|
750 | .B sf
|
---|
751 | and
|
---|
752 | .B sr
|
---|
753 | except that they take one parameter
|
---|
754 | and scroll that many lines.
|
---|
755 | They also have undefined behavior
|
---|
756 | except at the appropriate corner of the screen.
|
---|
757 | .PP
|
---|
758 | The
|
---|
759 | .B am
|
---|
760 | capability tells whether the cursor sticks at the right
|
---|
761 | edge of the screen when text is output there,
|
---|
762 | but this does not necessarily apply to
|
---|
763 | .B nd
|
---|
764 | from the last column.
|
---|
765 | Leftward local motion is defined from the left edge only when
|
---|
766 | .B bw
|
---|
767 | is given; then an
|
---|
768 | .B le
|
---|
769 | from the left edge will move to the right edge of the previous row.
|
---|
770 | This is useful for drawing a box around the edge of the screen,
|
---|
771 | for example.
|
---|
772 | If the terminal has switch-selectable automatic margins,
|
---|
773 | the
|
---|
774 | .B termcap\^
|
---|
775 | description usually assumes that this feature is on,
|
---|
776 | .IR i.e. ,
|
---|
777 | .BR am .
|
---|
778 | If the terminal has a command
|
---|
779 | that moves to the first column of the next line,
|
---|
780 | that command can be given as
|
---|
781 | .B nw
|
---|
782 | (newline).
|
---|
783 | It is permissible for this to clear the remainder of the current line,
|
---|
784 | so if the terminal has no correctly-working \s-2CR\s0 and \s-2LF\s0
|
---|
785 | it may still be possible to craft a working
|
---|
786 | .B nw
|
---|
787 | out of one or both of them.
|
---|
788 | .PP
|
---|
789 | These capabilities suffice to describe hardcopy and \*(lqglass-tty\*(rq terminals.
|
---|
790 | Thus the Teletype model 33 is described as
|
---|
791 | .PP
|
---|
792 | .nf
|
---|
793 | T3\||\|tty33\||\|33\||\|tty\||\|Teletype model 33:\e
|
---|
794 | :bl=^G:co#72:cr=^M:do=^J:hc:os:
|
---|
795 | .fi
|
---|
796 | .PP
|
---|
797 | and the Lear Siegler \s-1ADM\s0\-3 is described as
|
---|
798 | .PP
|
---|
799 | .nf
|
---|
800 | l3\||\|adm3\||\|3\||\|LSI \s-1ADM\s0-3:\e
|
---|
801 | :am:bl=^G:cl=^Z:co#80:cr=^M:do=^J:le=^H:li#24:sf=^J:
|
---|
802 | .fi
|
---|
803 | .br
|
---|
804 | .ne 5
|
---|
805 | .PP
|
---|
806 | .B Parameterized Strings
|
---|
807 | .PP
|
---|
808 | Cursor addressing and other strings requiring parameters
|
---|
809 | are described by a
|
---|
810 | parameterized string capability, with
|
---|
811 | .BR printf\^ (3)-like
|
---|
812 | escapes
|
---|
813 | .B %x
|
---|
814 | in it,
|
---|
815 | while other characters are passed through unchanged.
|
---|
816 | For example, to address the cursor the
|
---|
817 | .B cm
|
---|
818 | capability is given, using two parameters: the row and column to move to.
|
---|
819 | (Rows and columns are numbered from zero and refer to the physical screen
|
---|
820 | visible to the user, not to any unseen memory.
|
---|
821 | If the terminal has memory-relative cursor addressing,
|
---|
822 | that can be indicated by an analogous
|
---|
823 | .B CM
|
---|
824 | capability.)
|
---|
825 | .PP
|
---|
826 | The
|
---|
827 | .B %
|
---|
828 | encodings have the following meanings:
|
---|
829 | .PP
|
---|
830 | .in +16n
|
---|
831 | .ta +8n
|
---|
832 | .ti -8n
|
---|
833 | %% output `%'
|
---|
834 | .ti -8n
|
---|
835 | %d output value as in \fBprintf\^\fP %d
|
---|
836 | .ti -8n
|
---|
837 | %2 output value as in \fBprintf\^\fP %2d
|
---|
838 | .ti -8n
|
---|
839 | %3 output value as in \fBprintf\^\fP %3d
|
---|
840 | .ti -8n
|
---|
841 | %. output value as in \fBprintf\^\fP %c
|
---|
842 | .ti -8n
|
---|
843 | %+\fIx\fP add \fIx\^\fP to value, then do %.
|
---|
844 | .ti -8n
|
---|
845 | %>\fIxy\fP if value > \fIx\^\fP then add \fIy\^\fP, no output
|
---|
846 | .ti -8n
|
---|
847 | %r reverse order of two parameters, no output
|
---|
848 | .ti -8n
|
---|
849 | %i increment by one, no output
|
---|
850 | .ti -8n
|
---|
851 | %n exclusive-or all parameters with 0140 (Datamedia 2500)
|
---|
852 | .ti -8n
|
---|
853 | %B BCD (16*(value/10)) + (value%10), no output
|
---|
854 | .ti -8n
|
---|
855 | %D Reverse coding (value \- 2*(value%16)), no output (Delta Data)
|
---|
856 | .ti -16n
|
---|
857 | .fi
|
---|
858 | .PP
|
---|
859 | Consider the Hewlett-Packard 2645, which, to get to row 3 and column 12, needs
|
---|
860 | to be sent \*(lq\eE&a12c03Y\*(rq padded for 6 milliseconds.
|
---|
861 | Note that the order
|
---|
862 | of the row and column coordinates is reversed here
|
---|
863 | and that the row and column
|
---|
864 | are sent as two-digit integers.
|
---|
865 | Thus its
|
---|
866 | .B cm
|
---|
867 | capability is \*(lqcm=6\eE&%r%2c%2Y\*(rq.
|
---|
868 | .PP
|
---|
869 | The Microterm
|
---|
870 | .SM ACT-IV
|
---|
871 | needs the current row and column sent
|
---|
872 | simply encoded in binary
|
---|
873 | preceded by a
|
---|
874 | .BR ^T ,
|
---|
875 | \*(lqcm=^T%.%.\*(rq.
|
---|
876 | Terminals that use \*(lq%.\*(rq need to be able to
|
---|
877 | backspace the cursor
|
---|
878 | .RB ( le )
|
---|
879 | and to move the cursor up one line on the screen
|
---|
880 | .RB ( up ).
|
---|
881 | This is necessary because it is not always safe to transmit
|
---|
882 | .BR \en ,
|
---|
883 | .BR ^D ,
|
---|
884 | and
|
---|
885 | .BR \er ,
|
---|
886 | as the system may change or discard them.
|
---|
887 | (Programs using
|
---|
888 | .B termcap\^
|
---|
889 | must set terminal modes so that tabs are not expanded, so
|
---|
890 | .B \et
|
---|
891 | is safe to send.
|
---|
892 | This turns out to be essential for the Ann Arbor 4080.)
|
---|
893 | .PP
|
---|
894 | A final example is the Lear Siegler \s-1ADM\s0\-3a,
|
---|
895 | which offsets row and column
|
---|
896 | by a blank character, thus \*(lqcm=\eE=%+ %+ \*(rq.
|
---|
897 | .PP
|
---|
898 | Row or column absolute cursor addressing
|
---|
899 | can be given as single parameter capabilities
|
---|
900 | .B ch
|
---|
901 | (horizontal position absolute) and
|
---|
902 | .B cv
|
---|
903 | (vertical position absolute).
|
---|
904 | Sometimes these are shorter than the more general two-parameter sequence
|
---|
905 | (as with the Hewlett-Packard 2645) and can be used in preference to
|
---|
906 | .BR cm .
|
---|
907 | If there are parameterized local motions
|
---|
908 | .RI ( e.g. ,
|
---|
909 | move
|
---|
910 | .I n\^
|
---|
911 | positions to the right)
|
---|
912 | these can be given as
|
---|
913 | .BR DO ,
|
---|
914 | .BR LE ,
|
---|
915 | .BR RI ,
|
---|
916 | and
|
---|
917 | .B UP
|
---|
918 | with a single parameter indicating how many positions to move.
|
---|
919 | These are primarily useful if the terminal does not have
|
---|
920 | .BR cm ,
|
---|
921 | such as the Tektronix 4025.
|
---|
922 | .br
|
---|
923 | .ne 5
|
---|
924 | .PP
|
---|
925 | .B Cursor Motions
|
---|
926 | .PP
|
---|
927 | If the terminal has a fast way to home the cursor
|
---|
928 | (to the very upper left corner of the screen), this can be given as
|
---|
929 | .BR ho .
|
---|
930 | Similarly, a fast way of getting to the lower left-hand corner
|
---|
931 | can be given as
|
---|
932 | .BR ll ;
|
---|
933 | this may involve going up with
|
---|
934 | .B up
|
---|
935 | from the home position,
|
---|
936 | but a program should never do this itself (unless
|
---|
937 | .B ll
|
---|
938 | does), because it can
|
---|
939 | make no assumption about the effect of moving up from the home position.
|
---|
940 | Note that the home position is the same as
|
---|
941 | cursor address (0,0): to the top left corner of the screen, not of memory.
|
---|
942 | (Therefore, the \*(lq\eEH\*(rq sequence on Hewlett-Packard terminals
|
---|
943 | cannot be used for
|
---|
944 | .BR ho .)
|
---|
945 | .br
|
---|
946 | .ne 5
|
---|
947 | .PP
|
---|
948 | .B Area Clears
|
---|
949 | .PP
|
---|
950 | If the terminal can clear from the current position to the end of the
|
---|
951 | line, leaving the cursor where it is, this should be given as
|
---|
952 | .BR ce .
|
---|
953 | If the terminal can clear from the current position to the end of the
|
---|
954 | display, this should be given as
|
---|
955 | .BR cd .
|
---|
956 | .B cd
|
---|
957 | must only be invoked from the first column of a line.
|
---|
958 | (Therefore,
|
---|
959 | it can be simulated by a request to delete a large number of lines,
|
---|
960 | if a true
|
---|
961 | .B cd
|
---|
962 | is not available.)
|
---|
963 | .br
|
---|
964 | .ne 5
|
---|
965 | .PP
|
---|
966 | .B Insert/Delete Line
|
---|
967 | .PP
|
---|
968 | If the terminal can open a new blank line
|
---|
969 | before the line containing the cursor,
|
---|
970 | this should be given as
|
---|
971 | .BR al ;
|
---|
972 | this must be invoked only from the first
|
---|
973 | position of a line.
|
---|
974 | The cursor must then appear at the left of the newly blank line.
|
---|
975 | If the terminal can delete the line that the cursor is on, this
|
---|
976 | should be given as
|
---|
977 | .BR dl ;
|
---|
978 | this must only be used from the first position on
|
---|
979 | the line to be deleted.
|
---|
980 | Versions of
|
---|
981 | .B al
|
---|
982 | and
|
---|
983 | .B dl
|
---|
984 | which take a single parameter
|
---|
985 | and insert or delete that many lines
|
---|
986 | can be given as
|
---|
987 | .B AL
|
---|
988 | and
|
---|
989 | .BR DL .
|
---|
990 | If the terminal has a settable scrolling region
|
---|
991 | (like the VT100),
|
---|
992 | the command to set this can be described with the
|
---|
993 | .B cs
|
---|
994 | capability,
|
---|
995 | which takes two parameters: the top and bottom lines of the scrolling region.
|
---|
996 | The cursor position is, alas, undefined after using this command.
|
---|
997 | It is possible to get the effect of insert or delete line
|
---|
998 | using this command \(em the
|
---|
999 | .B sc
|
---|
1000 | and
|
---|
1001 | .B rc
|
---|
1002 | (save and restore cursor) commands are also useful.
|
---|
1003 | Inserting lines at the top or bottom of the screen can also be done using
|
---|
1004 | .B sr
|
---|
1005 | or
|
---|
1006 | .B sf
|
---|
1007 | on many terminals without a true insert/delete line,
|
---|
1008 | and is often faster even on terminals with those features.
|
---|
1009 | .PP
|
---|
1010 | If the terminal has the ability to define a window as part of memory
|
---|
1011 | which all commands affect, it should be given as the parameterized string
|
---|
1012 | .BR wi .
|
---|
1013 | The four parameters are the starting and ending lines in memory
|
---|
1014 | and the starting and ending columns in memory, in that order.
|
---|
1015 | (This
|
---|
1016 | .B terminfo\^
|
---|
1017 | capability is described for completeness.
|
---|
1018 | It is unlikely that any
|
---|
1019 | .BR termcap\^ -using
|
---|
1020 | program will support it.)
|
---|
1021 | .PP
|
---|
1022 | If the terminal can retain display memory above the screen, then the
|
---|
1023 | .B da
|
---|
1024 | capability should be given;
|
---|
1025 | if display memory can be retained
|
---|
1026 | below, then
|
---|
1027 | .B db
|
---|
1028 | should be given.
|
---|
1029 | These indicate
|
---|
1030 | that deleting a line or scrolling may bring non-blank lines up from below
|
---|
1031 | or that scrolling back with
|
---|
1032 | .B sr
|
---|
1033 | may bring down non-blank lines.
|
---|
1034 | .br
|
---|
1035 | .ne 5
|
---|
1036 | .PP
|
---|
1037 | .B Insert/Delete Character
|
---|
1038 | .PP
|
---|
1039 | There are two basic kinds of intelligent terminals with respect to
|
---|
1040 | insert/delete character that can be described using
|
---|
1041 | .BR termcap\^ .
|
---|
1042 | The most common insert/delete character operations affect only the characters
|
---|
1043 | on the current line and shift characters off the end of the line rigidly.
|
---|
1044 | Other terminals, such as the Concept\-100 and the Perkin Elmer Owl, make
|
---|
1045 | a distinction between typed and untyped blanks on the screen, shifting
|
---|
1046 | upon an insert or delete only to an untyped blank on the screen which is
|
---|
1047 | either eliminated or expanded to two untyped blanks.
|
---|
1048 | You can determine
|
---|
1049 | the kind of terminal you have by clearing the screen then typing
|
---|
1050 | text separated by cursor motions.
|
---|
1051 | Type \*(lqabc\ \ \ \ def\*(rq using local
|
---|
1052 | cursor motions (not spaces) between the \*(lqabc\*(rq and the \*(lqdef\*(rq.
|
---|
1053 | Then position the cursor before the \*(lqabc\*(rq and put the terminal in insert
|
---|
1054 | mode.
|
---|
1055 | If typing characters causes the rest of the line to shift
|
---|
1056 | rigidly and characters to fall off the end, then your terminal does
|
---|
1057 | not distinguish between blanks and untyped positions.
|
---|
1058 | If the \*(lqabc\*(rq
|
---|
1059 | shifts over to the \*(lqdef\*(rq which then move together around the end of the
|
---|
1060 | current line and onto the next as you insert, then you have the second type of
|
---|
1061 | terminal and should give the capability \fBin\fP, which stands for
|
---|
1062 | \*(lqinsert null\*(rq.
|
---|
1063 | While these are two logically separate attributes
|
---|
1064 | (one line
|
---|
1065 | .I vs.
|
---|
1066 | multi-line insert mode,
|
---|
1067 | and special treatment of untyped spaces),
|
---|
1068 | we have seen no terminals whose insert
|
---|
1069 | mode cannot be described with the single attribute.
|
---|
1070 | .PP
|
---|
1071 | .B Termcap\^
|
---|
1072 | can describe both terminals that have an insert mode and terminals
|
---|
1073 | that send a simple sequence to open a blank position on the current line.
|
---|
1074 | Give as
|
---|
1075 | .B im
|
---|
1076 | the sequence to get into insert mode.
|
---|
1077 | Give as
|
---|
1078 | .B ei
|
---|
1079 | the sequence to leave insert mode.
|
---|
1080 | Now give as
|
---|
1081 | .B ic
|
---|
1082 | any sequence that needs to be sent just before
|
---|
1083 | each character to be inserted.
|
---|
1084 | Most terminals with a true insert mode
|
---|
1085 | will not give
|
---|
1086 | .BR ic ;
|
---|
1087 | terminals that use a sequence to open a screen
|
---|
1088 | position should give it here.
|
---|
1089 | (If your terminal has both,
|
---|
1090 | insert mode is usually preferable to
|
---|
1091 | .BR ic .
|
---|
1092 | Do not give both unless the terminal actually requires both to be used
|
---|
1093 | in combination.)
|
---|
1094 | If post-insert padding is needed, give this as a number of milliseconds
|
---|
1095 | in
|
---|
1096 | .B ip
|
---|
1097 | (a string option).
|
---|
1098 | Any other sequence that may need to be
|
---|
1099 | sent after insertion of a single character can also be given in
|
---|
1100 | .BR ip .
|
---|
1101 | If your terminal needs to be placed into an `insert mode'
|
---|
1102 | and needs a special code preceding each inserted character,
|
---|
1103 | then both
|
---|
1104 | .BR im / ei
|
---|
1105 | and
|
---|
1106 | .B ic
|
---|
1107 | can be given, and both will be used.
|
---|
1108 | The
|
---|
1109 | .B IC
|
---|
1110 | capability, with one parameter
|
---|
1111 | .IR n\^ ,
|
---|
1112 | will repeat the effects of
|
---|
1113 | .B ic
|
---|
1114 | .I n\^
|
---|
1115 | times.
|
---|
1116 | .PP
|
---|
1117 | It is occasionally necessary to move around while in insert mode
|
---|
1118 | to delete characters on the same line
|
---|
1119 | .RI ( e.g. ,
|
---|
1120 | if there is a tab after
|
---|
1121 | the insertion position).
|
---|
1122 | If your terminal allows motion while in
|
---|
1123 | insert mode, you can give the capability
|
---|
1124 | .B mi
|
---|
1125 | to speed up inserting
|
---|
1126 | in this case.
|
---|
1127 | Omitting
|
---|
1128 | .B mi
|
---|
1129 | will affect only speed.
|
---|
1130 | Some terminals
|
---|
1131 | (notably Datamedia's) must not have
|
---|
1132 | .B mi
|
---|
1133 | because of the way their
|
---|
1134 | insert mode works.
|
---|
1135 | .PP
|
---|
1136 | Finally, you can specify
|
---|
1137 | .B dc
|
---|
1138 | to delete a single character,
|
---|
1139 | .B DC
|
---|
1140 | with one parameter
|
---|
1141 | .I n\^
|
---|
1142 | to delete
|
---|
1143 | .I n\^
|
---|
1144 | characters,
|
---|
1145 | and delete mode by giving
|
---|
1146 | .B dm
|
---|
1147 | and
|
---|
1148 | .B ed
|
---|
1149 | to enter and exit delete mode
|
---|
1150 | (which is any mode the terminal needs to be placed in for
|
---|
1151 | .B dc
|
---|
1152 | to work).
|
---|
1153 | .br
|
---|
1154 | .ne 5
|
---|
1155 | .PP
|
---|
1156 | .B Highlighting, Underlining, and Visible Bells
|
---|
1157 | .PP
|
---|
1158 | If your terminal has one or more kinds of display attributes,
|
---|
1159 | these can be represented in a number of different ways.
|
---|
1160 | You should choose one display form as
|
---|
1161 | .IR "standout mode" ,
|
---|
1162 | representing a good high-contrast, easy-on-the-eyes format
|
---|
1163 | for highlighting error messages and other attention getters.
|
---|
1164 | (If you have a choice, reverse video plus half-bright is good,
|
---|
1165 | or reverse video alone.)
|
---|
1166 | The sequences to enter and exit standout mode
|
---|
1167 | are given as
|
---|
1168 | .B so
|
---|
1169 | and
|
---|
1170 | .BR se ,
|
---|
1171 | respectively.
|
---|
1172 | If the code to change into or out of standout
|
---|
1173 | mode leaves one or even two blank spaces or garbage characters on the screen,
|
---|
1174 | as the TVI 912 and Teleray 1061 do,
|
---|
1175 | then
|
---|
1176 | .B sg
|
---|
1177 | should be given to tell how many characters are left.
|
---|
1178 | .PP
|
---|
1179 | Codes to begin underlining and end underlining can be given as
|
---|
1180 | .B us
|
---|
1181 | and
|
---|
1182 | .BR ue ,
|
---|
1183 | respectively.
|
---|
1184 | Underline mode change garbage is specified by
|
---|
1185 | .BR ug ,
|
---|
1186 | similar to
|
---|
1187 | .BR sg .
|
---|
1188 | If the terminal has a code to underline the current character and move
|
---|
1189 | the cursor one position to the right,
|
---|
1190 | such as the Microterm Mime,
|
---|
1191 | this can be given as
|
---|
1192 | .BR uc .
|
---|
1193 | .PP
|
---|
1194 | Other capabilities to enter various highlighting modes include
|
---|
1195 | .B mb
|
---|
1196 | (blinking),
|
---|
1197 | .B md
|
---|
1198 | (bold or extra bright),
|
---|
1199 | .B mh
|
---|
1200 | (dim or half-bright),
|
---|
1201 | .B mk
|
---|
1202 | (blanking or invisible text),
|
---|
1203 | .B mp
|
---|
1204 | (protected),
|
---|
1205 | .B mr
|
---|
1206 | (reverse video),
|
---|
1207 | .B me
|
---|
1208 | (turn off
|
---|
1209 | .I all
|
---|
1210 | attribute modes),
|
---|
1211 | .B as
|
---|
1212 | (enter alternate character set mode), and
|
---|
1213 | .B ae
|
---|
1214 | (exit alternate character set mode).
|
---|
1215 | Turning on any of these modes singly may or may not turn off other modes.
|
---|
1216 | .PP
|
---|
1217 | If there is a sequence to set arbitrary combinations of mode,
|
---|
1218 | this should be given as
|
---|
1219 | .B sa
|
---|
1220 | (set attributes), taking 9 parameters.
|
---|
1221 | Each parameter is either 0 or 1,
|
---|
1222 | as the corresponding attributes is on or off.
|
---|
1223 | The 9 parameters are, in order: standout, underline, reverse, blink,
|
---|
1224 | dim, bold, blank, protect, and alternate character set.
|
---|
1225 | Not all modes need be supported by
|
---|
1226 | .BR sa ,
|
---|
1227 | only those for which corresponding attribute commands exist.
|
---|
1228 | (It is unlikely that a
|
---|
1229 | .BR termcap\^ -using
|
---|
1230 | program will support this capability, which is defined for compatibility
|
---|
1231 | with
|
---|
1232 | .BR terminfo\^ .)
|
---|
1233 | .PP
|
---|
1234 | Terminals with the \*(lqmagic cookie\*(rq glitches
|
---|
1235 | .RB ( sg
|
---|
1236 | and
|
---|
1237 | .BR ug ),
|
---|
1238 | rather than maintaining extra attribute bits for each character cell,
|
---|
1239 | instead deposit special \*(lqcookies\*(rq,
|
---|
1240 | or \*(lqgarbage characters\*(rq,
|
---|
1241 | when they receive mode-setting sequences,
|
---|
1242 | which affect the display algorithm.
|
---|
1243 | .PP
|
---|
1244 | Some terminals,
|
---|
1245 | such as the Hewlett-Packard 2621,
|
---|
1246 | automatically leave standout
|
---|
1247 | mode when they move to a new line or when the cursor is addressed.
|
---|
1248 | Programs using standout mode
|
---|
1249 | should exit standout mode on such terminals
|
---|
1250 | before moving the cursor or sending a newline.
|
---|
1251 | On terminals where this is not a problem,
|
---|
1252 | the
|
---|
1253 | .B ms
|
---|
1254 | capability should be present
|
---|
1255 | to say that this overhead is unnecessary.
|
---|
1256 | .PP
|
---|
1257 | If the terminal has
|
---|
1258 | a way of flashing the screen to indicate an error quietly
|
---|
1259 | (a bell replacement),
|
---|
1260 | this can be given as
|
---|
1261 | .BR vb ;
|
---|
1262 | it must not move the cursor.
|
---|
1263 | .PP
|
---|
1264 | If the cursor needs to be made more visible than normal
|
---|
1265 | when it is not on the bottom line
|
---|
1266 | (to change, for example, a non-blinking underline into an easier-to-find
|
---|
1267 | block or blinking underline),
|
---|
1268 | give this sequence as
|
---|
1269 | .BR vs .
|
---|
1270 | If there is a way to make the cursor completely invisible, give that as
|
---|
1271 | .BR vi .
|
---|
1272 | The capability
|
---|
1273 | .BR ve ,
|
---|
1274 | which undoes the effects of both of these modes,
|
---|
1275 | should also be given.
|
---|
1276 | .PP
|
---|
1277 | If your terminal correctly displays underlined characters
|
---|
1278 | (with no special codes needed)
|
---|
1279 | even though it does not overstrike,
|
---|
1280 | then you should give the capability
|
---|
1281 | .BR ul .
|
---|
1282 | If overstrikes are erasable with a blank,
|
---|
1283 | this should be indicated by giving
|
---|
1284 | .BR eo .
|
---|
1285 | .br
|
---|
1286 | .ne 5
|
---|
1287 | .PP
|
---|
1288 | .B Keypad
|
---|
1289 | .PP
|
---|
1290 | If the terminal has a keypad that transmits codes when the keys are pressed,
|
---|
1291 | this information can be given.
|
---|
1292 | Note that it is not possible to handle
|
---|
1293 | terminals where the keypad only works in local mode
|
---|
1294 | (this applies, for example, to the unshifted Hewlett-Packard 2621 keys).
|
---|
1295 | If the keypad can be set to transmit or not transmit,
|
---|
1296 | give these codes as
|
---|
1297 | .B ks
|
---|
1298 | and
|
---|
1299 | .BR ke .
|
---|
1300 | Otherwise the keypad is assumed to always transmit.
|
---|
1301 | The codes sent by the left-arrow, right-arrow, up-arrow, down-arrow,
|
---|
1302 | and home keys can be given as
|
---|
1303 | .BR kl ,
|
---|
1304 | .BR kr ,
|
---|
1305 | .BR ku ,
|
---|
1306 | .BR kd ,
|
---|
1307 | and
|
---|
1308 | .BR kh ,
|
---|
1309 | respectively.
|
---|
1310 | If there are function keys such as f0, f1, ..., f9, the codes they send
|
---|
1311 | can be given as
|
---|
1312 | .BR k0 ,
|
---|
1313 | .BR k1 , "" ...,
|
---|
1314 | .BR k9 .
|
---|
1315 | If these keys have labels other than the default f0 through f9, the labels
|
---|
1316 | can be given as
|
---|
1317 | .BR l0 ,
|
---|
1318 | .BR l1 , "" ...,
|
---|
1319 | .BR l9 .
|
---|
1320 | The codes transmitted by certain other special keys can be given:
|
---|
1321 | .B kH
|
---|
1322 | (home down),
|
---|
1323 | .B kb
|
---|
1324 | (backspace),
|
---|
1325 | .B ka
|
---|
1326 | (clear all tabs),
|
---|
1327 | .B kt
|
---|
1328 | (clear the tab stop in this column),
|
---|
1329 | .B kC
|
---|
1330 | (clear screen or erase),
|
---|
1331 | .B kD
|
---|
1332 | (delete character),
|
---|
1333 | .B kL
|
---|
1334 | (delete line),
|
---|
1335 | .B kM
|
---|
1336 | (exit insert mode),
|
---|
1337 | .B kE
|
---|
1338 | (clear to end of line),
|
---|
1339 | .B kS
|
---|
1340 | (clear to end of screen),
|
---|
1341 | .B kI
|
---|
1342 | (insert character or enter insert mode),
|
---|
1343 | .B kA
|
---|
1344 | (insert line),
|
---|
1345 | .B kN
|
---|
1346 | (next page),
|
---|
1347 | .B kP
|
---|
1348 | (previous page),
|
---|
1349 | .B kF
|
---|
1350 | (scroll forward/down),
|
---|
1351 | .B kR
|
---|
1352 | (scroll backward/up), and
|
---|
1353 | .B kT
|
---|
1354 | (set a tab stop in this column).
|
---|
1355 | In addition, if the keypad has a 3 by 3 array of keys
|
---|
1356 | including the four arrow keys, then the other five keys can be given as
|
---|
1357 | .BR K1 ,
|
---|
1358 | .BR K2 ,
|
---|
1359 | .BR K3 ,
|
---|
1360 | .BR K4 ,
|
---|
1361 | and
|
---|
1362 | .BR K5 .
|
---|
1363 | These keys are useful when the effects of a 3 by 3 directional pad are needed.
|
---|
1364 | The obsolete
|
---|
1365 | .B ko
|
---|
1366 | capability formerly used to describe \*(lqother\*(rq function keys has been
|
---|
1367 | completely supplanted by the above capabilities.
|
---|
1368 | .PP
|
---|
1369 | The
|
---|
1370 | .B ma
|
---|
1371 | entry is also used to indicate arrow keys on terminals that have
|
---|
1372 | single-character arrow keys.
|
---|
1373 | It is obsolete but still in use in
|
---|
1374 | version 2 of
|
---|
1375 | .B vi\^
|
---|
1376 | which must be run on some minicomputers due to
|
---|
1377 | memory limitations.
|
---|
1378 | This field is redundant with
|
---|
1379 | .BR kl ,
|
---|
1380 | .BR kr ,
|
---|
1381 | .BR ku ,
|
---|
1382 | .BR kd ,
|
---|
1383 | and
|
---|
1384 | .BR kh .
|
---|
1385 | It consists of groups of two characters.
|
---|
1386 | In each group, the first character is what an arrow key sends, and the
|
---|
1387 | second character is the corresponding
|
---|
1388 | .B vi\^
|
---|
1389 | command.
|
---|
1390 | These commands are
|
---|
1391 | .B h
|
---|
1392 | for
|
---|
1393 | .BR kl ,
|
---|
1394 | .B j
|
---|
1395 | for
|
---|
1396 | .BR kd ,
|
---|
1397 | .B k
|
---|
1398 | for
|
---|
1399 | .BR ku ,
|
---|
1400 | .B l
|
---|
1401 | for
|
---|
1402 | .BR kr ,
|
---|
1403 | and
|
---|
1404 | .B H
|
---|
1405 | for
|
---|
1406 | .BR kh .
|
---|
1407 | For example, the Mime would have \*(lqma=^Hh^Kj^Zk^Xl\*(rq
|
---|
1408 | indicating arrow keys left (^H), down (^K), up (^Z), and right (^X).
|
---|
1409 | (There is no home key on the Mime.)
|
---|
1410 | .br
|
---|
1411 | .ne 5
|
---|
1412 | .PP
|
---|
1413 | .B Tabs and Initialization
|
---|
1414 | .PP
|
---|
1415 | If the terminal needs to be in a special mode when running
|
---|
1416 | a program that uses these capabilities,
|
---|
1417 | the codes to enter and exit this mode can be given as
|
---|
1418 | .B ti
|
---|
1419 | and
|
---|
1420 | .BR te .
|
---|
1421 | This arises, for example, from terminals like the Concept with more than
|
---|
1422 | one page of memory.
|
---|
1423 | If the terminal has only memory-relative cursor addressing and not
|
---|
1424 | screen-relative cursor addressing,
|
---|
1425 | a screen-sized window must be fixed into
|
---|
1426 | the display for cursor addressing to work properly.
|
---|
1427 | This is also used for the Tektronix 4025, where
|
---|
1428 | .B ti
|
---|
1429 | sets the command character to be the one used by
|
---|
1430 | .BR termcap\^ .
|
---|
1431 | .PP
|
---|
1432 | Other capabilities
|
---|
1433 | include
|
---|
1434 | .BR is ,
|
---|
1435 | an initialization string for the terminal,
|
---|
1436 | and
|
---|
1437 | .BR if ,
|
---|
1438 | the name of a file containing long initialization strings.
|
---|
1439 | These strings are expected to set the terminal into modes
|
---|
1440 | consistent with the rest of the
|
---|
1441 | .B termcap\^
|
---|
1442 | description.
|
---|
1443 | They are normally sent to the terminal by the
|
---|
1444 | .B tset\^
|
---|
1445 | program each time the user logs in.
|
---|
1446 | They will be printed in the following order:
|
---|
1447 | .BR is ;
|
---|
1448 | setting tabs using
|
---|
1449 | .B ct
|
---|
1450 | and
|
---|
1451 | .BR st ;
|
---|
1452 | and finally
|
---|
1453 | .BR if .
|
---|
1454 | .RI ( Terminfo\^
|
---|
1455 | uses
|
---|
1456 | .B i1-i2
|
---|
1457 | instead of
|
---|
1458 | .B is
|
---|
1459 | and runs the program
|
---|
1460 | .B iP
|
---|
1461 | and prints
|
---|
1462 | .B i3
|
---|
1463 | after the other initializations.)
|
---|
1464 | A pair of sequences that does a harder reset from a totally unknown state
|
---|
1465 | can be analogously given as
|
---|
1466 | .B rs
|
---|
1467 | and
|
---|
1468 | .BR if .
|
---|
1469 | These strings are output by the
|
---|
1470 | .B reset\^
|
---|
1471 | program, which is used when the terminal gets into a wedged state.
|
---|
1472 | .RI ( Terminfo\^
|
---|
1473 | uses
|
---|
1474 | .B r1-r3
|
---|
1475 | instead of
|
---|
1476 | .BR rs .)
|
---|
1477 | Commands are normally placed in
|
---|
1478 | .B rs
|
---|
1479 | and
|
---|
1480 | .B rf
|
---|
1481 | only if they produce annoying effects on the screen and are not necessary
|
---|
1482 | when logging in.
|
---|
1483 | For example, the command to set the VT100 into 80-column mode
|
---|
1484 | would normally be part of
|
---|
1485 | .BR is ,
|
---|
1486 | but it causes an annoying glitch of the screen and is not normally needed
|
---|
1487 | since the terminal is usually already in 80-column mode.
|
---|
1488 | .PP
|
---|
1489 | If the terminal has hardware tabs,
|
---|
1490 | the command to advance to the next tab stop can be given as
|
---|
1491 | .B ta
|
---|
1492 | (usually
|
---|
1493 | .BR ^I ).
|
---|
1494 | A \*(lqbacktab\*(rq command which moves leftward to the previous tab stop
|
---|
1495 | can be given as
|
---|
1496 | .BR bt .
|
---|
1497 | By convention,
|
---|
1498 | if the terminal driver modes indicate that tab stops are being expanded
|
---|
1499 | by the computer rather than being sent to the terminal,
|
---|
1500 | programs should not use
|
---|
1501 | .B ta
|
---|
1502 | or
|
---|
1503 | .B bt
|
---|
1504 | even if they are present,
|
---|
1505 | since the user may not have the tab stops properly set.
|
---|
1506 | If the terminal has hardware tabs that are initially set every
|
---|
1507 | .I n\^
|
---|
1508 | positions when the terminal is powered up, then the numeric parameter
|
---|
1509 | .B it
|
---|
1510 | is given, showing the number of positions between tab stops.
|
---|
1511 | This is normally used by the
|
---|
1512 | .B tset\^
|
---|
1513 | command to determine whether to set the driver mode for hardware tab
|
---|
1514 | expansion, and whether to set the tab stops.
|
---|
1515 | If the terminal has tab stops that can be saved in nonvolatile memory, the
|
---|
1516 | .B termcap\^
|
---|
1517 | description can assume that they are properly set.
|
---|
1518 | .PP
|
---|
1519 | If there are commands to set and clear tab stops, they can be given as
|
---|
1520 | .B ct
|
---|
1521 | (clear all tab stops) and
|
---|
1522 | .B st
|
---|
1523 | (set a tab stop in the current column of every row).
|
---|
1524 | If a more complex sequence is needed to set the tabs than can be
|
---|
1525 | described by this, the sequence can be placed in
|
---|
1526 | .B is
|
---|
1527 | or
|
---|
1528 | .BR if .
|
---|
1529 | .br
|
---|
1530 | .ne 5
|
---|
1531 | .PP
|
---|
1532 | .B Delays
|
---|
1533 | .PP
|
---|
1534 | Certain capabilities control padding in the terminal driver.
|
---|
1535 | These are primarily needed by hardcopy terminals and are used by the
|
---|
1536 | .B tset\^
|
---|
1537 | program to set terminal driver modes appropriately.
|
---|
1538 | Delays embedded in the capabilities
|
---|
1539 | .BR cr ,
|
---|
1540 | .BR sf ,
|
---|
1541 | .BR le ,
|
---|
1542 | .BR ff ,
|
---|
1543 | and
|
---|
1544 | .B ta
|
---|
1545 | will cause the appropriate delay bits to be set in the terminal driver.
|
---|
1546 | If
|
---|
1547 | .B pb
|
---|
1548 | (padding baud rate) is given, these values can be ignored at baud rates
|
---|
1549 | below the value of
|
---|
1550 | .BR pb .
|
---|
1551 | For 4.2BSD
|
---|
1552 | .BR tset\^ ,
|
---|
1553 | the delays are given as numeric capabilities
|
---|
1554 | .BR dC ,
|
---|
1555 | .BR dN ,
|
---|
1556 | .BR dB ,
|
---|
1557 | .BR dF ,
|
---|
1558 | and
|
---|
1559 | .BR dT
|
---|
1560 | instead.
|
---|
1561 | .br
|
---|
1562 | .ne 5
|
---|
1563 | .PP
|
---|
1564 | .B Miscellaneous
|
---|
1565 | .PP
|
---|
1566 | If the terminal requires other than a \s-2NUL\s0 (zero) character as a pad,
|
---|
1567 | this can be given as
|
---|
1568 | .BR pc .
|
---|
1569 | Only the first character of the
|
---|
1570 | .B pc
|
---|
1571 | string is used.
|
---|
1572 | .PP
|
---|
1573 | If the terminal has commands to save and restore the position of the
|
---|
1574 | cursor, give them as
|
---|
1575 | .B sc
|
---|
1576 | and
|
---|
1577 | .BR rc .
|
---|
1578 | .PP
|
---|
1579 | If the terminal has an extra \*(lqstatus line\*(rq that is not normally used by
|
---|
1580 | software, this fact can be indicated.
|
---|
1581 | If the status line is viewed as an extra line below the bottom line,
|
---|
1582 | then the capability
|
---|
1583 | .B hs
|
---|
1584 | should be given.
|
---|
1585 | Special strings to go to a position in the status line and to return
|
---|
1586 | from the status line can be given as
|
---|
1587 | .B ts
|
---|
1588 | and
|
---|
1589 | .BR fs .
|
---|
1590 | .RB ( fs
|
---|
1591 | must leave the cursor position in the same place that it was before
|
---|
1592 | .BR ts .
|
---|
1593 | If necessary, the
|
---|
1594 | .B sc
|
---|
1595 | and
|
---|
1596 | .B rc
|
---|
1597 | strings can be included in
|
---|
1598 | .B ts
|
---|
1599 | and
|
---|
1600 | .B fs
|
---|
1601 | to get this effect.)
|
---|
1602 | The capability
|
---|
1603 | .B ts
|
---|
1604 | takes one parameter, which is the column number of the status line
|
---|
1605 | to which the cursor is to be moved.
|
---|
1606 | If escape sequences and other special commands such as tab work while in
|
---|
1607 | the status line, the flag
|
---|
1608 | .B es
|
---|
1609 | can be given.
|
---|
1610 | A string that turns off the status line (or otherwise erases its contents)
|
---|
1611 | should be given as
|
---|
1612 | .BR ds .
|
---|
1613 | The status line is normally assumed to be the same width as the
|
---|
1614 | rest of the screen,
|
---|
1615 | .IR i.e. ,
|
---|
1616 | .BR co .
|
---|
1617 | If the status line is a different width (possibly because the terminal
|
---|
1618 | does not allow an entire line to be loaded), then its width in columns
|
---|
1619 | can be indicated with the numeric parameter
|
---|
1620 | .BR ws .
|
---|
1621 | .PP
|
---|
1622 | If the terminal can move up or down half a line, this can be
|
---|
1623 | indicated with
|
---|
1624 | .B hu
|
---|
1625 | (half-line up) and
|
---|
1626 | .B hd
|
---|
1627 | (half-line down).
|
---|
1628 | This is primarily useful for superscripts and subscripts on hardcopy
|
---|
1629 | terminals.
|
---|
1630 | If a hardcopy terminal can eject to the next page (form feed),
|
---|
1631 | give this as
|
---|
1632 | .B ff
|
---|
1633 | (usually
|
---|
1634 | .BR ^L ).
|
---|
1635 | .PP
|
---|
1636 | If there is a command to repeat a given character a given number of times
|
---|
1637 | (to save time transmitting a large number of identical characters),
|
---|
1638 | this can be indicated with the parameterized string
|
---|
1639 | .BR rp .
|
---|
1640 | The first parameter is the character to be repeated and the second is
|
---|
1641 | the number of times to repeat it.
|
---|
1642 | (This is a
|
---|
1643 | .B terminfo\^
|
---|
1644 | feature that is unlikely to be supported by a program that uses
|
---|
1645 | .BR termcap\^ .)
|
---|
1646 | .PP
|
---|
1647 | If the terminal has a settable command character, such as the
|
---|
1648 | Tektronix 4025, this can be indicated with
|
---|
1649 | .BR CC .
|
---|
1650 | A prototype command character is chosen which is used in all capabilities.
|
---|
1651 | This character is given in the
|
---|
1652 | .B CC
|
---|
1653 | capability to identify it.
|
---|
1654 | The following convention is supported on some UNIX systems:
|
---|
1655 | The environment is to be searched for a
|
---|
1656 | .B
|
---|
1657 | .SM CC
|
---|
1658 | variable,
|
---|
1659 | and if found,
|
---|
1660 | all occurrences of the prototype character are replaced by the character
|
---|
1661 | in the environment variable.
|
---|
1662 | This use of the
|
---|
1663 | .B
|
---|
1664 | .SM CC
|
---|
1665 | environment variable
|
---|
1666 | is a very bad idea, as it conflicts with
|
---|
1667 | .BR make\^ (1).
|
---|
1668 | .PP
|
---|
1669 | Terminal descriptions that do not represent a specific kind of known
|
---|
1670 | terminal, such as
|
---|
1671 | .BR switch\^ ,
|
---|
1672 | .BR dialup\^ ,
|
---|
1673 | .BR patch\^ ,
|
---|
1674 | and
|
---|
1675 | .BR network\^ ,
|
---|
1676 | should include the
|
---|
1677 | .B gn
|
---|
1678 | (generic) capability so that programs can complain that they do not know
|
---|
1679 | how to talk to the terminal.
|
---|
1680 | (This capability does not apply to
|
---|
1681 | .I virtual\^
|
---|
1682 | terminal descriptions for which the escape sequences are known.)
|
---|
1683 | .PP
|
---|
1684 | If the terminal uses xoff/xon (\s-2DC3\s0/\s-2DC1\s0)
|
---|
1685 | handshaking for flow control, give
|
---|
1686 | .BR xo .
|
---|
1687 | Padding information should still be included so that routines can make
|
---|
1688 | better decisions about costs, but actual pad characters will not be
|
---|
1689 | transmitted.
|
---|
1690 | .PP
|
---|
1691 | If the terminal has a \*(lqmeta key\*(rq which acts as a shift key, setting the
|
---|
1692 | 8th bit of any character transmitted, then this fact can be indicated with
|
---|
1693 | .BR km .
|
---|
1694 | Otherwise, software will assume that the 8th bit is parity and it will
|
---|
1695 | usually be cleared.
|
---|
1696 | If strings exist to turn this \*(lqmeta mode\*(rq on and off, they can be given as
|
---|
1697 | .B mm
|
---|
1698 | and
|
---|
1699 | .BR mo .
|
---|
1700 | .PP
|
---|
1701 | If the terminal has more lines of memory than will fit on the screen at once,
|
---|
1702 | the number of lines of memory can be indicated with
|
---|
1703 | .BR lm .
|
---|
1704 | An explicit value of 0 indicates that the number of lines is not fixed,
|
---|
1705 | but that there is still more memory than fits on the screen.
|
---|
1706 | .PP
|
---|
1707 | If the terminal is one of those supported by the UNIX system virtual
|
---|
1708 | terminal protocol, the terminal number can be given as
|
---|
1709 | .BR vt .
|
---|
1710 | .PP
|
---|
1711 | Media copy strings which control an auxiliary printer
|
---|
1712 | connected to the terminal can be given as
|
---|
1713 | .BR ps :
|
---|
1714 | print the contents of the screen;
|
---|
1715 | .BR pf :
|
---|
1716 | turn off the printer; and
|
---|
1717 | .BR po :
|
---|
1718 | turn on the printer.
|
---|
1719 | When the printer is on, all text sent to the terminal will be sent to the
|
---|
1720 | printer.
|
---|
1721 | It is undefined whether the text is also displayed on the terminal screen
|
---|
1722 | when the printer is on.
|
---|
1723 | A variation
|
---|
1724 | .B pO
|
---|
1725 | takes one parameter and leaves the printer on for as many characters as the
|
---|
1726 | value of the parameter, then turns the printer off.
|
---|
1727 | The parameter should not exceed 255.
|
---|
1728 | All text, including
|
---|
1729 | .BR pf ,
|
---|
1730 | is transparently passed to the printer while
|
---|
1731 | .B pO
|
---|
1732 | is in effect.
|
---|
1733 | .PP
|
---|
1734 | Strings to program function keys can be given as
|
---|
1735 | .BR pk ,
|
---|
1736 | .BR pl ,
|
---|
1737 | and
|
---|
1738 | .BR px .
|
---|
1739 | Each of these strings takes two parameters: the function key number
|
---|
1740 | to program (from 0 to 9) and the string to program it with.
|
---|
1741 | Function key numbers out of this range may program undefined keys
|
---|
1742 | in a terminal-dependent manner.
|
---|
1743 | The differences among the capabilities are that
|
---|
1744 | .B pk
|
---|
1745 | causes pressing the given key to be the same as the user typing the given
|
---|
1746 | string;
|
---|
1747 | .B pl
|
---|
1748 | causes the string to be executed by the terminal in local mode;
|
---|
1749 | and
|
---|
1750 | .B px
|
---|
1751 | causes the string to be transmitted to the computer.
|
---|
1752 | Unfortunately, due to lack of a definition for string parameters in
|
---|
1753 | .BR termcap\^ ,
|
---|
1754 | only
|
---|
1755 | .B terminfo\^
|
---|
1756 | supports these capabilities.
|
---|
1757 | .br
|
---|
1758 | .ne 5
|
---|
1759 | .PP
|
---|
1760 | .B Glitches and Braindamage
|
---|
1761 | .PP
|
---|
1762 | Hazeltine terminals, which do not allow `~' characters to be displayed,
|
---|
1763 | should indicate
|
---|
1764 | .BR hz .
|
---|
1765 | .PP
|
---|
1766 | The
|
---|
1767 | .B nc
|
---|
1768 | capability, now obsolete, formerly indicated Datamedia terminals,
|
---|
1769 | which echo
|
---|
1770 | .B \er \en
|
---|
1771 | for
|
---|
1772 | carriage return then ignore a following linefeed.
|
---|
1773 | .PP
|
---|
1774 | Terminals that ignore a linefeed immediately after an
|
---|
1775 | .B am
|
---|
1776 | wrap, such as the Concept, should indicate
|
---|
1777 | .BR xn .
|
---|
1778 | .PP
|
---|
1779 | If
|
---|
1780 | .B ce
|
---|
1781 | is required to get rid of standout
|
---|
1782 | (instead of merely writing normal text on top of it),
|
---|
1783 | .B xs
|
---|
1784 | should be given.
|
---|
1785 | .PP
|
---|
1786 | Teleray terminals, where tabs turn all characters moved over to blanks,
|
---|
1787 | should indicate
|
---|
1788 | .B xt
|
---|
1789 | (destructive tabs).
|
---|
1790 | This glitch is also taken to mean that it is not possible
|
---|
1791 | to position the cursor on top of a \*(lqmagic cookie\*(rq, and that
|
---|
1792 | to erase standout mode it is necessary to use delete and insert line.
|
---|
1793 | .PP
|
---|
1794 | The Beehive Superbee, which is unable to correctly transmit the
|
---|
1795 | \s-2ESC\s0 or ^C characters, has
|
---|
1796 | .BR xb ,
|
---|
1797 | indicating that the \*(lqf1\*(rq key is used for \s-2ESC\s0 and \*(lqf2\*(rq for ^C.
|
---|
1798 | (Only certain Superbees have this problem, depending on the ROM.)
|
---|
1799 | .PP
|
---|
1800 | Other specific terminal problems may be corrected by adding more
|
---|
1801 | capabilities of the form \fBx\fIx\^\fP.
|
---|
1802 | .br
|
---|
1803 | .ne 5
|
---|
1804 | .PP
|
---|
1805 | .B Similar Terminals
|
---|
1806 | .PP
|
---|
1807 | If there are two very similar terminals,
|
---|
1808 | one can be defined as being just like the other with certain exceptions.
|
---|
1809 | The string capability
|
---|
1810 | .B tc
|
---|
1811 | can be given
|
---|
1812 | with the name of the similar terminal.
|
---|
1813 | This capability must be
|
---|
1814 | .IR last\^ ,
|
---|
1815 | and the combined length of the entries
|
---|
1816 | must not exceed 1024.
|
---|
1817 | The capabilities given before
|
---|
1818 | .B tc
|
---|
1819 | override those in the terminal type invoked by
|
---|
1820 | .BR tc .
|
---|
1821 | A capability can be canceled by placing
|
---|
1822 | .B xx@
|
---|
1823 | to the left of the
|
---|
1824 | .B tc
|
---|
1825 | invocation, where
|
---|
1826 | .I xx\^
|
---|
1827 | is the capability.
|
---|
1828 | For example, the entry
|
---|
1829 | .PP
|
---|
1830 | hn\||\|2621\-nl:ks@:ke@:tc=2621:
|
---|
1831 | .PP
|
---|
1832 | defines a \*(lq2621\-nl\*(rq that does not have the
|
---|
1833 | .B ks
|
---|
1834 | or
|
---|
1835 | .B ke
|
---|
1836 | capabilities,
|
---|
1837 | hence does not turn on the function key labels when in visual mode.
|
---|
1838 | This is useful for different modes for a terminal, or for different
|
---|
1839 | user preferences.
|
---|
1840 | .SH AUTHOR
|
---|
1841 | William Joy
|
---|
1842 | .br
|
---|
1843 | Mark Horton added underlining and keypad support
|
---|
1844 | .SH FILES
|
---|
1845 | .TP 15
|
---|
1846 | .B /etc/termcap
|
---|
1847 | file containing terminal descriptions
|
---|
1848 | .B /usr/etc/termcap
|
---|
1849 | file containing more terminal descriptions (Minix-vmd)
|
---|
1850 | .SH SEE ALSO
|
---|
1851 | .BR elvis (1),
|
---|
1852 | .BR more (1),
|
---|
1853 | .BR termcap (3),
|
---|
1854 | .BR printf (3).
|
---|
1855 | .SH "CAVEATS AND BUGS"
|
---|
1856 | Lines and columns are now stored by the kernel as well as in the termcap
|
---|
1857 | entry.
|
---|
1858 | Most programs now use the kernel information primarily; the information
|
---|
1859 | in this file is used only if the kernel does not have any information.
|
---|
1860 | .PP
|
---|
1861 | Not all programs support all entries.
|
---|
1862 | .PP
|
---|
1863 | The MINIX 3
|
---|
1864 | .BR termcap (3)
|
---|
1865 | does not understand everything described here, unlike the one Minix-vmd uses.
|
---|