]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993 |
2 | .\" | |
3 | .\" This is free documentation; you can redistribute it and/or | |
4 | .\" modify it under the terms of the GNU General Public License as | |
5 | .\" published by the Free Software Foundation; either version 2 of | |
6 | .\" the License, or (at your option) any later version. | |
7 | .\" | |
8 | .\" The GNU General Public License's references to "object code" | |
9 | .\" and "executables" are to be interpreted as the output of any | |
10 | .\" document formatting or typesetting system, including | |
11 | .\" intermediate and printed output. | |
12 | .\" | |
13 | .\" This manual is distributed in the hope that it will be useful, | |
14 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | .\" GNU General Public License for more details. | |
17 | .\" | |
18 | .\" You should have received a copy of the GNU General Public | |
19 | .\" License along with this manual; if not, write to the Free | |
20 | .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, | |
21 | .\" USA. | |
22 | .\" | |
23 | .\" Modified formatting Sat Jul 24 17:13:38 1993, Rik Faith (faith@cs.unc.edu) | |
24 | .\" Modified (extensions and corrections) Sun May 1 14:21:25 MET DST 1994 Michael Haardt | |
25 | .\" If mistakes in the capabilities are found, please send a bug report to: | |
26 | .\" michael@moria.de | |
27 | .\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond (esr@thyrsus.com) | |
e127c16a | 28 | .TH TERMCAP 5 1996-10-21 "Linux" "Linux Programmer's Manual" |
fea681da MK |
29 | .SH NAME |
30 | termcap \- terminal capability database | |
31 | .SH DESCRIPTION | |
32 | The termcap database is an obsolete facility for describing the | |
c13182ef MK |
33 | capabilities of character-cell terminals and printers. |
34 | It is retained only for capability with old programs; | |
35 | new ones should use the | |
fea681da MK |
36 | .BR terminfo (5) |
37 | database and associated libraries. | |
38 | .LP | |
8478ee02 | 39 | .I /etc/termcap |
fea681da | 40 | is an ASCII file (the database master) that lists the capabilities of |
c13182ef MK |
41 | many different types of terminals. |
42 | Programs can read termcap to find | |
fea681da | 43 | the particular escape codes needed to control the visual attributes of |
c13182ef MK |
44 | the terminal actually in use. |
45 | (Other aspects of the terminal are | |
46 | handled by | |
1e321034 | 47 | .BR stty (1).) |
097585ed MK |
48 | The termcap database is indexed on the |
49 | .B TERM | |
fea681da MK |
50 | environment variable. |
51 | .LP | |
928410b4 | 52 | Termcap entries must be defined on a single logical line, with '\\' |
c13182ef | 53 | used to suppress the newline. |
928410b4 | 54 | Fields are separated by ':'. |
c13182ef MK |
55 | The first field of each entry starts at the left-hand margin, |
56 | and contains a list of names for the terminal, separated by '|'. | |
fea681da MK |
57 | .LP |
58 | The first subfield may (in BSD termcap entries from versions 4.3 and | |
c13182ef MK |
59 | prior) contain a short name consisting of two characters. |
60 | This short name may consist of capital or small letters. | |
61 | In 4.4BSD termcap entries this field is omitted. | |
fea681da MK |
62 | .LP |
63 | The second subfield (first, in the newer 4.4BSD format) contains the | |
097585ed MK |
64 | name used by the environment variable |
65 | .BR TERM . | |
c13182ef MK |
66 | It should be spelled in lowercase letters. |
67 | Selectable hardware capabilities should be marked | |
68 | by appending a hyphen and a suffix to this name. | |
69 | See below for an example. | |
70 | Usual suffixes are w (more than 80 characters wide), am | |
fea681da | 71 | (automatic margins), nam (no automatic margins), and rv (reverse video |
c13182ef MK |
72 | display). |
73 | The third subfield contains a long and descriptive name for | |
fea681da MK |
74 | this termcap entry. |
75 | .LP | |
76 | Subsequent fields contain the terminal capabilities; any continued | |
77 | capability lines must be indented one tab from the left margin. | |
78 | .LP | |
79 | Although there is no defined order, it is suggested to write first | |
80 | boolean, then numeric, and then string capabilities, each sorted | |
c13182ef MK |
81 | alphabetically without looking at lower or upper spelling. |
82 | Capabilities of similar functions can be written in one line. | |
fea681da MK |
83 | .LP |
84 | .nf | |
85 | Example for: | |
86 | .sp | |
87 | Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\e | |
88 | Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\e | |
89 | Boolean: :bs:\e | |
90 | Numeric: :co#80:\e | |
91 | String: :sr=\eE[H:\e | |
c8250206 | 92 | .fi |
fea681da MK |
93 | .SS "Boolean Capabilities" |
94 | .nf | |
95 | 5i Printer will not echo on screen | |
96 | am Automatic margins which means automatic line wrap | |
97 | bs Control-H (8 dec.) performs a backspace | |
98 | bw Backspace on left margin wraps to previous line and right margin | |
99 | da Display retained above screen | |
100 | db Display retained below screen | |
101 | eo A space erases all characters at cursor position | |
102 | es Escape sequences and special characters work in status line | |
103 | gn Generic device | |
104 | hc This is a hardcopy terminal | |
105 | HC The cursor is hard to see when not on bottom line | |
106 | hs Has a status line | |
107 | hz Hazeltine bug, the terminal can not print tilde characters | |
28d88c17 | 108 | in Terminal inserts null bytes, not spaces, to fill whitespace |
fea681da MK |
109 | km Terminal has a meta key |
110 | mi Cursor movement works in insert mode | |
111 | ms Cursor movement works in standout/underline mode | |
112 | NP No pad character | |
113 | NR ti does not reverse te | |
114 | nx No padding, must use XON/XOFF | |
115 | os Terminal can overstrike | |
116 | ul Terminal underlines although it can not overstrike | |
117 | xb Beehive glitch, f1 sends ESCAPE, f2 sends ^C | |
118 | xn Newline/wraparound glitch | |
119 | xo Terminal uses xon/xoff protocol | |
120 | xs Text typed over standout text will be displayed in standout | |
121 | xt Teleray glitch, destructive tabs and odd standout mode | |
122 | .fi | |
123 | .SS "Numeric Capabilities" | |
124 | .nf | |
125 | co Number of columns | |
126 | dB Delay in milliseconds for backspace on hardcopy terminals | |
127 | dC Delay in milliseconds for carriage return on hardcopy terminals | |
128 | dF Delay in milliseconds for form feed on hardcopy terminals | |
129 | dN Delay in milliseconds for new line on hardcopy terminals | |
130 | dT Delay in milliseconds for tabulator stop on hardcopy terminals | |
c8722768 MK |
131 | dV Delay in milliseconds for vertical tabulator stop on |
132 | hardcopy terminals | |
fea681da MK |
133 | it Difference between tab positions |
134 | lh Height of soft labels | |
135 | lm Lines of memory | |
136 | lw Width of soft labels | |
137 | li Number of lines | |
138 | Nl Number of soft labels | |
139 | pb Lowest baud rate which needs padding | |
140 | sg Standout glitch | |
141 | ug Underline glitch | |
142 | vt virtual terminal number | |
143 | ws Width of status line if different from screen width | |
144 | .fi | |
145 | .SS "String Capabilities" | |
146 | .nf | |
147 | !1 shifted save key | |
148 | !2 shifted suspend key | |
149 | !3 shifted undo key | |
150 | #1 shifted help key | |
151 | #2 shifted home key | |
152 | #3 shifted input key | |
153 | #4 shifted cursor left key | |
154 | %0 redo key | |
155 | %1 help key | |
156 | %2 mark key | |
157 | %3 message key | |
158 | %4 move key | |
159 | %5 next-object key | |
160 | %6 open key | |
161 | %7 options key | |
162 | %8 previous-object key | |
163 | %9 print key | |
164 | %a shifted message key | |
165 | %b shifted move key | |
166 | %c shifted next key | |
167 | %d shifted options key | |
168 | %e shifted previous key | |
169 | %f shifted print key | |
170 | %g shifted redo key | |
171 | %h shifted replace key | |
be88d3f7 | 172 | %i shifted cursor right key |
fea681da MK |
173 | %j shifted resume key |
174 | &0 shifted cancel key | |
175 | &1 reference key | |
176 | &2 refresh key | |
177 | &3 replace key | |
178 | &4 restart key | |
179 | &5 resume key | |
180 | &6 save key | |
181 | &7 suspend key | |
182 | &8 undo key | |
183 | &9 shifted begin key | |
184 | *0 shifted find key | |
185 | *1 shifted command key | |
186 | *2 shifted copy key | |
187 | *3 shifted create key | |
188 | *4 shifted delete character | |
189 | *5 shifted delete line | |
190 | *6 select key | |
191 | *7 shifted end key | |
192 | *8 shifted clear line key | |
193 | *9 shifted exit key | |
194 | @0 find key | |
195 | @1 begin key | |
196 | @2 cancel key | |
197 | @3 close key | |
198 | @4 command key | |
199 | @5 copy key | |
200 | @6 create key | |
201 | @7 end key | |
202 | @8 enter/send key | |
203 | @9 exit key | |
204 | al Insert one line | |
9fdfa163 | 205 | AL Insert %1 lines |
fea681da MK |
206 | ac Pairs of block graphic characters to map alternate character set |
207 | ae End alternative character set | |
208 | as Start alternative character set for block graphic characters | |
209 | bc Backspace, if not ^H | |
210 | bl Audio bell | |
211 | bt Move to previous tab stop | |
212 | cb Clear from beginning of line to cursor | |
213 | cc Dummy command character | |
214 | cd Clear to end of screen | |
215 | ce Clear to end of line | |
216 | ch Move cursor horizontally only to column %1 | |
217 | cl Clear screen and cursor home | |
218 | cm Cursor move to row %1 and column %2 (on screen) | |
219 | CM Move cursor to row %1 and column %2 (in memory) | |
220 | cr Carriage return | |
221 | cs Scroll region from line %1 to %2 | |
222 | ct Clear tabs | |
223 | cv Move cursor vertically only to line %1 | |
224 | dc Delete one character | |
225 | DC Delete %1 characters | |
226 | dl Delete one line | |
227 | DL Delete %1 lines | |
228 | dm Begin delete mode | |
229 | do Cursor down one line | |
230 | DO Cursor down #1 lines | |
231 | ds Disable status line | |
232 | eA Enable alternate character set | |
233 | ec Erase %1 characters starting at cursor | |
234 | ed End delete mode | |
235 | ei End insert mode | |
236 | ff Formfeed character on hardcopy terminals | |
237 | fs Return character to its position before going to status line | |
238 | F1 The string sent by function key f11 | |
239 | F2 The string sent by function key f12 | |
240 | F3 The string sent by function key f13 | |
241 | \&... \&... | |
242 | F9 The string sent by function key f19 | |
243 | FA The string sent by function key f20 | |
244 | FB The string sent by function key f21 | |
245 | \&... \&... | |
246 | FZ The string sent by function key f45 | |
247 | Fa The string sent by function key f46 | |
248 | Fb The string sent by function key f47 | |
249 | \&... \&... | |
250 | Fr The string sent by function key f63 | |
251 | hd Move cursor a half line down | |
252 | ho Cursor home | |
253 | hu Move cursor a half line up | |
254 | i1 Initialization string 1 at login | |
255 | i3 Initialization string 3 at login | |
256 | is Initialization string 2 at login | |
257 | ic Insert one character | |
258 | IC Insert %1 characters | |
259 | if Initialization file | |
260 | im Begin insert mode | |
261 | ip Insert pad time and needed special characters after insert | |
262 | iP Initialization program | |
263 | K1 upper left key on keypad | |
264 | K2 center key on keypad | |
265 | K3 upper right key on keypad | |
266 | K4 bottom left key on keypad | |
267 | K5 bottom right key on keypad | |
268 | k0 Function key 0 | |
269 | k1 Function key 1 | |
270 | k2 Function key 2 | |
271 | k3 Function key 3 | |
272 | k4 Function key 4 | |
273 | k5 Function key 5 | |
274 | k6 Function key 6 | |
275 | k7 Function key 7 | |
276 | k8 Function key 8 | |
277 | k9 Function key 9 | |
278 | k; Function key 10 | |
279 | ka Clear all tabs key | |
280 | kA Insert line key | |
281 | kb Backspace key | |
282 | kB Back tab stop | |
283 | kC Clear screen key | |
284 | kd Cursor down key | |
285 | kD Key for delete character under cursor | |
286 | ke turn keypad off | |
287 | kE Key for clear to end of line | |
9fdfa163 | 288 | kF Key for scrolling forward/down |
fea681da MK |
289 | kh Cursor home key |
290 | kH Cursor hown down key | |
291 | kI Insert character/Insert mode key | |
292 | kl Cursor left key | |
293 | kL Key for delete line | |
294 | kM Key for exit insert mode | |
295 | kN Key for next page | |
296 | kP Key for previous page | |
297 | kr Cursor right key | |
9fdfa163 | 298 | kR Key for scrolling backward/up |
fea681da MK |
299 | ks Turn keypad on |
300 | kS Clear to end of screen key | |
301 | kt Clear this tab key | |
302 | kT Set tab here key | |
303 | ku Cursor up key | |
304 | l0 Label of zeroth function key, if not f0 | |
305 | l1 Label of first function key, if not f1 | |
306 | l2 Label of first function key, if not f2 | |
307 | \&... \&... | |
308 | la Label of tenth function key, if not f10 | |
309 | le Cursor left one character | |
310 | ll Move cursor to lower left corner | |
311 | LE Cursor left %1 characters | |
312 | LF Turn soft labels off | |
313 | LO Turn soft labels on | |
314 | mb Start blinking | |
315 | MC Clear soft margins | |
316 | md Start bold mode | |
317 | me End all mode like so, us, mb, md and mr | |
318 | mh Start half bright mode | |
319 | mk Dark mode (Characters invisible) | |
320 | ML Set left soft margin | |
321 | mm Put terminal in meta mode | |
322 | mo Put terminal out of meta mode | |
323 | mp Turn on protected attribute | |
324 | mr Start reverse mode | |
325 | MR Set right soft margin | |
326 | nd Cursor right one character | |
327 | nw Carriage return command | |
328 | pc Padding character | |
329 | pf Turn printer off | |
330 | pk Program key %1 to send string %2 as if typed by user | |
331 | pl Program key %1 to execute string %2 in local mode | |
1954b6a9 | 332 | pn Program soft label %1 to show string %2 |
fea681da MK |
333 | po Turn the printer on |
334 | pO Turn the printer on for %1 (<256) bytes | |
335 | ps Print screen contents on printer | |
336 | px Program key %1 to send string %2 to computer | |
337 | r1 Reset string 1 to set terminal to sane modes | |
338 | r2 Reset string 2 to set terminal to sane modes | |
339 | r3 Reset string 3 to set terminal to sane modes | |
340 | RA disable automatic margins | |
341 | rc Restore saved cursor position | |
ef50679c | 342 | rf Reset string filename |
fea681da MK |
343 | RF Request for input from terminal |
344 | RI Cursor right %1 characters | |
345 | rp Repeat character %1 for %2 times | |
346 | rP Padding after character sent in replace mode | |
347 | rs Reset string | |
348 | RX Turn off XON/XOFF flow control | |
349 | sa Set %1 %2 %3 %4 %5 %6 %7 %8 %9 attributes | |
350 | SA enable automatic margins | |
351 | sc Save cursor position | |
352 | se End standout mode | |
353 | sf Normal scroll one line | |
354 | SF Normal scroll %1 lines | |
355 | so Start standout mode | |
356 | sr Reverse scroll | |
357 | SR scroll back %1 lines | |
358 | st Set tabulator stop in all rows at current column | |
359 | SX Turn on XON/XOFF flow control | |
360 | ta move to next hardware tab | |
361 | tc Read in terminal description from another entry | |
362 | te End program that uses cursor motion | |
363 | ti Begin program that uses cursor motion | |
364 | ts Move cursor to column %1 of status line | |
365 | uc Underline character under cursor and move cursor right | |
366 | ue End underlining | |
367 | up Cursor up one line | |
368 | UP Cursor up %1 lines | |
369 | us Start underlining | |
370 | vb Visible bell | |
371 | ve Normal cursor visible | |
9fdfa163 | 372 | vi Cursor invisible |
fea681da MK |
373 | vs Standout cursor |
374 | wi Set window from line %1 to %2 and column %3 to %4 | |
375 | XF XOFF character if not ^S | |
376 | .fi | |
377 | .LP | |
378 | There are several ways of defining the control codes for string capabilities: | |
379 | .LP | |
9fdfa163 | 380 | Every normal character represents itself, except '^','\e' and '%'. |
fea681da | 381 | .LP |
c13182ef MK |
382 | A '^x' means Control-x. |
383 | Control-A equals 1 decimal. | |
fea681da | 384 | .LP |
c13182ef MK |
385 | \ex means a special code. |
386 | x can be one of the following characters: | |
fea681da MK |
387 | .RS |
388 | E Escape (27) | |
389 | .br | |
390 | n Linefeed (10) | |
391 | .br | |
392 | r Carriage return (13) | |
393 | .br | |
394 | t Tabulation (9) | |
395 | .br | |
396 | b Backspace (8) | |
397 | .br | |
398 | f Form feed (12) | |
399 | .br | |
c13182ef MK |
400 | 0 Null character. |
401 | A \exxx specifies the octal character xxx. | |
fea681da MK |
402 | .RE |
403 | .IP i | |
9fdfa163 | 404 | Increments parameters by one. |
fea681da MK |
405 | .IP r |
406 | Single parameter capability | |
407 | .IP + | |
408 | Add value of next character to this parameter and do binary output | |
409 | .IP 2 | |
410 | Do ASCII output of this parameter with a field with of 2 | |
411 | .IP d | |
412 | Do ASCII output of this parameter with a field with of 3 | |
413 | .IP % | |
414 | Print a '%' | |
415 | .LP | |
416 | If you use binary output, then you should avoid the null character | |
c13182ef MK |
417 | because it terminates the string. |
418 | You should reset tabulator expansion | |
fea681da MK |
419 | if a tabulator can be the binary output of a parameter. |
420 | .IP Warning: | |
421 | The above metacharacters for parameters may be wrong, they document Minix | |
422 | termcap which may not be compatible with Linux termcap. | |
423 | .LP | |
424 | The block graphic characters can be specified by three string capabilities: | |
425 | .IP as | |
426 | start the alternative charset | |
427 | .IP ae | |
428 | end it | |
429 | .IP ac | |
c13182ef MK |
430 | pairs of characters. |
431 | The first character is the name of the block graphic | |
fea681da MK |
432 | symbol and the second characters is its definition. |
433 | .LP | |
434 | The following names are available: | |
435 | .sp | |
436 | .nf | |
437 | + right arrow (>) | |
438 | , left arrow (<) | |
439 | \&. down arrow (v) | |
440 | 0 full square (#) | |
9fdfa163 | 441 | I lantern (#) |
fea681da MK |
442 | - upper arrow (^) |
443 | \&' rhombus (+) | |
444 | a chess board (:) | |
445 | f degree (') | |
446 | g plus-minus (#) | |
447 | h square (#) | |
448 | j right bottom corner (+) | |
449 | k right upper corner (+) | |
450 | l left upper corner (+) | |
451 | m left bottom corner (+) | |
452 | n cross (+) | |
453 | o upper horizontal line (-) | |
454 | q middle horizontal line (-) | |
455 | s bottom horizontal line (_) | |
456 | t left tee (+) | |
457 | u right tee (+) | |
458 | v bottom tee (+) | |
459 | w normal tee (+) | |
460 | x vertical line (|) | |
461 | ~ paragraph (???) | |
462 | .fi | |
463 | .sp | |
464 | The values in parentheses are suggested defaults which are used by curses, | |
465 | if the capabilities are missing. | |
466 | .SH "SEE ALSO" | |
b99ec2bd | 467 | .BR ncurses (3), |
fea681da MK |
468 | .BR termcap (3), |
469 | .BR terminfo (5) |