1 This is Info file ./termcap.info, produced by Makeinfo-1.55 from the
2 input file ./termcap.texi.
4 This file documents the termcap library of the GNU system.
6 Copyright (C) 1988 Free Software Foundation, Inc.
8 Permission is granted to make and distribute verbatim copies of this
9 manual provided the copyright notice and this permission notice are
10 preserved on all copies.
12 Permission is granted to copy and distribute modified versions of
13 this manual under the conditions for verbatim copying, provided that
14 the entire resulting derived work is distributed under the terms of a
15 permission notice identical to this one.
17 Permission is granted to copy and distribute translations of this
18 manual into another language, under the above conditions for modified
19 versions, except that this permission notice may be stated in a
20 translation approved by the Foundation.
23 File: termcap.info, Node: Insdel Char, Next: Standout, Prev: Insdel Line, Up: Capabilities
25 Insert/Delete Character
26 =======================
28 "Inserting a character" means creating a blank space in the middle
29 of a line, and pushing the rest of the line rightward. The character
30 in the rightmost column is lost.
32 "Deleting a character" means causing the character to disappear from
33 the screen, closing up the gap by moving the rest of the line leftward.
34 A blank space appears in the rightmost column.
36 Insertion and deletion of characters is useful in programs that
37 maintain an updating display some parts of which may get longer or
38 shorter. It is also useful in editors for redisplaying the results of
39 editing within a line.
41 Many terminals provide commands to insert or delete a single
42 character at the cursor position. Some provide the ability to insert
43 or delete several characters with one command, using the number of
44 characters to insert or delete as a parameter.
46 Many terminals provide an insert mode in which outputting a graphic
47 character has the added effect of inserting a position for that
48 character. A special command string is used to enter insert mode and
49 another is used to exit it. The reason for designing a terminal with
50 an insert mode rather than an insert command is that inserting
51 character positions is usually followed by writing characters into
52 them. With insert mode, this is as fast as simply writing the
53 characters, except for the fixed overhead of entering and leaving
54 insert mode. However, when the line speed is great enough, padding may
55 be required for the graphic characters output in insert mode.
57 Some terminals require you to enter insert mode and then output a
58 special command for each position to be inserted. Or they may require
59 special commands to be output before or after each graphic character to
62 Deletion of characters is usually accomplished by a straightforward
63 command to delete one or several positions; but on some terminals, it
64 is necessary to enter a special delete mode before using the delete
65 command, and leave delete mode afterward. Sometimes delete mode and
66 insert mode are the same mode.
68 Some terminals make a distinction between character positions in
69 which a space character has been output and positions which have been
70 cleared. On these terminals, the effect of insert or delete character
71 runs to the first cleared position rather than to the end of the line.
72 In fact, the effect may run to more than one line if there is no
73 cleared position to stop the shift on the first line. These terminals
74 are identified by the `in' flag capability.
76 On terminals with the `in' flag, the technique of skipping over
77 characters that you know were cleared, and then outputting text later
78 on in the same line, causes later insert and delete character
79 operations on that line to do nonstandard things. A program that has
80 any chance of doing this must check for the `in' flag and must be
81 careful to write explicit space characters into the intermediate
82 columns when `in' is present.
84 A plethora of terminal capabilities are needed to describe all of
85 this complexity. Here is a list of them all. Following the list, we
86 present an algorithm for programs to use to take proper account of all
87 of these capabilities.
90 String of commands to enter insert mode.
92 If the terminal has no special insert mode, but it can insert
93 characters with a special command, `im' should be defined with a
94 null value, because the `vi' editor assumes that insertion of a
95 character is impossible if `im' is not provided.
97 New programs should not act like `vi'. They should pay attention
98 to `im' only if it is defined.
101 String of commands to leave insert mode. This capability must be
104 On a few old terminals the same string is used to enter and exit
105 insert mode. This string turns insert mode on if it was off, and
106 off it it was on. You can tell these terminals because the `ei'
107 string equals the `im' string. If you want to support these
108 terminals, you must always remember accurately whether insert mode
109 is in effect. However, these terminals are obsolete, and it is
110 reasonable to refuse to support them. On all modern terminals, you
111 can safely output `ei' at any time to ensure that insert mode is
115 String of commands to insert one character position at the cursor.
116 The cursor does not move.
118 If outputting a graphic character while in insert mode is
119 sufficient to insert the character, then the `ic' capability
120 should be defined with a null value.
122 If your terminal offers a choice of ways to insert--either use
123 insert mode or use a special command--then define `im' and do not
124 define `ic', since this gives the most efficient operation when
125 several characters are to be inserted. *Do not* define both
126 strings, for that means that *both* must be used each time
130 String of commands to output following an inserted graphic
131 character in insert mode. Often it is used just for a padding
132 spec, when padding is needed after an inserted character (*note
136 String of commands to insert N character positions at and after
137 the cursor. It has the same effect as repeating the `ic' string
138 and a space, N times.
140 If `IC' is provided, application programs may use it without first
141 entering insert mode.
144 Flag whose presence means it is safe to move the cursor while in
145 insert mode and assume the terminal remains in insert mode.
148 Flag whose presence means that the terminal distinguishes between
149 character positions in which space characters have been output and
150 positions which have been cleared.
152 An application program can assume that the terminal can do character
153 insertion if *any one of* the capabilities `IC', `im', `ic' or `ip' is
156 To insert N blank character positions, move the cursor to the place
157 to insert them and follow this algorithm:
159 1. If an `IC' string is provided, output it with parameter N and you
160 are finished. Otherwise (or if you don't want to bother to look
161 for an `IC' string) follow the remaining steps.
163 2. Output the `im' string, if there is one, unless the terminal is
164 already in insert mode.
166 3. Repeat steps 4 through 6, N times.
168 4. Output the `ic' string if any.
172 6. Output the `ip' string if any.
174 7. Output the `ei' string, eventually, to exit insert mode. There is
175 no need to do this right away. If the `mi' flag is present, you
176 can move the cursor and the cursor will remain in insert mode;
177 then you can do more insertion elsewhere without reentering insert
180 To insert N graphic characters, position the cursor and follow this
183 1. If an `IC' string is provided, output it with parameter N, then
184 output the graphic characters, and you are finished. Otherwise
185 (or if you don't want to bother to look for an `IC' string) follow
188 2. Output the `im' string, if there is one, unless the terminal is
189 already in insert mode.
191 3. For each character to be output, repeat steps 4 through 6.
193 4. Output the `ic' string if any.
195 5. Output the next graphic character.
197 6. Output the `ip' string if any.
199 7. Output the `ei' string, eventually, to exit insert mode. There is
200 no need to do this right away. If the `mi' flag is present, you
201 can move the cursor and the cursor will remain in insert mode;
202 then you can do more insertion elsewhere without reentering insert
205 Note that this is not the same as the original Unix termcap
206 specifications in one respect: it assumes that the `IC' string can be
207 used without entering insert mode. This is true as far as I know, and
208 it allows you be able to avoid entering and leaving insert mode, and
209 also to be able to avoid the inserted-character padding after the
210 characters that go into the inserted positions.
212 Deletion of characters is less complicated; deleting one column is
213 done by outputting the `dc' string. However, there may be a delete
214 mode that must be entered with `dm' in order to make `dc' work.
217 String of commands to delete one character position at the cursor.
218 If `dc' is not present, the terminal cannot delete characters.
221 String of commands to delete N characters starting at the cursor.
222 It has the same effect as repeating the `dc' string N times. Any
223 terminal description that has `DC' also has `dc'.
226 String of commands to enter delete mode. If not present, there is
227 no delete mode, and `dc' can be used at any time (assuming there is
231 String of commands to exit delete mode. This must be present if
234 To delete N character positions, position the cursor and follow these
237 1. If the `DC' string is present, output it with parameter N and you
238 are finished. Otherwise, follow the remaining steps.
240 2. Output the `dm' string, unless you know the terminal is already in
243 3. Output the `dc' string N times.
245 4. Output the `ed' string eventually. If the flag capability `mi' is
246 present, you can move the cursor and do more deletion without
247 leaving and reentering delete mode.
249 As with the `IC' string, we have departed from the original termcap
250 specifications by assuming that `DC' works without entering delete mode
251 even though `dc' would not.
253 If the `dm' and `im' capabilities are both present and have the same
254 value, it means that the terminal has one mode for both insertion and
255 deletion. It is useful for a program to know this, because then it can
256 do insertions after deletions, or vice versa, without leaving
257 insert/delete mode and reentering it.
260 File: termcap.info, Node: Standout, Next: Underlining, Prev: Insdel Char, Up: Capabilities
262 Standout and Appearance Modes
263 =============================
265 "Appearance modes" are modifications to the ways characters are
266 displayed. Typical appearance modes include reverse video, dim, bright,
267 blinking, underlined, invisible, and alternate character set. Each
268 kind of terminal supports various among these, or perhaps none.
270 For each type of terminal, one appearance mode or combination of
271 them that looks good for highlighted text is chosen as the "standout
272 mode". The capabilities `so' and `se' say how to enter and leave
273 standout mode. Programs that use appearance modes only to highlight
274 some text generally use the standout mode so that they can work on as
275 many terminals as possible. Use of specific appearance modes other
276 than "underlined" and "alternate character set" is rare.
278 Terminals that implement appearance modes fall into two general
279 classes as to how they do it.
281 In some terminals, the presence or absence of any appearance mode is
282 recorded separately for each character position. In these terminals,
283 each graphic character written is given the appearance modes current at
284 the time it is written, and keeps those modes until it is erased or
285 overwritten. There are special commands to turn the appearance modes
286 on or off for characters to be written in the future.
288 In other terminals, the change of appearance modes is represented by
289 a marker that belongs to a certain screen position but affects all
290 following screen positions until the next marker. These markers are
291 traditionally called "magic cookies".
293 The same capabilities (`so', `se', `mb' and so on) for turning
294 appearance modes on and off are used for both magic-cookie terminals
295 and per-character terminals. On magic cookie terminals, these give the
296 commands to write the magic cookies. On per-character terminals, they
297 change the current modes that affect future output and erasure. Some
298 simple applications can use these commands without knowing whether or
299 not they work by means of cookies.
301 However, a program that maintains and updates a display needs to know
302 whether the terminal uses magic cookies, and exactly what their effect
303 is. This information comes from the `sg' capability.
305 The `sg' capability is a numeric capability whose presence indicates
306 that the terminal uses magic cookies for appearance modes. Its value is
307 the number of character positions that a magic cookie occupies. Usually
308 the cookie occupies one or more character positions on the screen, and
309 these character positions are displayed as blank, but in some terminals
310 the cookie has zero width.
312 The `sg' capability describes both the magic cookie to turn standout
313 on and the cookie to turn it off. This makes the assumption that both
314 kinds of cookie have the same width on the screen. If that is not true,
315 the narrower cookie must be "widened" with spaces until it has the same
318 On some magic cookie terminals, each line always starts with normal
319 display; in other words, the scope of a magic cookie never extends over
320 more than one line. But on other terminals, one magic cookie affects
321 all the lines below it unless explicitly canceled. Termcap does not
322 define any way to distinguish these two ways magic cookies can work.
323 To be safe, it is best to put a cookie at the beginning of each line.
325 On some per-character terminals, standout mode or other appearance
326 modes may be canceled by moving the cursor. On others, moving the
327 cursor has no effect on the state of the appearance modes. The latter
328 class of terminals are given the flag capability `ms' ("can move in
329 standout"). All programs that might have occasion to move the cursor
330 while appearance modes are turned on must check for this flag; if it is
331 not present, they should reset appearance modes to normal before doing
334 A program that has turned on only standout mode should use `se' to
335 reset the standout mode to normal. A program that has turned on only
336 alternate character set mode should use `ae' to return it to normal.
337 If it is possible that any other appearance modes are turned on, use the
338 `me' capability to return them to normal.
340 Note that the commands to turn on one appearance mode, including `so'
341 and `mb' ... `mr', if used while some other appearance modes are turned
342 on, may combine the two modes on some terminals but may turn off the
343 mode previously enabled on other terminals. This is because some
344 terminals do not have a command to set or clear one appearance mode
345 without changing the others. Programs should not attempt to use
346 appearance modes in combination except with `sa', and when switching
347 from one single mode to another should always turn off the previously
348 enabled mode and then turn on the new desired mode.
350 On some old terminals, the `so' and `se' commands may be the same
351 command, which has the effect of turning standout on if it is off, or
352 off it is on. It is therefore risky for a program to output extra `se'
353 commands for good measure. Fortunately, all these terminals are
356 Programs that update displays in which standout-text may be replaced
357 with non-standout text must check for the `xs' flag. In a per-character
358 terminal, this flag says that the only way to remove standout once
359 written is to clear that portion of the line with the `ce' string or
360 something even more powerful (*note Clearing::.); just writing new
361 characters at those screen positions will not change the modes in
362 effect there. In a magic cookie terminal, `xs' says that the only way
363 to remove a cookie is to clear a portion of the line that includes the
364 cookie; writing a different cookie at the same position does not work.
366 Such programs must also check for the `xt' flag, which means that the
367 terminal is a Teleray 1061. On this terminal it is impossible to
368 position the cursor at the front of a magic cookie, so the only two
369 ways to remove a cookie are (1) to delete the line it is on or (2) to
370 position the cursor at least one character before it (possibly on a
371 previous line) and output the `se' string, which on these terminals
372 finds and removes the next `so' magic cookie on the screen. (It may
373 also be possible to remove a cookie which is not at the beginning of a
374 line by clearing that line.) The `xt' capability also has implications
375 for the use of tab characters, but in that regard it is obsolete (*Note
379 String of commands to enter standout mode.
382 String of commands to leave standout mode.
385 Numeric capability, the width on the screen of the magic cookie.
386 This capability is absent in terminals that record appearance modes
387 character by character.
390 Flag whose presence means that it is safe to move the cursor while
391 the appearance modes are not in the normal state. If this flag is
392 absent, programs should always reset the appearance modes to
393 normal before moving the cursor.
396 Flag whose presence means that the only way to reset appearance
397 modes already on the screen is to clear to end of line. On a
398 per-character terminal, you must clear the area where the modes
399 are set. On a magic cookie terminal, you must clear an area
400 containing the cookie. See the discussion above.
403 Flag whose presence means that the cursor cannot be positioned
404 right in front of a magic cookie, and that `se' is a command to
405 delete the next magic cookie following the cursor. See discussion
409 String of commands to enter blinking mode.
412 String of commands to enter double-bright mode.
415 String of commands to enter half-bright mode.
418 String of commands to enter invisible mode.
421 String of commands to enter protected mode.
424 String of commands to enter reverse-video mode.
427 String of commands to turn off all appearance modes, including
428 standout mode and underline mode. On some terminals it also turns
429 off alternate character set mode; on others, it may not. This
430 capability must be present if any of `mb' ... `mr' is present.
433 String of commands to turn on alternate character set mode. This
434 mode assigns some or all graphic characters an alternate picture
435 on the screen. There is no standard as to what the alternate
439 String of commands to turn off alternate character set mode.
442 String of commands to turn on an arbitrary combination of
443 appearance modes. It accepts 9 parameters, each of which controls
444 a particular kind of appearance mode. A parameter should be 1 to
445 turn its appearance mode on, or zero to turn that mode off. Most
446 terminals do not support the `sa' capability, even among those
447 that do have various appearance modes.
449 The nine parameters are, in order, STANDOUT, UNDERLINE, REVERSE,
450 BLINK, HALF-BRIGHT, DOUBLE-BRIGHT, BLANK, PROTECT, ALT CHAR SET.
453 File: termcap.info, Node: Underlining, Next: Cursor Visibility, Prev: Standout, Up: Capabilities
458 Underlining on most terminals is a kind of appearance mode, much like
459 standout mode. Therefore, it may be implemented using magic cookies or
460 as a flag in the terminal whose current state affects each character
461 that is output. *Note Standout::, for a full explanation.
463 The `ug' capability is a numeric capability whose presence indicates
464 that the terminal uses magic cookies for underlining. Its value is the
465 number of character positions that a magic cookie for underlining
466 occupies; it is used for underlining just as `sg' is used for standout.
467 Aside from the simplest applications, it is impossible to use
468 underlining correctly without paying attention to the value of `ug'.
471 String of commands to turn on underline mode or to output a magic
472 cookie to start underlining.
475 String of commands to turn off underline mode or to output a magic
476 cookie to stop underlining.
479 Width of magic cookie that represents a change of underline mode;
480 or missing, if the terminal does not use a magic cookie for this.
483 Flag whose presence means that it is safe to move the cursor while
484 the appearance modes are not in the normal state. Underlining is
485 an appearance mode. If this flag is absent, programs should
486 always turn off underlining before moving the cursor.
488 There are two other, older ways of doing underlining: there can be a
489 command to underline a single character, or the output of `_', the
490 ASCII underscore character, as an overstrike could cause a character to
491 be underlined. New programs need not bother to handle these
492 capabilities unless the author cares strongly about the obscure
493 terminals which support them. However, terminal descriptions should
494 provide these capabilities when appropriate.
497 String of commands to underline the character under the cursor, and
498 move the cursor right.
501 Flag whose presence means that the terminal can underline by
502 overstriking an underscore character (`_'); some terminals can do
503 this even though they do not support overstriking in general. An
504 implication of this flag is that when outputting new text to
505 overwrite old text, underscore characters must be treated
506 specially lest they underline the old text instead.
509 File: termcap.info, Node: Cursor Visibility, Next: Bell, Prev: Underlining, Up: Capabilities
514 Some terminals have the ability to make the cursor invisible, or to
515 enhance it. Enhancing the cursor is often done by programs that plan
516 to use the cursor to indicate to the user a position of interest that
517 may be anywhere on the screen--for example, the Emacs editor enhances
518 the cursor on entry. Such programs should always restore the cursor to
522 String of commands to enhance the cursor.
525 String of commands to make the cursor invisible.
528 String of commands to return the cursor to normal.
530 If you define either `vs' or `vi', you must also define `ve'.
533 File: termcap.info, Node: Bell, Next: Keypad, Prev: Cursor Visibility, Up: Capabilities
538 Here we describe commands to make the terminal ask for the user to
542 String of commands to cause the terminal to make an audible sound.
543 If this capability is absent, the terminal has no way to make a
547 String of commands to cause the screen to flash to attract
548 attention ("visible bell"). If this capability is absent, the
549 terminal has no way to do such a thing.
552 File: termcap.info, Node: Keypad, Next: Meta Key, Prev: Bell, Up: Capabilities
554 Keypad and Function Keys
555 ========================
557 Many terminals have arrow and function keys that transmit specific
558 character sequences to the computer. Since the precise sequences used
559 depend on the terminal, termcap defines capabilities used to say what
560 the sequences are. Unlike most termcap string-valued capabilities,
561 these are not strings of commands to be sent to the terminal, rather
562 strings that are received from the terminal.
564 Programs that expect to use keypad keys should check, initially, for
565 a `ks' capability and send it, to make the keypad actually transmit.
566 Such programs should also send the `ke' string when exiting.
569 String of commands to make the keypad keys transmit. If this
570 capability is not provided, but the others in this section are,
571 programs may assume that the keypad keys always transmit.
574 String of commands to make the keypad keys work locally. This
575 capability is provided only if `ks' is.
578 String of input characters sent by typing the left-arrow key. If
579 this capability is missing, you cannot expect the terminal to have
580 a left-arrow key that transmits anything to the computer.
583 String of input characters sent by typing the right-arrow key.
586 String of input characters sent by typing the up-arrow key.
589 String of input characters sent by typing the down-arrow key.
592 String of input characters sent by typing the "home-position" key.
595 Strings of input characters sent by the five other keys in a 3-by-3
596 array that includes the arrow keys, if the keyboard has such a
597 3-by-3 array. Note that one of these keys may be the
598 "home-position" key, in which case one of these capabilities will
599 have the same value as the `kh' key.
602 String of input characters sent by function key 10 (or 0, if the
603 terminal has one labeled 0).
606 Strings of input characters sent by function keys 1 through 9,
607 provided for those function keys that exist.
610 Number: the number of numbered function keys, if there are more
614 Strings which are the labels appearing on the keyboard on the keys
615 described by the capabilities `k0' ... `l9'. These capabilities
616 should be left undefined if the labels are `f0' or `f10' and `f1'
620 String of input characters sent by the "home down" key, if there is
624 String of input characters sent by the "backspace" key, if there is
628 String of input characters sent by the "clear all tabs" key, if
632 String of input characters sent by the "clear tab stop this column"
633 key, if there is one.
636 String of input characters sent by the "clear screen" key, if
640 String of input characters sent by the "delete character" key, if
644 String of input characters sent by the "delete line" key, if there
648 String of input characters sent by the "exit insert mode" key, if
652 String of input characters sent by the "clear to end of line" key,
656 String of input characters sent by the "clear to end of screen"
657 key, if there is one.
660 String of input characters sent by the "insert character" or "enter
661 insert mode" key, if there is one.
664 String of input characters sent by the "insert line" key, if there
668 String of input characters sent by the "next page" key, if there is
672 String of input characters sent by the "previous page" key, if
676 String of input characters sent by the "scroll forward" key, if
680 String of input characters sent by the "scroll reverse" key, if
684 String of input characters sent by the "set tab stop in this
685 column" key, if there is one.
688 String listing the other function keys the terminal has. This is a
689 very obsolete way of describing the same information found in the
690 `kH' ... `kT' keys. The string contains a list of two-character
691 termcap capability names, separated by commas. The meaning is
692 that for each capability name listed, the terminal has a key which
693 sends the string which is the value of that capability. For
694 example, the value `:ko=cl,ll,sf,sr:' says that the terminal has
695 four function keys which mean "clear screen", "home down", "scroll
696 forward" and "scroll reverse".
699 File: termcap.info, Node: Meta Key, Next: Initialization, Prev: Keypad, Up: Capabilities
704 A Meta key is a key on the keyboard that modifies each character you
705 type by controlling the 0200 bit. This bit is on if and only if the
706 Meta key is held down when the character is typed. Characters typed
707 using the Meta key are called Meta characters. Emacs uses Meta
708 characters as editing commands.
711 Flag whose presence means that the terminal has a Meta key.
714 String of commands to enable the functioning of the Meta key.
717 String of commands to disable the functioning of the Meta key.
719 If the terminal has `km' but does not have `mm' and `mo', it means
720 that the Meta key always functions. If it has `mm' and `mo', it means
721 that the Meta key can be turned on or off. Send the `mm' string to
722 turn it on, and the `mo' string to turn it off. I do not know why one
723 would ever not want it to be on.
726 File: termcap.info, Node: Initialization, Next: Pad Specs, Prev: Meta Key, Up: Capabilities
732 String of commands to put the terminal into whatever special modes
733 are needed or appropriate for programs that move the cursor
734 nonsequentially around the screen. Programs that use termcap to do
735 full-screen display should output this string when they start up.
738 String of commands to undo what is done by the `ti' string.
739 Programs that output the `ti' string on entry should output this
740 string when they exit.
743 String of commands to initialize the terminal for each login
747 String which is the name of a file containing the string of
748 commands to initialize the terminal for each session of use.
749 Normally `is' and `if' are not both used.
753 Two more strings of commands to initialize the terminal for each
754 login session. The `i1' string (if defined) is output before `is'
755 or `if', and the `i3' string (if defined) is output after.
757 The reason for having three separate initialization strings is to
758 make it easier to define a group of related terminal types with
759 slightly different initializations. Define two or three of the
760 strings in the basic type; then the other types can override one
761 or two of the strings.
764 String of commands to reset the terminal from any strange mode it
765 may be in. Normally this includes the `is' string (or other
766 commands with the same effects) and more. What would go in the
767 `rs' string but not in the `is' string are annoying or slow
768 commands to bring the terminal back from strange modes that nobody
772 Numeric value, the initial spacing between hardware tab stop
773 columns when the terminal is powered up. Programs to initialize
774 the terminal can use this to decide whether there is a need to set
775 the tab stops. If the initial width is 8, well and good; if it is
776 not 8, then the tab stops should be set; if they cannot be set,
777 the kernel is told to convert tabs to spaces, and other programs
778 will observe this and do likewise.
781 String of commands to clear all tab stops.
784 String of commands to set tab stop at current cursor column on all
788 Flag whose presence means that the terminal does not support
789 XON/XOFF flow control. Programs should not send XON (`C-q') or
790 XOFF (`C-s') characters to the terminal.
793 File: termcap.info, Node: Pad Specs, Next: Status Line, Prev: Initialization, Up: Capabilities
798 There are two terminal capabilities that exist just to explain the
799 proper way to obey the padding specifications in all the command string
800 capabilities. One, `pc', must be obeyed by all termcap-using programs.
803 Numeric value, the lowest baud rate at which padding is actually
804 needed. Programs may check this and refrain from doing any
805 padding at lower speeds.
808 String of commands for padding. The first character of this
809 string is to be used as the pad character, instead of using null
810 characters for padding. If `pc' is not provided, use null
811 characters. Every program that uses termcap must look up this
812 capability and use it to set the variable `PC' that is used by
813 `tputs'. *Note Padding::.
815 Some termcap capabilities exist just to specify the amount of
816 padding that the kernel should give to cursor motion commands used in
817 ordinary sequential output.
820 Numeric value, the number of msec of padding needed for the
821 carriage-return character.
824 Numeric value, the number of msec of padding needed for the newline
825 (linefeed) character.
828 Numeric value, the number of msec of padding needed for the
832 Numeric value, the number of msec of padding needed for the
836 Numeric value, the number of msec of padding needed for the tab
839 In some systems, the kernel uses the above capabilities; in other
840 systems, the kernel uses the paddings specified in the string
841 capabilities `cr', `sf', `le', `ff' and `ta'. Descriptions of
842 terminals which require such padding should contain the `dC' ... `dT'
843 capabilities and also specify the appropriate padding in the
844 corresponding string capabilities. Since no modern terminals require
845 padding for ordinary sequential output, you probably won't need to do
846 either of these things.
849 File: termcap.info, Node: Status Line, Next: Half-Line, Prev: Pad Specs, Up: Capabilities
854 A "status line" is a line on the terminal that is not used for
855 ordinary display output but instead used for a special message. The
856 intended use is for a continuously updated description of what the
857 user's program is doing, and that is where the name "status line" comes
858 from, but in fact it could be used for anything. The distinguishing
859 characteristic of a status line is that ordinary output to the terminal
860 does not affect it; it changes only if the special status line commands
861 of this section are used.
864 Flag whose presence means that the terminal has a status line. If
865 a terminal description specifies that there is a status line, it
866 must provide the `ts' and `fs' capabilities.
869 String of commands to move the terminal cursor into the status
870 line. Usually these commands must specifically record the old
871 cursor position for the sake of the `fs' string.
874 String of commands to move the cursor back from the status line to
875 its previous position (outside the status line).
878 Flag whose presence means that other display commands work while
879 writing the status line. In other words, one can clear parts of
880 it, insert or delete characters, move the cursor within it using
881 `ch' if there is a `ch' capability, enter and leave standout mode,
885 String of commands to disable the display of the status line. This
886 may be absent, if there is no way to disable the status line
890 Numeric value, the width of the status line. If this capability is
891 absent in a terminal that has a status line, it means the status
892 line is the same width as the other lines.
894 Note that the value of `ws' is sometimes as small as 8.
897 File: termcap.info, Node: Half-Line, Next: Printer, Prev: Status Line, Up: Capabilities
902 Some terminals have commands for moving the cursor vertically by
903 half-lines, useful for outputting subscripts and superscripts. Mostly
904 it is hardcopy terminals that have such features.
907 String of commands to move the cursor up half a line. If the
908 terminal is a display, it is your responsibility to avoid moving
909 up past the top line; however, most likely the terminal that
910 supports this is a hardcopy terminal and there is nothing to be
914 String of commands to move the cursor down half a line. If the
915 terminal is a display, it is your responsibility to avoid moving
916 down past the bottom line, etc.
919 File: termcap.info, Node: Printer, Prev: Half-Line, Up: Capabilities
921 Controlling Printers Attached to Terminals
922 ==========================================
924 Some terminals have attached hardcopy printer ports. They may be
925 able to copy the screen contents to the printer; they may also be able
926 to redirect output to the printer. Termcap does not have anything to
927 tell the program whether the redirected output appears also on the
928 screen; it does on some terminals but not all.
931 String of commands to cause the contents of the screen to be
932 printed. If it is absent, the screen contents cannot be printed.
935 String of commands to redirect further output to the printer.
938 String of commands to terminate redirection of output to the
939 printer. This capability must be present in the description if
943 String of commands to redirect output to the printer for next N
944 characters of output, regardless of what they are. Redirection
945 will end automatically after N characters of further output. Until
946 then, nothing that is output can end redirection, not even the
947 `pf' string if there is one. The number N should not be more than
950 One use of this capability is to send non-text byte sequences
951 (such as bit-maps) to the printer.
953 Most terminals with printers do not support all of `ps', `po' and
954 `pO'; any one or two of them may be supported. To make a program that
955 can send output to all kinds of printers, it is necessary to check for
956 all three of these capabilities, choose the most convenient of the ones
957 that are provided, and use it in its own appropriate fashion.
960 File: termcap.info, Node: Summary, Next: Var Index, Prev: Capabilities, Up: Top
962 Summary of Capability Names
963 ***************************
965 Here are all the terminal capability names in alphabetical order
966 with a brief description of each. For cross references to their
967 definitions, see the index of capability names (*note Cap Index::.).
970 String to turn off alternate character set mode.
973 String to insert a blank line before the cursor.
976 String to insert N blank lines before the cursor.
979 Flag: output to last column wraps cursor to next line.
982 String to turn on alternate character set mode.like.
985 Very obsolete alternative name for the `le' capability.
988 String to sound the bell.
991 Obsolete flag: ASCII backspace may be used for leftward motion.
994 String to move the cursor left to the previous hardware tab stop
998 Flag: `le' at left margin wraps to end of previous line.
1001 String to change terminal's command character.
1004 String to clear the line the cursor is on, and following lines.
1007 String to clear from the cursor to the end of the line.
1010 String to position the cursor at column C in the same line.
1013 String to clear the entire screen and put cursor at upper left
1017 String to position the cursor at line L, column C.
1020 String to position the cursor at line L, column C, relative to
1024 Number: width of the screen.
1027 String to move cursor sideways to left margin.
1030 String to set the scroll region.
1033 Alternate form of string to set the scroll region.
1036 String to clear all tab stops.
1039 String to position the cursor at line L in the same column.
1042 Flag: data scrolled off top of screen may be scrolled back.
1045 Flag: data scrolled off bottom of screen may be scrolled back.
1048 Obsolete number: msec of padding needed for the backspace
1052 String to delete one character position at the cursor.
1055 Obsolete number: msec of padding needed for the carriage-return
1059 String to delete N characters starting at the cursor.
1062 Obsolete number: msec of padding needed for the formfeed character.
1065 String to delete the line the cursor is on.
1068 String to delete N lines starting with the cursor's line.
1071 String to enter delete mode.
1074 Obsolete number: msec of padding needed for the newline character.
1077 String to move the cursor vertically down one line.
1080 String to move cursor vertically down N lines.
1083 String to disable the display of the status line.
1086 Obsolete number: msec of padding needed for the tab character.
1089 String of commands to clear N characters at cursor.
1092 String to exit delete mode.
1095 String to leave insert mode.
1098 Flag: output of a space can erase an overstrike.
1101 Flag: other display commands work while writing the status line.
1104 String to advance to the next page, for a hardcopy terminal.
1107 String to move the cursor back from the status line to its
1108 previous position (outside the status line).
1111 Flag: this terminal type is generic, not real.
1114 Flag: hardcopy terminal.
1117 String to move the cursor down half a line.
1120 String to position cursor at upper left corner.
1123 Flag: the terminal has a status line.
1126 String to move the cursor up half a line.
1129 Flag: terminal cannot accept `~' as output.
1132 String to initialize the terminal for each login session.
1135 String to initialize the terminal for each login session.
1138 String to insert one character position at the cursor.
1141 String to insert N character positions at the cursor.
1144 String naming a file of commands to initialize the terminal.
1147 String to enter insert mode.
1150 Flag: outputting a space is different from moving over empty
1154 String to output following an inserted character in insert mode.
1157 String to initialize the terminal for each login session.
1160 Number: initial spacing between hardware tab stop columns.
1163 String of input sent by function key 0 or 10.
1166 Strings of input sent by function keys 1 through 9.
1169 Strings sent by the five other keys in 3-by-3 array with arrows.
1172 String of input sent by the "clear all tabs" key.
1175 String of input sent by the "insert line" key.
1178 String of input sent by the "backspace" key.
1181 String of input sent by the "clear screen" key.
1184 String of input sent by typing the down-arrow key.
1187 String of input sent by the "delete character" key.
1190 String to make the function keys work locally.
1193 String of input sent by the "clear to end of line" key.
1196 String of input sent by the "scroll forward" key.
1199 String of input sent by typing the "home-position" key.
1202 String of input sent by the "home down" key.
1205 String of input sent by the "insert character" or "enter insert
1209 String of input sent by typing the left-arrow key.
1212 String of input sent by the "delete line" key.
1215 Flag: the terminal has a Meta key.
1218 String of input sent by the "exit insert mode" key.
1221 Numeric value, the number of numbered function keys.
1224 String of input sent by the "next page" key.
1227 Very obsolete string listing the terminal's named function keys.
1230 String of input sent by the "previous page" key.
1233 String of input sent by typing the right-arrow key.
1236 String of input sent by the "scroll reverse" key.
1239 String to make the function keys transmit.
1242 String of input sent by the "clear to end of screen" key.
1245 String of input sent by the "clear tab stop this column" key.
1248 String of input sent by the "set tab stop in this column" key.
1251 String of input sent by typing the up-arrow key.
1254 String on keyboard labelling function key 0 or 10.
1257 Strings on keyboard labelling function keys 1 through 9.
1260 String to move the cursor left one column.
1263 String to move cursor left N columns.
1266 Number: height of the screen.
1269 String to position cursor at lower left corner.
1272 Number: lines of display memory.
1275 Flag: writing to last column of last line will not scroll.
1278 String to enter blinking mode.
1281 String to enter double-bright mode.
1284 String to turn off all appearance modes
1287 String to enter half-bright mode.
1290 Flag: cursor motion in insert mode is safe.
1293 String to enter invisible mode.
1296 String to enable the functioning of the Meta key.
1299 String to disable the functioning of the Meta key.
1302 String to enter protected mode.
1305 String to enter reverse-video mode.
1308 Flag: cursor motion in standout mode is safe.
1311 Obsolete flag: do not use ASCII carriage-return on this terminal.
1314 String to move the cursor right one column.
1317 Flag: do not use XON/XOFF flow control.
1320 Obsolete alternative name for the `do' and `sf' capabilities.
1323 Flag: the terminal does not normally scroll for sequential output.
1326 String to move to start of next line, possibly clearing rest of
1330 Flag: terminal can overstrike.
1333 Number: the lowest baud rate at which padding is actually needed.
1336 String containing character for padding.
1339 String to terminate redirection of output to the printer.
1342 String to redirect further output to the printer.
1345 String to redirect N characters ofoutput to the printer.
1348 String to print the screen on the attached printer.
1351 String to move to last saved cursor position.
1354 String to move cursor right N columns.
1357 String to output character C repeated N times.
1360 String to reset the terminal from any strange modes.
1363 String to turn on an arbitrary combination of appearance modes.
1366 String to save the current cursor position.
1369 String to leave standout mode.
1372 String to scroll the screen one line up.
1375 String to scroll the screen N lines up.
1378 Number: width of magic standout cookie. Absent if magic cookies
1382 String to enter standout mode.
1385 String to scroll the screen one line down.
1388 String to scroll the screen N line down.
1391 String to set tab stop at current cursor column on all lines.
1395 String to move the cursor right to the next hardware tab stop
1399 String to return terminal to settings for sequential output.
1402 String to initialize terminal for random cursor motion.
1405 String to move the terminal cursor into the status line.
1408 String to underline one character and move cursor right.
1411 String to turn off underline mode
1414 Number: width of underlining magic cookie. Absent if underlining
1415 doesn't use magic cookies.
1418 Flag: underline by overstriking with an underscore.
1421 String to move the cursor vertically up one line.
1424 String to move cursor vertically up N lines.
1427 String to turn on underline mode
1430 String to make the screen flash.
1433 String to return the cursor to normal.
1436 String to make the cursor invisible.
1439 String to enhance the cursor.
1442 String to set the terminal output screen window.
1445 Number: the width of the status line.
1448 Flag: superbee terminal.
1451 Flag: cursor wraps in a strange way.
1454 Flag: clearing a line is the only way to clear the appearance
1455 modes of positions in that line (or, only way to remove magic
1456 cookies on that line).
1459 Flag: Teleray 1061; several strange characteristics.
1462 File: termcap.info, Node: Var Index, Next: Cap Index, Prev: Summary, Up: Top
1464 Variable and Function Index
1465 ***************************
1470 * ospeed: Output Padding.
1471 * PC: Output Padding.
1473 * tgetflag: Interrogate.
1474 * tgetnum: Interrogate.
1475 * tgetstr: Interrogate.
1478 * tputs: Output Padding.