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