1 .\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993
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.
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.
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.
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,
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:
27 .\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond (esr@thyrsus.com)
28 .TH TERMCAP 5 "" "Linux" "Linux Programmer's Manual"
30 termcap \- terminal capability database
32 The termcap database is an obsolete facility for describing the
33 capabilities of character-cell terminals and printers. It is retained
34 only for capability with old programs; new ones should use the
36 database and associated libraries.
39 is an ASCII file (the database master) that lists the capabilities of
40 many different types of terminals. Programs can read termcap to find
41 the particular escape codes needed to control the visual attributes of
42 the terminal actually in use. (Other aspects of the terminal are
43 handled by stty.) The termcap database is indexed on the TERM
46 Termcap entries must be defined on a single logical line, with `\\'
47 used to suppress the newline. Fields are separated by `:'. The first
48 field of each entry starts at the left-hand margin, and contains a list
49 of names for the terminal, separated by '|'.
51 The first subfield may (in BSD termcap entries from versions 4.3 and
52 prior) contain a short name consisting of two characters. This short
53 name may consist of capital or small letters. In 4.4BSD termcap
54 entries this field is omitted.
56 The second subfield (first, in the newer 4.4BSD format) contains the
57 name used by the environment variable TERM. It should be spelled in
58 lowercase letters. Selectable hardware capabilities should be marked
59 by appending a hyphen and a suffix to this name. See below for an
60 example. Usual suffixes are w (more than 80 characters wide), am
61 (automatic margins), nam (no automatic margins), and rv (reverse video
62 display). The third subfield contains a long and descriptive name for
65 Subsequent fields contain the terminal capabilities; any continued
66 capability lines must be indented one tab from the left margin.
68 Although there is no defined order, it is suggested to write first
69 boolean, then numeric, and then string capabilities, each sorted
70 alphabetically without looking at lower or upper spelling. Capabilities
71 of similar functions can be written in one line.
76 Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\e
77 Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\e
81 .SS "Boolean Capabilities"
83 5i Printer will not echo on screen
84 am Automatic margins which means automatic line wrap
85 bs Control-H (8 dec.) performs a backspace
86 bw Backspace on left margin wraps to previous line and right margin
87 da Display retained above screen
88 db Display retained below screen
89 eo A space erases all characters at cursor position
90 es Escape sequences and special characters work in status line
92 hc This is a hardcopy terminal
93 HC The cursor is hard to see when not on bottom line
95 hz Hazeltine bug, the terminal can not print tilde characters
96 in Terminal inserts nulls, not spaces, to fill whitespace
97 km Terminal has a meta key
98 mi Cursor movement works in insert mode
99 ms Cursor movement works in standout/underline mode
101 NR ti does not reverse te
102 nx No padding, must use XON/XOFF
103 os Terminal can overstrike
104 ul Terminal underlines although it can not overstrike
105 xb Beehive glitch, f1 sends ESCAPE, f2 sends ^C
106 xn Newline/wraparound glitch
107 xo Terminal uses xon/xoff protocol
108 xs Text typed over standout text will be displayed in standout
109 xt Teleray glitch, destructive tabs and odd standout mode
111 .SS "Numeric Capabilities"
114 dB Delay in milliseconds for backspace on hardcopy terminals
115 dC Delay in milliseconds for carriage return on hardcopy terminals
116 dF Delay in milliseconds for form feed on hardcopy terminals
117 dN Delay in milliseconds for new line on hardcopy terminals
118 dT Delay in milliseconds for tabulator stop on hardcopy terminals
119 dV Delay in milliseconds for vertical tabulator stop on hardcopy terminals
120 it Difference between tab positions
121 lh Height of soft labels
123 lw Width of soft labels
125 Nl Number of soft labels
126 pb Lowest baud rate which needs padding
129 vt virtual terminal number
130 ws Width of status line if different from screen width
132 .SS "String Capabilities"
135 !2 shifted suspend key
140 #4 shifted cursor left key
149 %8 previous-object key
151 %a shifted message key
154 %d shifted options key
155 %e shifted previous key
158 %h shifted replace key
159 %i shifted cusor right key
160 %j shifted resume key
161 &0 shifted cancel key
172 *1 shifted command key
174 *3 shifted create key
175 *4 shifted delete character
176 *5 shifted delete line
179 *8 shifted clear line key
193 ac Pairs of block graphic characters to map alternate character set
194 ae End alternative character set
195 as Start alternative character set for block graphic characters
196 bc Backspace, if not ^H
198 bt Move to previous tab stop
199 cb Clear from beginning of line to cursor
200 cc Dummy command character
201 cd Clear to end of screen
202 ce Clear to end of line
203 ch Move cursor horizontally only to column %1
204 cl Clear screen and cursor home
205 cm Cursor move to row %1 and column %2 (on screen)
206 CM Move cursor to row %1 and column %2 (in memory)
208 cs Scroll region from line %1 to %2
210 cv Move cursor vertically only to line %1
211 dc Delete one character
212 DC Delete %1 characters
216 do Cursor down one line
217 DO Cursor down #1 lines
218 ds Disable status line
219 eA Enable alternate character set
220 ec Erase %1 characters starting at cursor
223 ff Formfeed character on hardcopy terminals
224 fs Return character to its position before going to status line
225 F1 The string sent by function key f11
226 F2 The string sent by function key f12
227 F3 The string sent by function key f13
229 F9 The string sent by function key f19
230 FA The string sent by function key f20
231 FB The string sent by function key f21
233 FZ The string sent by function key f45
234 Fa The string sent by function key f46
235 Fb The string sent by function key f47
237 Fr The string sent by function key f63
238 hd Move cursor a half line down
240 hu Move cursor a half line up
241 i1 Initialization string 1 at login
242 i3 Initialization string 3 at login
243 is Initialization string 2 at login
244 ic Insert one character
245 IC Insert %1 characters
246 if Initialization file
248 ip Insert pad time and needed special characters after insert
249 iP Initialization program
250 K1 upper left key on keypad
251 K2 center key on keypad
252 K3 upper right key on keypad
253 K4 bottom left key on keypad
254 K5 bottom right key on keypad
266 ka Clear all tabs key
272 kD Key for delete character under cursor
274 kE Key for clear to end of line
275 kF Key for scolling forward/down
277 kH Cursor hown down key
278 kI Insert character/Insert mode key
280 kL Key for delete line
281 kM Key for exit insert mode
283 kP Key for previous page
285 kR Key for scolling backward/up
287 kS Clear to end of screen key
288 kt Clear this tab key
291 l0 Label of zeroth function key, if not f0
292 l1 Label of first function key, if not f1
293 l2 Label of first function key, if not f2
295 la Label of tenth function key, if not f10
296 le Cursor left one character
297 ll Move cursor to lower left corner
298 LE Cursor left %1 characters
299 LF Turn soft labels off
300 LO Turn soft labels on
302 MC Clear soft margins
304 me End all mode like so, us, mb, md and mr
305 mh Start half bright mode
306 mk Dark mode (Characters invisible)
307 ML Set left soft margin
308 mm Put terminal in meta mode
309 mo Put terminal out of meta mode
310 mp Turn on protected attribute
311 mr Start reverse mode
312 MR Set right soft margin
313 nd Cursor right one character
314 nw Carriage return command
317 pk Program key %1 to send string %2 as if typed by user
318 pl Program key %1 to execute string %2 in local mode
319 pn Program soft label %1 to to show string %2
320 po Turn the printer on
321 pO Turn the printer on for %1 (<256) bytes
322 ps Print screen contents on printer
323 px Program key %1 to send string %2 to computer
324 r1 Reset string 1 to set terminal to sane modes
325 r2 Reset string 2 to set terminal to sane modes
326 r3 Reset string 3 to set terminal to sane modes
327 RA disable automatic margins
328 rc Restore saved cursor position
329 rf Reset string file name
330 RF Request for input from terminal
331 RI Cursor right %1 characters
332 rp Repeat character %1 for %2 times
333 rP Padding after character sent in replace mode
335 RX Turn off XON/XOFF flow control
336 sa Set %1 %2 %3 %4 %5 %6 %7 %8 %9 attributes
337 SA enable automatic margins
338 sc Save cursor position
340 sf Normal scroll one line
341 SF Normal scroll %1 lines
342 so Start standout mode
344 SR scroll back %1 lines
345 st Set tabulator stop in all rows at current column
346 SX Turn on XON/XOFF flow control
347 ta move to next hardware tab
348 tc Read in terminal description from another entry
349 te End program that uses cursor motion
350 ti Begin program that uses cursor motion
351 ts Move cursor to column %1 of status line
352 uc Underline character under cursor and move cursor right
354 up Cursor up one line
355 UP Cursor up %1 lines
358 ve Normal cursor visible
361 wi Set window from line %1 to %2 and column %3 to %4
362 XF XOFF character if not ^S
365 There are several ways of defining the control codes for string capabilities:
367 Normal Characters except '^','\e' and '%' repesent themself.
369 A '^x' means Control-x. Control-A equals 1 decimal.
371 \ex means a special code. x can be one of the following charaters:
377 r Carriage return (13)
385 0 Null character. A \exxx specifies the octal character xxx.
388 Increments paramters by one.
390 Single parameter capability
392 Add value of next character to this parameter and do binary output
394 Do ASCII output of this parameter with a field with of 2
396 Do ASCII output of this parameter with a field with of 3
400 If you use binary output, then you should avoid the null character
401 because it terminates the string. You should reset tabulator expansion
402 if a tabulator can be the binary output of a parameter.
404 The above metacharacters for parameters may be wrong, they document Minix
405 termcap which may not be compatible with Linux termcap.
407 The block graphic characters can be specified by three string capabilities:
409 start the alternative charset
413 pairs of characters. The first character is the name of the block graphic
414 symbol and the second characters is its definition.
416 The following names are available:
430 j right bottom corner (+)
431 k right upper corner (+)
432 l left upper corner (+)
433 m left bottom corner (+)
435 o upper horizontal line (-)
436 q middle horizontal line (-)
437 s bottom horizontal line (_)
446 The values in parentheses are suggested defaults which are used by curses,
447 if the capabilities are missing.