|
|
1.1 root 1: .TH TERMCAP 5
2: .CT 2 comm_term
3: .SH NAME
4: termcap \- terminal capability file
5: .SH DESCRIPTION
6: .I Termcap
7: describes terminals as used, for example, by
8: .IR vi (1)
9: and
10: .IR curses (3)
11: or in the
12: .B TERMCAP
13: environment variable.
14: A
15: .I termcap
16: entry is a line containing fields separated by
17: .LR : .
18: Lines may be broken;
19: .L \e
20: at the end of a line signifies continuation.
21: Empty fields are ignored.
22: .PP
23: The first field for each entry gives names
24: for a terminal separated by
25: .LR | .
26: The first name is conventionally two characters long
27: for the benefit of older systems; the
28: second name is the customary abbreviation; and
29: the last name fully identifies
30: the terminal.
31: .PP
32: There are three types of capability: Boolean for the presence of
33: a feature, numeric for sizes and time delays, and
34: strings for performing operations.
35: Some string fields may be preceded by a number, which
36: specifies padding, a time delay required with the operation.
37: These capabilities are marked
38: `P' or `P*' below.
39: Padding is measured in milliseconds;
40: P* signifies that the padding is proportional to the
41: number of lines (or characters) affected,
42: for example,
43: .L 3.5*
44: specifies 3.5 milliseconds per unit.
45: .de fq
46: \f5\\$1\fR \\$2 \\$3 \\$4
47: ..
48: .ft B
49: .ta \w'Name 'u +\w'Type 'u +\w'Pad 'u
50: .nf
51: .PP
52: Name Type Pad Description
53: .ftR
54: .fq ae str P "End alternate character set
55: .fq al str P* "Add new blank line
56: .fq am bool "" "Automatic margin
57: .fq as str P "Start alternate character set
58: .fq bc str "" "Backspace char if not \f5^H\fP
59: .fq bs bool "" "Terminal can backspace
60: .fq bt str P "Back tab
61: .fq bw bool "" "Backspace wraps from column 0 to last column
62: .fq CC str "" "Command character in prototype if terminal settable
63: .fq cd str P* "Clear to end of display
64: .fq ce str P "Clear to end of line
65: .fq ch str P "Like \f5cm\fP but horizontal motion only
66: .fq cl str P* "Clear screen
67: .fq cm str P "Cursor motion
68: .fq co num "" "Number of columns
69: .fq cr str P* "Carriage return, default \f5^M\fR
70: .fq cs str P "Change scrolling region (vt100), like cm
71: .fq cv str P "Like ch, but vertical only
72: .fq da bool "" "Display may be retained above
73: .fq dB num "" "Backspace delay
74: .fq db bool "" "Display may be retained below
75: .fq dC num "" "Carriage return delay
76: .fq dc str P* "Delete character
77: .fq dF num "" "Form feed delay
78: .fq dl str P* "Delete line
79: .fq dm str "" "Enter delete mode
80: .fq dN num "" "Newline delay
81: .fq do str "" "Down one line
82: .fq dT num "" "tab delay
83: .fq ed str "" "End delete mode
84: .fq ei str "" "End insert mode; give \f5:ei=:\fR if \f5ic\fR
85: .fq eo str "" "Can erase overstrikes with blank
86: .fq ff str P* "Hard copy page eject, default \f5^L\fR
87: .fq hc bool "" "Hardcopy terminal
88: .fq hd str "" "Half line down
89: .fq ho str "" "Home cursor if no \f5cm\fR
90: .fq hu str "" "Half line up
91: .fq hz str "" "Hazeltine, can't print \f5~\fR
92: .fq ic str P "Insert character
93: .fq if str "" "Name of file containing initialization\f5is\fR
94: .fq im bool "" "Enter insert mode; give \f5:im=:\fR if \f5ic\fR
95: .fq in bool "" "Insert mode distinguishes nulls on display
96: .fq ip str P* "Insert pad after character insert
97: .fq is str "" "Terminal initialization string
98: .fq k0\fR-\fPk9 str "" "Other function key codes
99: .fq kb str "" "Backspace key code
100: .fq kd str "" "Down arrow key code
101: .fq ke str "" "Leave keypad transmit mode
102: .fq kh str "" "Home key code
103: .fq kl str "" "Left arrow key code
104: .fq kn num "" "Number of function keys
105: .fq ko str "" "Termcap entries for other non-function keys
106: .fq kr str "" "Right arrow key code
107: .fq ks str "" "Enter keypad transmit mode
108: .fq ku str "" "Up arrow key code
109: .fq l0\fR-\fP9 str "" "Labels on other function keys
110: .fq li num "" "Number of lines on screen or page
111: .fq ll str "" "Last line, first column, if no \f5cm\fR
112: .fq ma str "" "Arrow key map
113: .fq mi bool "" "Safe to move in insert mode
114: .fq ml str "" "Memory lock above cursor
115: .fq ms bool "" "Safe to move in standout or underline mode
116: .fq mu str "" "Turn off memory lock
117: .fq nc bool "" "No correctly working CR (DM2500, H2000)
118: .fq nd str "" "Nondestructive space (cursor right)
119: .fq nl str P* "Newline character, default \f5\en\fR
120: .fq ns bool "" "Nonscrolling CRT
121: .fq os bool "" "Terminal overstrikes
122: .fq pc str "" "Pad character, default NUL
123: .fq pt bool "" "Has hardware tabs (possibly set by \f5is\fR)
124: .fq se str "" "Leave standout mode
125: .fq sf str P "Scroll forward
126: .fq sg num "" "Number of blanks left by \f5so\fR, \f5se\fR
127: .fq so str "" "Enter standout mode
128: .fq sr str P "Scroll reverse (backward)
129: .fq ta str P "Tab, if not \f5^I\fR or if padded
130: .fq tc str "" "Entry of similar terminal, must be last
131: .fq te str "" "String to end programs that use \f5cm\fR
132: .fq ti str "" "String to begin programs that use \f5cm\fR
133: .fq uc str "" "Underscore one char and move past it
134: .fq ue str "" "Leave underscore mode
135: .fq ug num "" "Number of blanks left by \f5us\fR, \f5ue\fR
136: .fq ul bool "" "Terminal underlines but doesn't overstrike
137: .fq up str "" "Cursor up one line
138: .fq us str "" "Enter underscore mode
139: .fq vb str "" "Visible bell, (may not move cursor)
140: .fq ve str "" "Leave open/visual mode
141: .fq vs str "" "Enter open/visual mode
142: .fq xb bool "" "Beehive (\f5f1\fR=escape, \f5f2\fR=\f5^C\fR)
143: .fq xn bool "" "Newline ignored after wrap (Concept)
144: .fq xr bool "" "Return acts like \f5ce \er \en\fR (Delta Data)
145: .fq xs bool "" "Standout not erased by writing over (HP264?)
146: .fq xt bool "" "Tabs are destructive, magic \f5so\fR (Teleray 1061)
147: .fi
148: .PP
149: The following example is one of the
150: more elaborate
151: .I termcap
152: entries.
153: (Do not believe it; see the file for current facts.)
154: .HP
155: .EX
156: co|c100|concept 100:is=\eEU\eEf\eE7\eE5\eE8\eEl\eENH\eEK\eE\e200\eEo&\e200\eEo\e47\eE:\e
157: :al=3*\eE^R:am:bs:cd=16*\eE^C:ce=16\eE^S:cl=2*^L:cm=\eEa%+ %+ :co#80:\e
158: :dc=16\eE^A:dl=3*\eE^B:ei=\eE\e200:eo:im=\eE^P:in:ip=16*:li#24:mi:\e
159: :nd=\eE=:se=\eEd\eE:so=\eED\eEE:ta=8\et:ul:up=\eE;vb=\eEk\eEk:xn:
160: .EE
161: .PP
162: Among the Boolean capabilities shown for the Concept are
163: automatic margins
164: .LR am :
165: automatic return and linefeed at the end of a line.
166: Numeric capabilities are indicated by
167: .LR # ;
168: .L co#80
169: means the Concept has 80 columns.
170: String capabilities are indicated by
171: .LR = ;
172: to clear to end of line
173: .RL ( ce )
174: on the Concept, issue <escape> <control-C> and pad
175: with 16 milliseconds delay.
176: .PP
177: In strings the
178: .SM ASCII ESC
179: character is represented by
180: .LR \eE
181: and control characters are represented by
182: .BI ^ c,
183: where character
184: .I c
185: has
186: .SM ASCII
187: code 0100 greater than the desired control character.
188: Newline, return, tab, backspace, form feed,
189: .B \e
190: and
191: .B ^
192: are represented by
193: .BR "\en \er \et \eb \ef \e\e \e^" .
194: Backslash
195: .L \e
196: followed by 3 digits specifies a byte in octal.
197: A null character is encoded
198: .LR \e200 :
199: the routines that use
200: .I termcap
201: information mask out the high bit of all bytes.
202: .PP
203: Local cursor motions are undefined if they run off the
204: left or top of the screen; the
205: .I curses
206: routines refrain from issuing such motions.
207: It is assumed that the screen will scroll up upon running
208: off the bottom; this assumption is negated by
209: .LR ns .
210: Capability
211: .L am
212: (automatic margin) describes the handling of the right margin.
213: .PP
214: Cursor addressing is described by capability
215: .LR cm ,
216: which contains
217: .IR printf (3)-like
218: format codes for line and column positions.
219: The leftmost column is column 0.
220: .IP
221: .nf
222: .fq %d "as in \fIprintf\fR
223: .fq %2 "like \f5%2d\fR
224: .fq %3 "like \f5%3d\fR
225: .fq %. "like \f5%c\fR
226: .fq %+\fIx\fR "adds \fIx\fR before converting
227: .fq %>\fIxy\fR "if value exceeds \fIx\fR, add \fIy\fR, no output
228: .fq %r "reverse order of line and column, no output
229: .fq %i "increment line/column (1-origin)
230: .fq %% "single \f5%\fR
231: .fq %n "exclusive or row and column with 0140 (DM2500)
232: .fq %B "BCD: 16\(**(\fIx/10) + (\fIx\fR%10), no output
233: .fq %D "Reverse coding: \fIx\fR\-2\(**(\fIx\fR%16), no output
234: .fi
235: .PP
236: For example, to go to line 3 column 12, a HP2645 terminal
237: must get
238: .B \eE&a12c03Y
239: padded for 6 milliseconds:
240: .L :cm=6\eE&%r%2c%2Y: .
241: .PP
242: Capability
243: .L al
244: adds an empty line before the line where the cursor is
245: and leaves the cursor on the new line.
246: This will always be done with the cursor at column 0.
247: Capability
248: .L dl
249: deletes the line where the cursor is and is also done
250: with the cursor at column 0.
251: Capabilities
252: .L da
253: and
254: .L db
255: warn that off-screen lines may appear at the top or bottom of
256: the screen upon scrolling or deleting lines.
257: The
258: .I curses
259: routines do not use this feature, but do guard against
260: its effects.
261: .PP
262: Insert-character operations usually affect only
263: the current line and shift
264: characters off the end of the line rigidly.
265: Some terminals, such as the Concept 100, distinguish
266: typed from untyped blanks on the screen, shifting upon insertion
267: only up to an untyped blank, i.e. a space caused by cursor motion;
268: these terminals have capability
269: .L in
270: (insert null).
271: .PP
272: Some terminals have an insertion mode; others require a special
273: sequence to open up a blank position on the current line.
274: Insertion mode is entered and left by
275: .L im
276: and
277: .LR ie ,
278: which should be null strings if there is no insertion mode.
279: String
280: .L ic
281: is sent just before each character to be inserted, and
282: padding
283: .L ip
284: is sent after.
285: Capability
286: .L mi
287: says it is possible to move around without leaving insertion
288: mode.
289: Delete mode works similarly: enter with
290: .LR dm ,
291: leave with
292: .LR de ,
293: and issue
294: .L dc
295: before each character.
296: .PP
297: Highlighting, or `standout' mode is entered by
298: .L so
299: and left by
300: .LR se .
301: Underline mode is entered by
302: .L us
303: and left by
304: .LR ue .
305: Terminals that underline characters individually have capability
306: .LR uc .
307: The visual bell capability
308: .L vb
309: flashes the screen without moving the cursor.
310: .PP
311: A terminal with a keypad that transmits cursor motions
312: may be described by capabilities
313: .L
314: kl kr ku kd kh
315: that give the codes for left, right, up, down, and home.
316: Up to ten function keys may be described by
317: .L k0
318: through
319: .LR k9 .
320: Special labels for the function keys may be given as
321: .L l0
322: through
323: .LR l9 .
324: .PP
325: The initialization string
326: .L is
327: is expected to set tabs if that is necessary.
328: That string may come from a file
329: .RL ( if );
330: if both are present
331: .L is
332: is done first.
333: .PP
334: The entry for a terminal may be continued by jumping
335: to another entry given by
336: .LR tc .
337: Duplicate capabilities are resolved in favor of the first.
338: .SH FILES
339: .F /etc/termcap
340: .SH SEE ALSO
341: .IR curses (3),
342: .IR termcap (3),
343: .IR vi (1),
344: .IR ul (1)
345: .SH BUGS
346: .I Termcap
347: entries, including
348: .L tc
349: continuations, are limited to 1024 characters.
350: .br
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.