1 .\" Copyright (c) 1993 Michael Haardt (michael@moria.de),
2 .\" Fri Apr 2 11:32:09 MET DST 1993
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\" Modified formatting Sat Jul 24 17:13:38 1993, Rik Faith (faith@cs.unc.edu)
7 .\" Modified (extensions and corrections)
8 .\" Sun May 1 14:21:25 MET DST 1994 Michael Haardt
9 .\" If mistakes in the capabilities are found, please send a bug report to:
11 .\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond (esr@thyrsus.com)
12 .TH termcap 5 (date) "Linux man-pages (unreleased)"
14 termcap \- terminal capability database
16 The termcap database is an obsolete facility for describing the
17 capabilities of character-cell terminals and printers.
18 It is retained only for compatibility with old programs;
19 new programs should use the
21 database and associated libraries.
24 is an ASCII file (the database master) that lists the capabilities of
25 many different types of terminals.
26 Programs can read termcap to find
27 the particular escape codes needed to control the visual attributes of
28 the terminal actually in use.
29 (Other aspects of the terminal are
32 The termcap database is indexed on the
36 Termcap entries must be defined on a single logical line, with \[aq]\e\[aq]
37 used to suppress the newline.
38 Fields are separated by \[aq]:\[aq].
39 The first field of each entry starts at the left-hand margin,
40 and contains a list of names for the terminal, separated by \[aq]|\[aq].
42 The first subfield may (in BSD termcap entries from 4.3BSD and
43 earlier) contain a short name consisting of two characters.
44 This short name may consist of capital or small letters.
45 In 4.4BSD, termcap entries this field is omitted.
47 The second subfield (first, in the newer 4.4BSD format) contains the
48 name used by the environment variable
50 It should be spelled in lowercase letters.
51 Selectable hardware capabilities should be marked
52 by appending a hyphen and a suffix to this name.
53 See below for an example.
54 Usual suffixes are w (more than 80 characters wide), am
55 (automatic margins), nam (no automatic margins), and rv (reverse video
57 The third subfield contains a long and descriptive name for
60 Subsequent fields contain the terminal capabilities; any continued
61 capability lines must be indented one tab from the left margin.
63 Although there is no defined order, it is suggested to write first
64 boolean, then numeric, and then string capabilities, each sorted
65 alphabetically without looking at lower or upper spelling.
66 Capabilities of similar functions can be written in one line.
71 Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\e
72 Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\e
77 .SS Boolean capabilities
79 5i Printer will not echo on screen
80 am Automatic margins which means automatic line wrap
81 bs Control-H (8 dec.) performs a backspace
82 bw Backspace on left margin wraps to previous line and right margin
83 da Display retained above screen
84 db Display retained below screen
85 eo A space erases all characters at cursor position
86 es Escape sequences and special characters work in status line
88 hc This is a hardcopy terminal
89 HC The cursor is hard to see when not on bottom line
91 hz Hazeltine bug, the terminal can not print tilde characters
92 in Terminal inserts null bytes, not spaces, to fill whitespace
93 km Terminal has a meta key
94 mi Cursor movement works in insert mode
95 ms Cursor movement works in standout/underline mode
97 NR ti does not reverse te
98 nx No padding, must use XON/XOFF
99 os Terminal can overstrike
100 ul Terminal underlines although it can not overstrike
101 xb Beehive glitch, f1 sends ESCAPE, f2 sends \fB\[ha]C\fP
102 xn Newline/wraparound glitch
103 xo Terminal uses xon/xoff protocol
104 xs Text typed over standout text will be displayed in standout
105 xt Teleray glitch, destructive tabs and odd standout mode
107 .SS Numeric capabilities
110 dB Delay in milliseconds for backspace on hardcopy terminals
111 dC Delay in milliseconds for carriage return on hardcopy terminals
112 dF Delay in milliseconds for form feed on hardcopy terminals
113 dN Delay in milliseconds for new line on hardcopy terminals
114 dT Delay in milliseconds for tabulator stop on hardcopy terminals
115 dV Delay in milliseconds for vertical tabulator stop on
117 it Difference between tab positions
118 lh Height of soft labels
120 lw Width of soft labels
122 Nl Number of soft labels
123 pb Lowest baud rate which needs padding
126 vt virtual terminal number
127 ws Width of status line if different from screen width
129 .SS String capabilities
132 !2 shifted suspend key
137 #4 shifted cursor left key
146 %8 previous-object key
148 %a shifted message key
151 %d shifted options key
152 %e shifted previous key
155 %h shifted replace key
156 %i shifted cursor right key
157 %j shifted resume key
158 &0 shifted cancel key
169 *1 shifted command key
171 *3 shifted create key
172 *4 shifted delete character
173 *5 shifted delete line
176 *8 shifted clear line key
190 ac Pairs of block graphic characters to map alternate character set
191 ae End alternative character set
192 as Start alternative character set for block graphic characters
193 bc Backspace, if not \fB\[ha]H\fP
195 bt Move to previous tab stop
196 cb Clear from beginning of line to cursor
197 cc Dummy command character
198 cd Clear to end of screen
199 ce Clear to end of line
200 ch Move cursor horizontally only to column %1
201 cl Clear screen and cursor home
202 cm Cursor move to row %1 and column %2 (on screen)
203 CM Move cursor to row %1 and column %2 (in memory)
205 cs Scroll region from line %1 to %2
207 cv Move cursor vertically only to line %1
208 dc Delete one character
209 DC Delete %1 characters
213 do Cursor down one line
214 DO Cursor down #1 lines
215 ds Disable status line
216 eA Enable alternate character set
217 ec Erase %1 characters starting at cursor
220 ff Formfeed character on hardcopy terminals
221 fs Return character to its position before going to status line
222 F1 The string sent by function key f11
223 F2 The string sent by function key f12
224 F3 The string sent by function key f13
226 F9 The string sent by function key f19
227 FA The string sent by function key f20
228 FB The string sent by function key f21
230 FZ The string sent by function key f45
231 Fa The string sent by function key f46
232 Fb The string sent by function key f47
234 Fr The string sent by function key f63
235 hd Move cursor a half line down
237 hu Move cursor a half line up
238 i1 Initialization string 1 at login
239 i3 Initialization string 3 at login
240 is Initialization string 2 at login
241 ic Insert one character
242 IC Insert %1 characters
243 if Initialization file
245 ip Insert pad time and needed special characters after insert
246 iP Initialization program
247 K1 upper left key on keypad
248 K2 center key on keypad
249 K3 upper right key on keypad
250 K4 bottom left key on keypad
251 K5 bottom right key on keypad
263 ka Clear all tabs key
269 kD Key for delete character under cursor
271 kE Key for clear to end of line
272 kF Key for scrolling forward/down
274 kH Cursor hown down key
275 kI Insert character/Insert mode key
277 kL Key for delete line
278 kM Key for exit insert mode
280 kP Key for previous page
282 kR Key for scrolling backward/up
284 kS Clear to end of screen key
285 kt Clear this tab key
288 l0 Label of zeroth function key, if not f0
289 l1 Label of first function key, if not f1
290 l2 Label of first function key, if not f2
292 la Label of tenth function key, if not f10
293 le Cursor left one character
294 ll Move cursor to lower left corner
295 LE Cursor left %1 characters
296 LF Turn soft labels off
297 LO Turn soft labels on
299 MC Clear soft margins
301 me End all mode like so, us, mb, md, and mr
302 mh Start half bright mode
303 mk Dark mode (Characters invisible)
304 ML Set left soft margin
305 mm Put terminal in meta mode
306 mo Put terminal out of meta mode
307 mp Turn on protected attribute
308 mr Start reverse mode
309 MR Set right soft margin
310 nd Cursor right one character
311 nw Carriage return command
314 pk Program key %1 to send string %2 as if typed by user
315 pl Program key %1 to execute string %2 in local mode
316 pn Program soft label %1 to show string %2
317 po Turn the printer on
318 pO Turn the printer on for %1 (<256) bytes
319 ps Print screen contents on printer
320 px Program key %1 to send string %2 to computer
321 r1 Reset string 1 to set terminal to sane modes
322 r2 Reset string 2 to set terminal to sane modes
323 r3 Reset string 3 to set terminal to sane modes
324 RA disable automatic margins
325 rc Restore saved cursor position
326 rf Reset string filename
327 RF Request for input from terminal
328 RI Cursor right %1 characters
329 rp Repeat character %1 for %2 times
330 rP Padding after character sent in replace mode
332 RX Turn off XON/XOFF flow control
333 sa Set %1 %2 %3 %4 %5 %6 %7 %8 %9 attributes
334 SA enable automatic margins
335 sc Save cursor position
337 sf Normal scroll one line
338 SF Normal scroll %1 lines
339 so Start standout mode
341 SR scroll back %1 lines
342 st Set tabulator stop in all rows at current column
343 SX Turn on XON/XOFF flow control
344 ta move to next hardware tab
345 tc Read in terminal description from another entry
346 te End program that uses cursor motion
347 ti Begin program that uses cursor motion
348 ts Move cursor to column %1 of status line
349 uc Underline character under cursor and move cursor right
351 up Cursor up one line
352 UP Cursor up %1 lines
355 ve Normal cursor visible
358 wi Set window from line %1 to %2 and column %3 to %4
359 XF XOFF character if not \fB\[ha]S\fP
362 There are several ways of defining the control codes for string capabilities:
364 Every normal character represents itself,
365 except \[aq]\[ha]\[aq], \[aq]\e\[aq], and \[aq]%\[aq].
367 A \fB\[ha]x\fP means Control-x.
368 Control-A equals 1 decimal.
370 \ex means a special code.
371 x can be one of the following characters:
377 r Carriage return (13)
386 A \exxx specifies the octal character xxx.
390 Increments parameters by one.
393 Single parameter capability
396 Add value of next character to this parameter and do binary output
399 Do ASCII output of this parameter with a field with of 2
402 Do ASCII output of this parameter with a field with of 3
407 If you use binary output,
408 then you should avoid the null character (\[aq]\e0\[aq])
409 because it terminates the string.
410 You should reset tabulator expansion
411 if a tabulator can be the binary output of a parameter.
414 The above metacharacters for parameters may be wrong: they document Minix
415 termcap which may not be compatible with Linux termcap.
417 The block graphic characters can be specified by three string capabilities:
420 start the alternative charset
423 end the alternative charset
427 The first character is the name of the block graphic
428 symbol and the second characters is its definition.
430 The following names are available:
438 - upper arrow (\[ha])
444 j right bottom corner (+)
445 k right upper corner (+)
446 l left upper corner (+)
447 m left bottom corner (+)
449 o upper horizontal line (-)
450 q middle horizontal line (-)
451 s bottom horizontal line (_)
457 \[ti] paragraph (???)
460 The values in parentheses are suggested defaults which are used by the
462 library, if the capabilities are missing.