1 .\" Copyright (c) 1993 Michael Haardt (michael@moria.de),
2 .\" Fri Apr 2 11:32:09 MET DST 1993
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
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.
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.
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.
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, see
22 .\" <http://www.gnu.org/licenses/>.
25 .\" Modified formatting Sat Jul 24 17:13:38 1993, Rik Faith (faith@cs.unc.edu)
26 .\" Modified (extensions and corrections)
27 .\" Sun May 1 14:21:25 MET DST 1994 Michael Haardt
28 .\" If mistakes in the capabilities are found, please send a bug report to:
30 .\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond (esr@thyrsus.com)
31 .TH TERMCAP 5 2020-08-13 "Linux" "Linux Programmer's Manual"
33 termcap \- terminal capability database
35 The termcap database is an obsolete facility for describing the
36 capabilities of character-cell terminals and printers.
37 It is retained only for compatibility with old programs;
38 new programs should use the
40 database and associated libraries.
43 is an ASCII file (the database master) that lists the capabilities of
44 many different types of terminals.
45 Programs can read termcap to find
46 the particular escape codes needed to control the visual attributes of
47 the terminal actually in use.
48 (Other aspects of the terminal are
51 The termcap database is indexed on the
55 Termcap entries must be defined on a single logical line, with \(aq\e\(aq
56 used to suppress the newline.
57 Fields are separated by \(aq:\(aq.
58 The first field of each entry starts at the left-hand margin,
59 and contains a list of names for the terminal, separated by \(aq|\(aq.
61 The first subfield may (in BSD termcap entries from versions 4.3 and
62 earlier) contain a short name consisting of two characters.
63 This short name may consist of capital or small letters.
64 In 4.4BSD, termcap entries this field is omitted.
66 The second subfield (first, in the newer 4.4BSD format) contains the
67 name used by the environment variable
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
74 (automatic margins), nam (no automatic margins), and rv (reverse video
76 The third subfield contains a long and descriptive name for
79 Subsequent fields contain the terminal capabilities; any continued
80 capability lines must be indented one tab from the left margin.
82 Although there is no defined order, it is suggested to write first
83 boolean, then numeric, and then string capabilities, each sorted
84 alphabetically without looking at lower or upper spelling.
85 Capabilities of similar functions can be written in one line.
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
96 .SS Boolean capabilities
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
107 hc This is a hardcopy terminal
108 HC The cursor is hard to see when not on bottom line
110 hz Hazeltine bug, the terminal can not print tilde characters
111 in Terminal inserts null bytes, not spaces, to fill whitespace
112 km Terminal has a meta key
113 mi Cursor movement works in insert mode
114 ms Cursor movement works in standout/underline mode
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
120 xb Beehive glitch, f1 sends ESCAPE, f2 sends \fB\(haC\fP
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
126 .SS Numeric capabilities
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
134 dV Delay in milliseconds for vertical tabulator stop on
136 it Difference between tab positions
137 lh Height of soft labels
139 lw Width of soft labels
141 Nl Number of soft labels
142 pb Lowest baud rate which needs padding
145 vt virtual terminal number
146 ws Width of status line if different from screen width
148 .SS String capabilities
151 !2 shifted suspend key
156 #4 shifted cursor left key
165 %8 previous-object key
167 %a shifted message key
170 %d shifted options key
171 %e shifted previous key
174 %h shifted replace key
175 %i shifted cursor right key
176 %j shifted resume key
177 &0 shifted cancel key
188 *1 shifted command key
190 *3 shifted create key
191 *4 shifted delete character
192 *5 shifted delete line
195 *8 shifted clear line key
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
212 bc Backspace, if not \fB\(haH\fP
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)
224 cs Scroll region from line %1 to %2
226 cv Move cursor vertically only to line %1
227 dc Delete one character
228 DC Delete %1 characters
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
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
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
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
253 Fr The string sent by function key f63
254 hd Move cursor a half line down
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
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
282 ka Clear all tabs key
288 kD Key for delete character under cursor
290 kE Key for clear to end of line
291 kF Key for scrolling forward/down
293 kH Cursor hown down key
294 kI Insert character/Insert mode key
296 kL Key for delete line
297 kM Key for exit insert mode
299 kP Key for previous page
301 kR Key for scrolling backward/up
303 kS Clear to end of screen key
304 kt Clear this tab 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
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
318 MC Clear soft margins
320 me End all mode like so, us, mb, md, and mr
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
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
335 pn Program soft label %1 to show string %2
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
345 rf Reset string filename
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
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
356 sf Normal scroll one line
357 SF Normal scroll %1 lines
358 so Start standout mode
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
370 up Cursor up one line
371 UP Cursor up %1 lines
374 ve Normal cursor visible
377 wi Set window from line %1 to %2 and column %3 to %4
378 XF XOFF character if not \fB\(haS\fP
381 There are several ways of defining the control codes for string capabilities:
383 Every normal character represents itself,
384 except \(aq\(ha\(aq, \(aq\e\(aq, and \(aq%\(aq.
386 A \fB\(hax\fP means Control-x.
387 Control-A equals 1 decimal.
389 \ex means a special code.
390 x can be one of the following characters:
396 r Carriage return (13)
405 A \exxx specifies the octal character xxx.
408 Increments parameters by one.
410 Single parameter capability
412 Add value of next character to this parameter and do binary output
414 Do ASCII output of this parameter with a field with of 2
416 Do ASCII output of this parameter with a field with of 3
420 If you use binary output, then you should avoid the null character (\(aq\e0\(aq)
421 because it terminates the string.
422 You should reset tabulator expansion
423 if a tabulator can be the binary output of a parameter.
425 The above metacharacters for parameters may be wrong: they document Minix
426 termcap which may not be compatible with Linux termcap.
428 The block graphic characters can be specified by three string capabilities:
430 start the alternative charset
432 end the alternative charset
435 The first character is the name of the block graphic
436 symbol and the second characters is its definition.
438 The following names are available:
452 j right bottom corner (+)
453 k right upper corner (+)
454 l left upper corner (+)
455 m left bottom corner (+)
457 o upper horizontal line (-)
458 q middle horizontal line (-)
459 s bottom horizontal line (_)
468 The values in parentheses are suggested defaults which are used by the
470 library, if the capabilities are missing.