]> git.ipfire.org Git - thirdparty/bash.git/blob - lib/termcap/grot/termcap.info-3
c1e6af991df34afdf6311d476a2b91c214f09bec
[thirdparty/bash.git] / lib / termcap / grot / termcap.info-3
1 This is Info file /home/gd/gnu/termcap/termcap.info, produced by
2 Makeinfo-1.52 from the input file /home/gd/gnu/termcap/termcap.texi.
3
4 This file documents the termcap library of the GNU system.
5
6 Copyright (C) 1988 Free Software Foundation, Inc.
7
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.
11
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.
16
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.
21
22 \1f
23 File: termcap.info, Node: Insdel Char, Next: Standout, Prev: Insdel Line, Up: Capabilities
24
25 Insert/Delete Character
26 =======================
27
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.
31
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.
35
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.
40
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.
45
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.
56
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
60 be inserted.
61
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.
67
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.
75
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.
83
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.
88
89 `im'
90 String of commands to enter insert mode.
91
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.
96
97 New programs should not act like `vi'. They should pay attention
98 to `im' only if it is defined.
99
100 `ei'
101 String of commands to leave insert mode. This capability must be
102 present if `im' is.
103
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
112 turned off.
113
114 `ic'
115 String of commands to insert one character position at the cursor.
116 The cursor does not move.
117
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.
121
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
127 insertion is done.
128
129 `ip'
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
133 Padding::.).
134
135 `IC'
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.
139
140 If `IC' is provided, application programs may use it without first
141 entering insert mode.
142
143 `mi'
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.
146
147 `in'
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.
151
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
154 provided.
155
156 To insert N blank character positions, move the cursor to the place
157 to insert them and follow this algorithm:
158
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.
162
163 2. Output the `im' string, if there is one, unless the terminal is
164 already in insert mode.
165
166 3. Repeat steps 4 through 6, N times.
167
168 4. Output the `ic' string if any.
169
170 5. Output a space.
171
172 6. Output the `ip' string if any.
173
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
178 mode.
179
180 To insert N graphic characters, position the cursor and follow this
181 algorithm:
182
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
186 the remaining steps.
187
188 2. Output the `im' string, if there is one, unless the terminal is
189 already in insert mode.
190
191 3. For each character to be output, repeat steps 4 through 6.
192
193 4. Output the `ic' string if any.
194
195 5. Output the next graphic character.
196
197 6. Output the `ip' string if any.
198
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
203 mode.
204
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.
211
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.
215
216 `dc'
217 String of commands to delete one character position at the cursor.
218 If `dc' is not present, the terminal cannot delete characters.
219
220 `DC'
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'.
224
225 `dm'
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
228 a `dc').
229
230 `ed'
231 String of commands to exit delete mode. This must be present if
232 `dm' is.
233
234 To delete N character positions, position the cursor and follow these
235 steps:
236
237 1. If the `DC' string is present, output it with parameter N and you
238 are finished. Otherwise, follow the remaining steps.
239
240 2. Output the `dm' string, unless you know the terminal is already in
241 delete mode.
242
243 3. Output the `dc' string N times.
244
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.
248
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.
252
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.
258
259 \1f
260 File: termcap.info, Node: Standout, Next: Underlining, Prev: Insdel Char, Up: Capabilities
261
262 Standout and Appearance Modes
263 =============================
264
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.
269
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.
277
278 Terminals that implement appearance modes fall into two general
279 classes as to how they do it.
280
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.
287
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".
292
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.
300
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.
304
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.
311
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
316 width as the other.
317
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.
324
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
332 cursor motion.
333
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.
339
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.
349
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
354 obsolete.
355
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.
365
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
376 Cursor Motion::).
377
378 `so'
379 String of commands to enter standout mode.
380
381 `se'
382 String of commands to leave standout mode.
383
384 `sg'
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.
388
389 `ms'
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.
394
395 `xs'
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.
401
402 `xt'
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
406 above.
407
408 `mb'
409 String of commands to enter blinking mode.
410
411 `md'
412 String of commands to enter double-bright mode.
413
414 `mh'
415 String of commands to enter half-bright mode.
416
417 `mk'
418 String of commands to enter invisible mode.
419
420 `mp'
421 String of commands to enter protected mode.
422
423 `mr'
424 String of commands to enter reverse-video mode.
425
426 `me'
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.
431
432 `as'
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
436 pictures look like.
437
438 `ae'
439 String of commands to turn off alternate character set mode.
440
441 `sa'
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.
448
449 The nine parameters are, in order, STANDOUT, UNDERLINE, REVERSE,
450 BLINK, HALF-BRIGHT, DOUBLE-BRIGHT, BLANK, PROTECT, ALT CHAR SET.
451
452 \1f
453 File: termcap.info, Node: Underlining, Next: Cursor Visibility, Prev: Standout, Up: Capabilities
454
455 Underlining
456 ===========
457
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.
462
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'.
469
470 `us'
471 String of commands to turn on underline mode or to output a magic
472 cookie to start underlining.
473
474 `ue'
475 String of commands to turn off underline mode or to output a magic
476 cookie to stop underlining.
477
478 `ug'
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.
481
482 `ms'
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.
487
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.
495
496 `uc'
497 String of commands to underline the character under the cursor, and
498 move the cursor right.
499
500 `ul'
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.
507
508 \1f
509 File: termcap.info, Node: Cursor Visibility, Next: Bell, Prev: Underlining, Up: Capabilities
510
511 Cursor Visibility
512 =================
513
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
519 normal on exit.
520
521 `vs'
522 String of commands to enhance the cursor.
523
524 `vi'
525 String of commands to make the cursor invisible.
526
527 `ve'
528 String of commands to return the cursor to normal.
529
530 If you define either `vs' or `vi', you must also define `ve'.
531
532 \1f
533 File: termcap.info, Node: Bell, Next: Keypad, Prev: Cursor Visibility, Up: Capabilities
534
535 Bell
536 ====
537
538 Here we describe commands to make the terminal ask for the user to
539 pay attention to it.
540
541 `bl'
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
544 suitable sound.
545
546 `vb'
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.
550
551 \1f
552 File: termcap.info, Node: Keypad, Next: Meta Key, Prev: Bell, Up: Capabilities
553
554 Keypad and Function Keys
555 ========================
556
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.
563
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.
567
568 `ks'
569 String of commands to make the function keys transmit. If this
570 capability is not provided, but the others in this section are,
571 programs may assume that the function keys always transmit.
572
573 `ke'
574 String of commands to make the function keys work locally. This
575 capability is provided only if `ks' is.
576
577 `kl'
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.
581
582 `kr'
583 String of input characters sent by typing the right-arrow key.
584
585 `ku'
586 String of input characters sent by typing the up-arrow key.
587
588 `kd'
589 String of input characters sent by typing the down-arrow key.
590
591 `kh'
592 String of input characters sent by typing the "home-position" key.
593
594 `K1' ... `K5'
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.
600
601 `k0'
602 String of input characters sent by function key 10 (or 0, if the
603 terminal has one labeled 0).
604
605 `k1' ... `k9'
606 Strings of input characters sent by function keys 1 through 9,
607 provided for those function keys that exist.
608
609 `kn'
610 Number: the number of numbered function keys, if there are more
611 than 10.
612
613 `l0' ... `l9'
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'
617 ... `f9'.
618
619 `kH'
620 String of input characters sent by the "home down" key, if there is
621 one.
622
623 `kb'
624 String of input characters sent by the "backspace" key, if there is
625 one.
626
627 `ka'
628 String of input characters sent by the "clear all tabs" key, if
629 there is one.
630
631 `kt'
632 String of input characters sent by the "clear tab stop this column"
633 key, if there is one.
634
635 `kC'
636 String of input characters sent by the "clear screen" key, if
637 there is one.
638
639 `kD'
640 String of input characters sent by the "delete character" key, if
641 there is one.
642
643 `kL'
644 String of input characters sent by the "delete line" key, if there
645 is one.
646
647 `kM'
648 String of input characters sent by the "exit insert mode" key, if
649 there is one.
650
651 `kE'
652 String of input characters sent by the "clear to end of line" key,
653 if there is one.
654
655 `kS'
656 String of input characters sent by the "clear to end of screen"
657 key, if there is one.
658
659 `kI'
660 String of input characters sent by the "insert character" or "enter
661 insert mode" key, if there is one.
662
663 `kA'
664 String of input characters sent by the "insert line" key, if there
665 is one.
666
667 `kN'
668 String of input characters sent by the "next page" key, if there is
669 one.
670
671 `kP'
672 String of input characters sent by the "previous page" key, if
673 there is one.
674
675 `kF'
676 String of input characters sent by the "scroll forward" key, if
677 there is one.
678
679 `kR'
680 String of input characters sent by the "scroll reverse" key, if
681 there is one.
682
683 `kT'
684 String of input characters sent by the "set tab stop in this
685 column" key, if there is one.
686
687 `ko'
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".
697
698 \1f
699 File: termcap.info, Node: Meta Key, Next: Initialization, Prev: Keypad, Up: Capabilities
700
701 Meta Key
702 ========
703
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.
709
710 `km'
711 Flag whose presence means that the terminal has a Meta key.
712
713 `mm'
714 String of commands to enable the functioning of the Meta key.
715
716 `mo'
717 String of commands to disable the functioning of the Meta key.
718
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.
724
725 \1f
726 File: termcap.info, Node: Initialization, Next: Pad Specs, Prev: Meta Key, Up: Capabilities
727
728 Initialization
729 ==============
730
731 `ti'
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.
736
737 `te'
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.
741
742 `is'
743 String of commands to initialize the terminal for each login
744 session.
745
746 `if'
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.
750
751 `i1'
752 `i3'
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.
756
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.
762
763 `rs'
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
769 would normally use.
770
771 `it'
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.
779
780 `ct'
781 String of commands to clear all tab stops.
782
783 `st'
784 String of commands to set tab stop at current cursor column on all
785 lines.
786
787 \1f
788 File: termcap.info, Node: Pad Specs, Next: Status Line, Prev: Initialization, Up: Capabilities
789
790 Padding Capabilities
791 ====================
792
793 There are two terminal capabilities that exist just to explain the
794 proper way to obey the padding specifications in all the command string
795 capabilities. One, `pc', must be obeyed by all termcap-using programs.
796
797 `pb'
798 Numeric value, the lowest baud rate at which padding is actually
799 needed. Programs may check this and refrain from doing any
800 padding at lower speeds.
801
802 `pc'
803 String of commands for padding. The first character of this
804 string is to be used as the pad character, instead of using null
805 characters for padding. If `pc' is not provided, use null
806 characters. Every program that uses termcap must look up this
807 capability and use it to set the variable `PC' that is used by
808 `tputs'. *Note Padding::.
809
810 Some termcap capabilities exist just to specify the amount of
811 padding that the kernel should give to cursor motion commands used in
812 ordinary sequential output.
813
814 `dC'
815 Numeric value, the number of msec of padding needed for the
816 carriage-return character.
817
818 `dN'
819 Numeric value, the number of msec of padding needed for the newline
820 (linefeed) character.
821
822 `dB'
823 Numeric value, the number of msec of padding needed for the
824 backspace character.
825
826 `dF'
827 Numeric value, the number of msec of padding needed for the
828 formfeed character.
829
830 `dT'
831 Numeric value, the number of msec of padding needed for the tab
832 character.
833
834 In some systems, the kernel uses the above capabilities; in other
835 systems, the kernel uses the paddings specified in the string
836 capabilities `cr', `sf', `le', `ff' and `ta'. Descriptions of
837 terminals which require such padding should contain the `dC' ... `dT'
838 capabilities and also specify the appropriate padding in the
839 corresponding string capabilities. Since no modern terminals require
840 padding for ordinary sequential output, you probably won't need to do
841 either of these things.
842
843 \1f
844 File: termcap.info, Node: Status Line, Next: Half-Line, Prev: Pad Specs, Up: Capabilities
845
846 Status Line
847 ===========
848
849 A "status line" is a line on the terminal that is not used for
850 ordinary display output but instead used for a special message. The
851 intended use is for a continuously updated description of what the
852 user's program is doing, and that is where the name "status line" comes
853 from, but in fact it could be used for anything. The distinguishing
854 characteristic of a status line is that ordinary output to the terminal
855 does not affect it; it changes only if the special status line commands
856 of this section are used.
857
858 `hs'
859 Flag whose presence means that the terminal has a status line. If
860 a terminal description specifies that there is a status line, it
861 must provide the `ts' and `fs' capabilities.
862
863 `ts'
864 String of commands to move the terminal cursor into the status
865 line. Usually these commands must specifically record the old
866 cursor position for the sake of the `fs' string.
867
868 `fs'
869 String of commands to move the cursor back from the status line to
870 its previous position (outside the status line).
871
872 `es'
873 Flag whose presence means that other display commands work while
874 writing the status line. In other words, one can clear parts of
875 it, insert or delete characters, move the cursor within it using
876 `ch' if there is a `ch' capability, enter and leave standout mode,
877 and so on.
878
879 `ds'
880 String of commands to disable the display of the status line. This
881 may be absent, if there is no way to disable the status line
882 display.
883
884 `ws'
885 Numeric value, the width of the status line. If this capability is
886 absent in a terminal that has a status line, it means the status
887 line is the same width as the other lines.
888
889 Note that the value of `ws' is sometimes as small as 8.
890
891 \1f
892 File: termcap.info, Node: Half-Line, Next: Printer, Prev: Status Line, Up: Capabilities
893
894 Half-Line Motion
895 ================
896
897 Some terminals have commands for moving the cursor vertically by
898 half-lines, useful for outputting subscripts and superscripts. Mostly
899 it is hardcopy terminals that have such features.
900
901 `hu'
902 String of commands to move the cursor up half a line. If the
903 terminal is a display, it is your responsibility to avoid moving
904 up past the top line; however, most likely the terminal that
905 supports this is a hardcopy terminal and there is nothing to be
906 concerned about.
907
908 `hd'
909 String of commands to move the cursor down half a line. If the
910 terminal is a display, it is your responsibility to avoid moving
911 down past the bottom line, etc.
912
913 \1f
914 File: termcap.info, Node: Printer, Prev: Half-Line, Up: Capabilities
915
916 Controlling Printers Attached to Terminals
917 ==========================================
918
919 Some terminals have attached hardcopy printer ports. They may be
920 able to copy the screen contents to the printer; they may also be able
921 to redirect output to the printer. Termcap does not have anything to
922 tell the program whether the redirected output appears also on the
923 screen; it does on some terminals but not all.
924
925 `ps'
926 String of commands to cause the contents of the screen to be
927 printed. If it is absent, the screen contents cannot be printed.
928
929 `po'
930 String of commands to redirect further output to the printer.
931
932 `pf'
933 String of commands to terminate redirection of output to the
934 printer. This capability must be present in the description if
935 `po' is.
936
937 `pO'
938 String of commands to redirect output to the printer for next N
939 characters of output, regardless of what they are. Redirection
940 will end automatically after N characters of further output. Until
941 then, nothing that is output can end redirection, not even the
942 `pf' string if there is one. The number N should not be more than
943 255.
944
945 One use of this capability is to send non-text byte sequences
946 (such as bit-maps) to the printer.
947
948 Most terminals with printers do not support all of `ps', `po' and
949 `pO'; any one or two of them may be supported. To make a program that
950 can send output to all kinds of printers, it is necessary to check for
951 all three of these capabilities, choose the most convenient of the ones
952 that are provided, and use it in its own appropriate fashion.
953
954 \1f
955 File: termcap.info, Node: Summary, Next: Var Index, Prev: Capabilities, Up: Top
956
957 Summary of Capability Names
958 ***************************
959
960 Here are all the terminal capability names in alphabetical order
961 with a brief description of each. For cross references to their
962 definitions, see the index of capability names (*note Cap Index::.).
963
964 `ae'
965 String to turn off alternate character set mode.
966
967 `al'
968 String to insert a blank line before the cursor.
969
970 `AL'
971 String to insert N blank lines before the cursor.
972
973 `am'
974 Flag: output to last column wraps cursor to next line.
975
976 `as'
977 String to turn on alternate character set mode.like.
978
979 `bc'
980 Very obsolete alternative name for the `le' capability.
981
982 `bl'
983 String to sound the bell.
984
985 `bs'
986 Obsolete flag: ASCII backspace may be used for leftward motion.
987
988 `bt'
989 String to move the cursor left to the previous hardware tab stop
990 column.
991
992 `bw'
993 Flag: `le' at left margin wraps to end of previous line.
994
995 `CC'
996 String to change terminal's command character.
997
998 `cd'
999 String to clear the line the cursor is on, and following lines.
1000
1001 `ce'
1002 String to clear from the cursor to the end of the line.
1003
1004 `ch'
1005 String to position the cursor at column C in the same line.
1006
1007 `cl'
1008 String to clear the entire screen and put cursor at upper left
1009 corner.
1010
1011 `cm'
1012 String to position the cursor at line L, column C.
1013
1014 `CM'
1015 String to position the cursor at line L, column C, relative to
1016 display memory.
1017
1018 `co'
1019 Number: width of the screen.
1020
1021 `cr'
1022 String to move cursor sideways to left margin.
1023
1024 `cs'
1025 String to set the scroll region.
1026
1027 `cS'
1028 Alternate form of string to set the scroll region.
1029
1030 `ct'
1031 String to clear all tab stops.
1032
1033 `cv'
1034 String to position the cursor at line L in the same column.
1035
1036 `da'
1037 Flag: data scrolled off top of screen may be scrolled back.
1038
1039 `db'
1040 Flag: data scrolled off bottom of screen may be scrolled back.
1041
1042 `dB'
1043 Obsolete number: msec of padding needed for the backspace
1044 character.
1045
1046 `dc'
1047 String to delete one character position at the cursor.
1048
1049 `dC'
1050 Obsolete number: msec of padding needed for the carriage-return
1051 character.
1052
1053 `DC'
1054 String to delete N characters starting at the cursor.
1055
1056 `dF'
1057 Obsolete number: msec of padding needed for the formfeed character.
1058
1059 `dl'
1060 String to delete the line the cursor is on.
1061
1062 `DL'
1063 String to delete N lines starting with the cursor's line.
1064
1065 `dm'
1066 String to enter delete mode.
1067
1068 `dN'
1069 Obsolete number: msec of padding needed for the newline character.
1070
1071 `do'
1072 String to move the cursor vertically down one line.
1073
1074 `DO'
1075 String to move cursor vertically down N lines.
1076
1077 `ds'
1078 String to disable the display of the status line.
1079
1080 `dT'
1081 Obsolete number: msec of padding needed for the tab character.
1082
1083 `ec'
1084 String of commands to clear N characters at cursor.
1085
1086 `ed'
1087 String to exit delete mode.
1088
1089 `ei'
1090 String to leave insert mode.
1091
1092 `eo'
1093 Flag: output of a space can erase an overstrike.
1094
1095 `es'
1096 Flag: other display commands work while writing the status line.
1097
1098 `ff'
1099 String to advance to the next page, for a hardcopy terminal.
1100
1101 `fs'
1102 String to move the cursor back from the status line to its
1103 previous position (outside the status line).
1104
1105 `gn'
1106 Flag: this terminal type is generic, not real.
1107
1108 `hc'
1109 Flag: hardcopy terminal.
1110
1111 `hd'
1112 String to move the cursor down half a line.
1113
1114 `ho'
1115 String to position cursor at upper left corner.
1116
1117 `hs'
1118 Flag: the terminal has a status line.
1119
1120 `hu'
1121 String to move the cursor up half a line.
1122
1123 `hz'
1124 Flag: terminal cannot accept `~' as output.
1125
1126 `i1'
1127 String to initialize the terminal for each login session.
1128
1129 `i3'
1130 String to initialize the terminal for each login session.
1131
1132 `ic'
1133 String to insert one character position at the cursor.
1134
1135 `IC'
1136 String to insert N character positions at the cursor.
1137
1138 `if'
1139 String naming a file of commands to initialize the terminal.
1140
1141 `im'
1142 String to enter insert mode.
1143
1144 `in'
1145 Flag: outputting a space is different from moving over empty
1146 positions.
1147
1148 `ip'
1149 String to output following an inserted character in insert mode.
1150
1151 `is'
1152 String to initialize the terminal for each login session.
1153
1154 `it'
1155 Number: initial spacing between hardware tab stop columns.
1156
1157 `k0'
1158 String of input sent by function key 0 or 10.
1159
1160 `k1 ... k9'
1161 Strings of input sent by function keys 1 through 9.
1162
1163 `K1 ... K5'
1164 Strings sent by the five other keys in 3-by-3 array with arrows.
1165
1166 `ka'
1167 String of input sent by the "clear all tabs" key.
1168
1169 `kA'
1170 String of input sent by the "insert line" key.
1171
1172 `kb'
1173 String of input sent by the "backspace" key.
1174
1175 `kC'
1176 String of input sent by the "clear screen" key.
1177
1178 `kd'
1179 String of input sent by typing the down-arrow key.
1180
1181 `kD'
1182 String of input sent by the "delete character" key.
1183
1184 `ke'
1185 String to make the function keys work locally.
1186
1187 `kE'
1188 String of input sent by the "clear to end of line" key.
1189
1190 `kF'
1191 String of input sent by the "scroll forward" key.
1192
1193 `kh'
1194 String of input sent by typing the "home-position" key.
1195
1196 `kH'
1197 String of input sent by the "home down" key.
1198
1199 `kI'
1200 String of input sent by the "insert character" or "enter insert
1201 mode" key.
1202
1203 `kl'
1204 String of input sent by typing the left-arrow key.
1205
1206 `kL'
1207 String of input sent by the "delete line" key.
1208
1209 `km'
1210 Flag: the terminal has a Meta key.
1211
1212 `kM'
1213 String of input sent by the "exit insert mode" key.
1214
1215 `kn'
1216 Numeric value, the number of numbered function keys.
1217
1218 `kN'
1219 String of input sent by the "next page" key.
1220
1221 `ko'
1222 Very obsolete string listing the terminal's named function keys.
1223
1224 `kP'
1225 String of input sent by the "previous page" key.
1226
1227 `kr'
1228 String of input sent by typing the right-arrow key.
1229
1230 `kR'
1231 String of input sent by the "scroll reverse" key.
1232
1233 `ks'
1234 String to make the function keys transmit.
1235
1236 `kS'
1237 String of input sent by the "clear to end of screen" key.
1238
1239 `kt'
1240 String of input sent by the "clear tab stop this column" key.
1241
1242 `kT'
1243 String of input sent by the "set tab stop in this column" key.
1244
1245 `ku'
1246 String of input sent by typing the up-arrow key.
1247
1248 `l0'
1249 String on keyboard labelling function key 0 or 10.
1250
1251 `l1 ... l9'
1252 Strings on keyboard labelling function keys 1 through 9.
1253
1254 `le'
1255 String to move the cursor left one column.
1256
1257 `LE'
1258 String to move cursor left N columns.
1259
1260 `li'
1261 Number: height of the screen.
1262
1263 `ll'
1264 String to position cursor at lower left corner.
1265
1266 `lm'
1267 Number: lines of display memory.
1268
1269 `mb'
1270 String to enter blinking mode.
1271
1272 `md'
1273 String to enter double-bright mode.
1274
1275 `me'
1276 String to turn off all appearance modes
1277
1278 `mh'
1279 String to enter half-bright mode.
1280
1281 `mi'
1282 Flag: cursor motion in insert mode is safe.
1283
1284 `mk'
1285 String to enter invisible mode.
1286
1287 `mm'
1288 String to enable the functioning of the Meta key.
1289
1290 `mo'
1291 String to disable the functioning of the Meta key.
1292
1293 `mp'
1294 String to enter protected mode.
1295
1296 `mr'
1297 String to enter reverse-video mode.
1298
1299 `ms'
1300 Flag: cursor motion in standout mode is safe.
1301
1302 `nc'
1303 Obsolete flag: do not use ASCII carriage-return on this terminal.
1304
1305 `nd'
1306 String to move the cursor right one column.
1307
1308 `nl'
1309 Obsolete alternative name for the `do' and `sf' capabilities.
1310
1311 `ns'
1312 Flag: the terminal does not normally scroll for sequential output.
1313
1314 `nw'
1315 String to move to start of next line, possibly clearing rest of
1316 old line.
1317
1318 `os'
1319 Flag: terminal can overstrike.
1320
1321 `pb'
1322 Number: the lowest baud rate at which padding is actually needed.
1323
1324 `pc'
1325 String containing character for padding.
1326
1327 `pf'
1328 String to terminate redirection of output to the printer.
1329
1330 `po'
1331 String to redirect further output to the printer.
1332
1333 `pO'
1334 String to redirect N characters ofoutput to the printer.
1335
1336 `ps'
1337 String to print the screen on the attached printer.
1338
1339 `rc'
1340 String to move to last saved cursor position.
1341
1342 `RI'
1343 String to move cursor right N columns.
1344
1345 `rp'
1346 String to output character C repeated N times.
1347
1348 `rs'
1349 String to reset the terminal from any strange modes.
1350
1351 `sa'
1352 String to turn on an arbitrary combination of appearance modes.
1353
1354 `sc'
1355 String to save the current cursor position.
1356
1357 `se'
1358 String to leave standout mode.
1359
1360 `sf'
1361 String to scroll the screen one line up.
1362
1363 `SF'
1364 String to scroll the screen N lines up.
1365
1366 `sg'
1367 Number: width of magic standout cookie. Absent if magic cookies
1368 are not used.
1369
1370 `so'
1371 String to enter standout mode.
1372
1373 `sr'
1374 String to scroll the screen one line down.
1375
1376 `SR'
1377 String to scroll the screen N line down.
1378
1379 `st'
1380 String to set tab stop at current cursor column on all lines.
1381 programs.
1382
1383 `ta'
1384 String to move the cursor right to the next hardware tab stop
1385 column.
1386
1387 `te'
1388 String to return terminal to settings for sequential output.
1389
1390 `ti'
1391 String to initialize terminal for random cursor motion.
1392
1393 `ts'
1394 String to move the terminal cursor into the status line.
1395
1396 `uc'
1397 String to underline one character and move cursor right.
1398
1399 `ue'
1400 String to turn off underline mode
1401
1402 `ug'
1403 Number: width of underlining magic cookie. Absent if underlining
1404 doesn't use magic cookies.
1405
1406 `ul'
1407 Flag: underline by overstriking with an underscore.
1408
1409 `up'
1410 String to move the cursor vertically up one line.
1411
1412 `UP'
1413 String to move cursor vertically up N lines.
1414
1415 `us'
1416 String to turn on underline mode
1417
1418 `vb'
1419 String to make the screen flash.
1420
1421 `ve'
1422 String to return the cursor to normal.
1423
1424 `vi'
1425 String to make the cursor invisible.
1426
1427 `vs'
1428 String to enhance the cursor.
1429
1430 `wi'
1431 String to set the terminal output screen window.
1432
1433 `ws'
1434 Number: the width of the status line.
1435
1436 `xb'
1437 Flag: superbee terminal.
1438
1439 `xn'
1440 Flag: cursor wraps in a strange way.
1441
1442 `xs'
1443 Flag: clearing a line is the only way to clear the appearance
1444 modes of positions in that line (or, only way to remove magic
1445 cookies on that line).
1446
1447 `xt'
1448 Flag: Teleray 1061; several strange characteristics.
1449
1450 \1f
1451 File: termcap.info, Node: Var Index, Next: Cap Index, Prev: Summary, Up: Top
1452
1453 Variable and Function Index
1454 ***************************
1455
1456 * Menu:
1457
1458 * BC: tgoto.
1459 * ospeed: Output Padding.
1460 * PC: Output Padding.
1461 * tgetent: Find.
1462 * tgetflag: Interrogate.
1463 * tgetnum: Interrogate.
1464 * tgetstr: Interrogate.
1465 * tgoto: tgoto.
1466 * tparam: tparam.
1467 * tputs: Output Padding.
1468 * UP: tgoto.
1469