home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / trmcap11.zip / termcap-1.1 / termcap.info-3 (.txt) < prev    next >
GNU Info File  |  1992-04-11  |  49KB  |  838 lines

  1. This is Info file termcap.info, produced by Makeinfo-1.44 from the
  2. input file termcap.texinfo.
  3.    This file documents the termcap library of the GNU system.
  4.    Copyright (C) 1988 Free Software Foundation, Inc.
  5.    Permission is granted to make and distribute verbatim copies of
  6. this manual provided the copyright notice and this permission notice
  7. are preserved on all copies.
  8.    Permission is granted to copy and distribute modified versions of
  9. this manual under the conditions for verbatim copying, provided that
  10. the entire resulting derived work is distributed under the terms of a
  11. permission notice identical to this one.
  12.    Permission is granted to copy and distribute translations of this
  13. manual into another language, under the above conditions for modified
  14. versions, except that this permission notice may be stated in a
  15. translation approved by the Foundation.
  16. File: termcap.info,  Node: Insdel Char,  Next: Standout,  Prev: Insdel Line,  Up: Capabilities
  17. Insert/Delete Character
  18. =======================
  19.    "Inserting a character" means creating a blank space in the middle
  20. of a line, and pushing the rest of the line rightward.  The character
  21. in the rightmost column is lost.
  22.    "Deleting a character" means causing the character to disappear from
  23. the screen, closing up the gap by moving the rest of the line
  24. leftward.  A blank space appears in the rightmost column.
  25.    Insertion and deletion of characters is useful in programs that
  26. maintain an updating display some parts of which may get longer or
  27. shorter.  It is also useful in editors for redisplaying the results of
  28. editing within a line.
  29.    Many terminals provide commands to insert or delete a single
  30. character at the cursor position.  Some provide the ability to insert
  31. or delete several characters with one command, using the number of
  32. characters to insert or delete as a parameter.
  33.    Many terminals provide an insert mode in which outputting a graphic
  34. character has the added effect of inserting a position for that
  35. character.  A special command string is used to enter insert mode and
  36. another is used to exit it.  The reason for designing a terminal with
  37. an insert mode rather than an insert command is that inserting
  38. character positions is usually followed by writing characters into
  39. them.  With insert mode, this is as fast as simply writing the
  40. characters, except for the fixed overhead of entering and leaving
  41. insert mode.  However, when the line speed is great enough, padding
  42. may be required for the graphic characters output in insert mode.
  43.    Some terminals require you to enter insert mode and then output a
  44. special command for each position to be inserted.  Or they may require
  45. special commands to be output before or after each graphic character
  46. to be inserted.
  47.    Deletion of characters is usually accomplished by a straightforward
  48. command to delete one or several positions; but on some terminals, it
  49. is necessary to enter a special delete mode before using the delete
  50. command, and leave delete mode afterward.  Sometimes delete mode and
  51. insert mode are the same mode.
  52.    Some terminals make a distinction between character positions in
  53. which a space character has been output and positions which have been
  54. cleared.  On these terminals, the effect of insert or delete character
  55. runs to the first cleared position rather than to the end of the line.
  56.  In fact, the effect may run to more than one line if there is no
  57. cleared position to stop the shift on the first line.  These terminals
  58. are identified by the `in' flag capability.
  59.    On terminals with the `in' flag, the technique of skipping over
  60. characters that you know were cleared, and then outputting text later
  61. on in the same line, causes later insert and delete character
  62. operations on that line to do nonstandard things.  A program that has
  63. any chance of doing this must check for the `in' flag and must be
  64. careful to write explicit space characters into the intermediate
  65. columns when `in' is present.
  66.    A plethora of terminal capabilities are needed to describe all of
  67. this complexity.  Here is a list of them all.  Following the list, we
  68. present an algorithm for programs to use to take proper account of all
  69. of these capabilities.
  70.      String of commands to enter insert mode.
  71.      If the terminal has no special insert mode, but it can insert
  72.      characters with a special command, `im' should be defined with a
  73.      null value, because the `vi' editor assumes that insertion of a
  74.      character is impossible if `im' is not provided.
  75.      New programs should not act like `vi'.  They should pay attention
  76.      to `im' only if it is defined.
  77.      String of commands to leave insert mode.  This capability must be
  78.      present if `im' is.
  79.      On a few old terminals the same string is used to enter and exit
  80.      insert mode.  This string turns insert mode on if it was off, and
  81.      off it it was on.  You can tell these terminals because the `ei'
  82.      string equals the `im' string.  If you want to support these
  83.      terminals, you must always remember accurately whether insert
  84.      mode is in effect.  However, these terminals are obsolete, and it
  85.      is reasonable to refuse to support them.  On all modern
  86.      terminals, you can safely output `ei' at any time to ensure that
  87.      insert mode is turned off.
  88.      String of commands to insert one character position at the cursor. 
  89.      The cursor does not move.
  90.      If outputting a graphic character while in insert mode is
  91.      sufficient to insert the character, then the `ic' capability
  92.      should be defined with a null value.
  93.      If your terminal offers a choice of ways to insert--either use
  94.      insert mode or use a special command--then define `im' and do not
  95.      define `ic', since this gives the most efficient operation when
  96.      several characters are to be inserted.  *Do not* define both
  97.      strings, for that means that *both* must be used each time
  98.      insertion is done.
  99.      String of commands to output following an inserted graphic
  100.      character in insert mode.  Often it is used just for a padding
  101.      spec, when padding is needed after an inserted character (*note
  102.      Padding::.).
  103.      String of commands to insert N character positions at and after
  104.      the cursor.  It has the same effect as repeating the `ic' string
  105.      and a space, N times.
  106.      If `IC' is provided, application programs may use it without first
  107.      entering insert mode.
  108.      Flag whose presence means it is safe to move the cursor while in
  109.      insert mode and assume the terminal remains in insert mode.
  110.      Flag whose presence means that the terminal distinguishes between
  111.      character positions in which space characters have been output and
  112.      positions which have been cleared.
  113.    An application program can assume that the terminal can do character
  114. insertion if *any one of* the capabilities `IC', `im', `ic' or `ip' is
  115. provided.
  116.    To insert N blank character positions, move the cursor to the place
  117. to insert them and follow this algorithm:
  118.   1. If an `IC' string is provided, output it with parameter N and you
  119.      are finished.  Otherwise (or if you don't want to bother to look
  120.      for an `IC' string) follow the remaining steps.
  121.   2. Output the `im' string, if there is one, unless the terminal is
  122.      already in insert mode.
  123.   3. Repeat steps 4 through 6, N times.
  124.   4. Output the `ic' string if any.
  125.   5. Output a space.
  126.   6. Output the `ip' string if any.
  127.   7. Output the `ei' string, eventually, to exit insert mode.  There
  128.      is no need to do this right away.  If the `mi' flag is present,
  129.      you can move the cursor and the cursor will remain in insert mode;
  130.      then you can do more insertion elsewhere without reentering insert
  131.      mode.
  132.    To insert N graphic characters, position the cursor and follow this
  133. algorithm:
  134.   1. If an `IC' string is provided, output it with parameter N, then
  135.      output the graphic characters, and you are finished.  Otherwise
  136.      (or if you don't want to bother to look for an `IC' string)
  137.      follow the remaining steps.
  138.   2. Output the `im' string, if there is one, unless the terminal is
  139.      already in insert mode.
  140.   3. For each character to be output, repeat steps 4 through 6.
  141.   4. Output the `ic' string if any.
  142.   5. Output the next graphic character.
  143.   6. Output the `ip' string if any.
  144.   7. Output the `ei' string, eventually, to exit insert mode.  There
  145.      is no need to do this right away.  If the `mi' flag is present,
  146.      you can move the cursor and the cursor will remain in insert mode;
  147.      then you can do more insertion elsewhere without reentering insert
  148.      mode.
  149.    Note that this is not the same as the original Unix termcap
  150. specifications in one respect: it assumes that the `IC' string can be
  151. used without entering insert mode.  This is true as far as I know, and
  152. it allows you be able to avoid entering and leaving insert mode, and
  153. also to be able to avoid the inserted-character padding after the
  154. characters that go into the inserted positions.
  155.    Deletion of characters is less complicated; deleting one column is
  156. done by outputting the `dc' string.  However, there may be a delete
  157. mode that must be entered with `dm' in order to make `dc' work.
  158.      String of commands to delete one character position at the
  159.      cursor.  If `dc' is not present, the terminal cannot delete
  160.      characters.
  161.      String of commands to delete N characters starting at the cursor. 
  162.      It has the same effect as repeating the `dc' string N times.  Any
  163.      terminal description that has `DC' also has `dc'.
  164.      String of commands to enter delete mode.  If not present, there
  165.      is no delete mode, and `dc' can be used at any time (assuming
  166.      there is a `dc').
  167.      String of commands to exit delete mode.  This must be present if
  168.      `dm' is.
  169.    To delete N character positions, position the cursor and follow
  170. these steps:
  171.   1. If the `DC' string is present, output it with parameter N and you
  172.      are finished.  Otherwise, follow the remaining steps.
  173.   2. Output the `dm' string, unless you know the terminal is already
  174.      in delete mode.
  175.   3. Output the `dc' string N times.
  176.   4. Output the `ed' string eventually.  If the flag capability `mi'
  177.      is present, you can move the cursor and do more deletion without
  178.      leaving and reentering delete mode.
  179.    As with the `IC' string, we have departed from the original termcap
  180. specifications by assuming that `DC' works without entering delete
  181. mode even though `dc' would not.
  182.    If the `dm' and `im' capabilities are both present and have the
  183. same value, it means that the terminal has one mode for both insertion
  184. and deletion.  It is useful for a program to know this, because then
  185. it can do insertions after deletions, or vice versa, without leaving
  186. insert/delete mode and reentering it.
  187. File: termcap.info,  Node: Standout,  Next: Underlining,  Prev: Insdel Char,  Up: Capabilities
  188. Standout and Appearance Modes
  189. =============================
  190.    "Appearance modes" are modifications to the ways characters are
  191. displayed.  Typical appearance modes include reverse video, dim,
  192. bright, blinking, underlined, invisible, and alternate character set. 
  193. Each kind of terminal supports various among these, or perhaps none.
  194.    For each type of terminal, one appearance mode or combination of
  195. them that looks good for highlighted text is chosen as the "standout
  196. mode".  The capabilities `so' and `se' say how to enter and leave
  197. standout mode.  Programs that use appearance modes only to highlight
  198. some text generally use the standout mode so that they can work on as
  199. many terminals as possible.  Use of specific appearance modes other
  200. than "underlined" and "alternate character set" is rare.
  201.    Terminals that implement appearance modes fall into two general
  202. classes as to how they do it.
  203.    In some terminals, the presence or absence of any appearance mode is
  204. recorded separately for each character position.  In these terminals,
  205. each graphic character written is given the appearance modes current
  206. at the time it is written, and keeps those modes until it is erased or
  207. overwritten.  There are special commands to turn the appearance modes
  208. on or off for characters to be written in the future.
  209.    In other terminals, the change of appearance modes is represented
  210. by a marker that belongs to a certain screen position but affects all
  211. following screen positions until the next marker.  These markers are
  212. traditionally called "magic cookies".
  213.    The same capabilities (`so', `se', `mb' and so on) for turning
  214. appearance modes on and off are used for both magic-cookie terminals
  215. and per-character terminals.  On magic cookie terminals, these give
  216. the commands to write the magic cookies.  On per-character terminals,
  217. they change the current modes that affect future output and erasure. 
  218. Some simple applications can use these commands without knowing
  219. whether or not they work by means of cookies.
  220.    However, a program that maintains and updates a display needs to
  221. know whether the terminal uses magic cookies, and exactly what their
  222. effect is.  This information comes from the `sg' capability.
  223.    The `sg' capability is a numeric capability whose presence indicates
  224. that the terminal uses magic cookies for appearance modes.  Its value
  225. is the number of character positions that a magic cookie occupies. 
  226. Usually the cookie occupies one or more character positions on the
  227. screen, and these character positions are displayed as blank, but in
  228. some terminals the cookie has zero width.
  229.    The `sg' capability describes both the magic cookie to turn standout
  230. on and the cookie to turn it off.  This makes the assumption that both
  231. kinds of cookie have the same width on the screen.  If that is not
  232. true, the narrower cookie must be "widened" with spaces until it has
  233. the same width as the other.
  234.    On some magic cookie terminals, each line always starts with normal
  235. display; in other words, the scope of a magic cookie never extends over
  236. more than one line.  But on other terminals, one magic cookie affects
  237. all the lines below it unless explicitly canceled.  Termcap does not
  238. define any way to distinguish these two ways magic cookies can work. 
  239. To be safe, it is best to put a cookie at the beginning of each line.
  240.    On some per-character terminals, standout mode or other appearance
  241. modes may be canceled by moving the cursor.  On others, moving the
  242. cursor has no effect on the state of the appearance modes.  The latter
  243. class of terminals are given the flag capability `ms' ("can move in
  244. standout").  All programs that might have occasion to move the cursor
  245. while appearance modes are turned on must check for this flag; if it
  246. is not present, they should reset appearance modes to normal before
  247. doing cursor motion.
  248.    A program that has turned on only standout mode should use `se' to
  249. reset the standout mode to normal.  A program that has turned on only
  250. alternate character set mode should use `ae' to return it to normal. 
  251. If it is possible that any other appearance modes are turned on, use
  252. the `me' capability to return them to normal.
  253.    Note that the commands to turn on one appearance mode, including
  254. `so' and `mb' ... `mr', if used while some other appearance modes are
  255. turned on, may combine the two modes on some terminals but may turn off
  256. the mode previously enabled on other terminals.  This is because some
  257. terminals do not have a command to set or clear one appearance mode
  258. without changing the others.  Programs should not attempt to use
  259. appearance modes in combination except with `sa', and when switching
  260. from one single mode to another should always turn off the previously
  261. enabled mode and then turn on the new desired mode.
  262.    On some old terminals, the `so' and `se' commands may be the same
  263. command, which has the effect of turning standout on if it is off, or
  264. off it is on.  It is therefore risky for a program to output extra `se'
  265. commands for good measure.  Fortunately, all these terminals are
  266. obsolete.
  267.    Programs that update displays in which standout-text may be
  268. replaced with non-standout text must check for the `xs' flag.  In a
  269. per-character terminal, this flag says that the only way to remove
  270. standout once written is to clear that portion of the line with the
  271. `ce' string or something even more powerful (*note Clearing::.); just
  272. writing new characters at those screen positions will not change the
  273. modes in effect there.  In a magic cookie terminal, `xs' says that the
  274. only way to remove a cookie is to clear a portion of the line that
  275. includes the cookie; writing a different cookie at the same position
  276. does not work.
  277.    Such programs must also check for the `xt' flag, which means that
  278. the terminal is a Teleray 1061.  On this terminal it is impossible to
  279. position the cursor at the front of a magic cookie, so the only two
  280. ways to remove a cookie are (1) to delete the line it is on or (2) to
  281. position the cursor at least one character before it (possibly on a
  282. previous line) and output the `se' string, which on these terminals
  283. finds and removes the next `so' magic cookie on the screen.  (It may
  284. also be possible to remove a cookie which is not at the beginning of a
  285. line by clearing that line.)  The `xt' capability also has
  286. implications for the use of tab characters, but in that regard it is
  287. obsolete (*Note Cursor Motion::).
  288.      String of commands to enter standout mode.
  289.      String of commands to leave standout mode.
  290.      Numeric capability, the width on the screen of the magic cookie. 
  291.      This capability is absent in terminals that record appearance
  292.      modes character by character.
  293.      Flag whose presence means that it is safe to move the cursor
  294.      while the appearance modes are not in the normal state.  If this
  295.      flag is absent, programs should always reset the appearance modes
  296.      to normal before moving the cursor.
  297.      Flag whose presence means that the only way to reset appearance
  298.      modes already on the screen is to clear to end of line.  On a
  299.      per-character terminal, you must clear the area where the modes
  300.      are set.  On a magic cookie terminal, you must clear an area
  301.      containing the cookie.  See the discussion above.
  302.      Flag whose presence means that the cursor cannot be positioned
  303.      right in front of a magic cookie, and that `se' is a command to
  304.      delete the next magic cookie following the cursor.  See
  305.      discussion above.
  306.      String of commands to enter blinking mode.
  307.      String of commands to enter double-bright mode.
  308.      String of commands to enter half-bright mode.
  309.      String of commands to enter invisible mode.
  310.      String of commands to enter protected mode.
  311.      String of commands to enter reverse-video mode.
  312.      String of commands to turn off all appearance modes, including
  313.      standout mode and underline mode.  On some terminals it also
  314.      turns off alternate character set mode; on others, it may not. 
  315.      This capability must be present if any of `mb' ... `mr' is
  316.      present.
  317.      String of commands to turn on alternate character set mode.  This
  318.      mode assigns some or all graphic characters an alternate picture
  319.      on the screen.  There is no standard as to what the alternate
  320.      pictures look like.
  321.      String of commands to turn off alternate character set mode.
  322.      String of commands to turn on an arbitrary combination of
  323.      appearance modes.  It accepts 9 parameters, each of which
  324.      controls a particular kind of appearance mode.  A parameter
  325.      should be 1 to turn its appearance mode on, or zero to turn that
  326.      mode off.  Most terminals do not support the `sa' capability,
  327.      even among those that do have various appearance modes.
  328.      The nine parameters are, in order, STANDOUT, UNDERLINE, REVERSE,
  329.      BLINK, HALF-BRIGHT, DOUBLE-BRIGHT, BLANK, PROTECT, ALT CHAR SET.
  330. File: termcap.info,  Node: Underlining,  Next: Cursor Visibility,  Prev: Standout,  Up: Capabilities
  331. Underlining
  332. ===========
  333.    Underlining on most terminals is a kind of appearance mode, much
  334. like standout mode.  Therefore, it may be implemented using magic
  335. cookies or as a flag in the terminal whose current state affects each
  336. character that is output.  *Note Standout::, for a full explanation.
  337.    The `ug' capability is a numeric capability whose presence indicates
  338. that the terminal uses magic cookies for underlining.  Its value is the
  339. number of character positions that a magic cookie for underlining
  340. occupies; it is used for underlining just as `sg' is used for
  341. standout.  Aside from the simplest applications, it is impossible to
  342. use underlining correctly without paying attention to the value of
  343. `ug'.
  344.      String of commands to turn on underline mode or to output a magic
  345.      cookie to start underlining.
  346.      String of commands to turn off underline mode or to output a magic
  347.      cookie to stop underlining.
  348.      Width of magic cookie that represents a change of underline mode;
  349.      or missing, if the terminal does not use a magic cookie for this.
  350.      Flag whose presence means that it is safe to move the cursor
  351.      while the appearance modes are not in the normal state. 
  352.      Underlining is an appearance mode.  If this flag is absent,
  353.      programs should always turn off underlining before moving the
  354.      cursor.
  355.    There are two other, older ways of doing underlining: there can be a
  356. command to underline a single character, or the output of `_', the
  357. ASCII underscore character, as an overstrike could cause a character
  358. to be underlined.  New programs need not bother to handle these
  359. capabilities unless the author cares strongly about the obscure
  360. terminals which support them.  However, terminal descriptions should
  361. provide these capabilities when appropriate.
  362.      String of commands to underline the character under the cursor,
  363.      and move the cursor right.
  364.      Flag whose presence means that the terminal can underline by
  365.      overstriking an underscore character (`_'); some terminals can do
  366.      this even though they do not support overstriking in general.  An
  367.      implication of this flag is that when outputting new text to
  368.      overwrite old text, underscore characters must be treated
  369.      specially lest they underline the old text instead.
  370. File: termcap.info,  Node: Cursor Visibility,  Next: Bell,  Prev: Underlining,  Up: Capabilities
  371. Cursor Visibility
  372. =================
  373.    Some terminals have the ability to make the cursor invisible, or to
  374. enhance it.  Enhancing the cursor is often done by programs that plan
  375. to use the cursor to indicate to the user a position of interest that
  376. may be anywhere on the screen--for example, the Emacs editor enhances
  377. the cursor on entry.  Such programs should always restore the cursor
  378. to normal on exit.
  379.      String of commands to enhance the cursor.
  380.      String of commands to make the cursor invisible.
  381.      String of commands to return the cursor to normal.
  382.    If you define either `vs' or `vi', you must also define `ve'.
  383. File: termcap.info,  Node: Bell,  Next: Keypad,  Prev: Cursor Visibility,  Up: Capabilities
  384.    Here we describe commands to make the terminal ask for the user to
  385. pay attention to it.
  386.      String of commands to cause the terminal to make an audible
  387.      sound.  If this capability is absent, the terminal has no way to
  388.      make a suitable sound.
  389.      String of commands to cause the screen to flash to attract
  390.      attention ("visible bell").  If this capability is absent, the
  391.      terminal has no way to do such a thing.
  392. File: termcap.info,  Node: Keypad,  Next: Meta Key,  Prev: Bell,  Up: Capabilities
  393. Keypad and Function Keys
  394. ========================
  395.    Many terminals have arrow and function keys that transmit specific
  396. character sequences to the computer.  Since the precise sequences used
  397. depend on the terminal, termcap defines capabilities used to say what
  398. the sequences are.  Unlike most termcap string-valued capabilities,
  399. these are not strings of commands to be sent to the terminal, rather
  400. strings that are received from the terminal.
  401.    Programs that expect to use keypad keys should check, initially,
  402. for a `ks' capability and send it, to make the keypad actually
  403. transmit.  Such programs should also send the `ke' string when exiting.
  404.      String of commands to make the function keys transmit.  If this
  405.      capability is not provided, but the others in this section are,
  406.      programs may assume that the function keys always transmit.
  407.      String of commands to make the function keys work locally.  This
  408.      capability is provided only if `ks' is.
  409.      String of input characters sent by typing the left-arrow key.  If
  410.      this capability is missing, you cannot expect the terminal to
  411.      have a left-arrow key that transmits anything to the computer.
  412.      String of input characters sent by typing the right-arrow key.
  413.      String of input characters sent by typing the up-arrow key.
  414.      String of input characters sent by typing the down-arrow key.
  415.      String of input characters sent by typing the "home-position" key.
  416. `K1' ... `K5'
  417.      Strings of input characters sent by the five other keys in a
  418.      3-by-3 array that includes the arrow keys, if the keyboard has
  419.      such a 3-by-3 array.  Note that one of these keys may be the
  420.      "home-position" key, in which case one of these capabilities will
  421.      have the same value as the `kh' key.
  422.      String of input characters sent by function key 10 (or 0, if the
  423.      terminal has one labeled 0).
  424. `k1' ... `k9'
  425.      Strings of input characters sent by function keys 1 through 9,
  426.      provided for those function keys that exist.
  427.      Number: the number of numbered function keys, if there are more
  428.      than 10.
  429. `l0' ... `l9'
  430.      Strings which are the labels appearing on the keyboard on the keys
  431.      described by the capabilities `k0' ... `l9'.  These capabilities
  432.      should be left undefined if the labels are `f0' or `f10' and `f1'
  433.      ... `f9'.
  434.      String of input characters sent by the "home down" key, if there
  435.      is one.
  436.      String of input characters sent by the "backspace" key, if there
  437.      is one.
  438.      String of input characters sent by the "clear all tabs" key, if
  439.      there is one.
  440.      String of input characters sent by the "clear tab stop this
  441.      column" key, if there is one.
  442.      String of input characters sent by the "clear screen" key, if
  443.      there is one.
  444.      String of input characters sent by the "delete character" key, if
  445.      there is one.
  446.      String of input characters sent by the "delete line" key, if
  447.      there is one.
  448.      String of input characters sent by the "exit insert mode" key, if
  449.      there is one.
  450.      String of input characters sent by the "clear to end of line"
  451.      key, if there is one.
  452.      String of input characters sent by the "clear to end of screen"
  453.      key, if there is one.
  454.      String of input characters sent by the "insert character" or
  455.      "enter insert mode" key, if there is one.
  456.      String of input characters sent by the "insert line" key, if
  457.      there is one.
  458.      String of input characters sent by the "next page" key, if there
  459.      is one.
  460.      String of input characters sent by the "previous page" key, if
  461.      there is one.
  462.      String of input characters sent by the "scroll forward" key, if
  463.      there is one.
  464.      String of input characters sent by the "scroll reverse" key, if
  465.      there is one.
  466.      String of input characters sent by the "set tab stop in this
  467.      column" key, if there is one.
  468.      String listing the other function keys the terminal has.  This is
  469.      a very obsolete way of describing the same information found in
  470.      the `kH' ... `kT' keys.  The string contains a list of
  471.      two-character termcap capability names, separated by commas.  The
  472.      meaning is that for each capability name listed, the terminal has
  473.      a key which sends the string which is the value of that
  474.      capability.  For example, the value `:ko=cl,ll,sf,sr:' says that
  475.      the terminal has four function keys which mean "clear screen",
  476.      "home down", "scroll forward" and "scroll reverse".
  477. File: termcap.info,  Node: Meta Key,  Next: Initialization,  Prev: Keypad,  Up: Capabilities
  478. Meta Key
  479. ========
  480.    A Meta key is a key on the keyboard that modifies each character
  481. you type by controlling the 0200 bit.  This bit is on if and only if
  482. the Meta key is held down when the character is typed.  Characters
  483. typed using the Meta key are called Meta characters.  Emacs uses Meta
  484. characters as editing commands.
  485.      Flag whose presence means that the terminal has a Meta key.
  486.      String of commands to enable the functioning of the Meta key.
  487.      String of commands to disable the functioning of the Meta key.
  488.    If the terminal has `km' but does not have `mm' and `mo', it means
  489. that the Meta key always functions.  If it has `mm' and `mo', it means
  490. that the Meta key can be turned on or off.  Send the `mm' string to
  491. turn it on, and the `mo' string to turn it off.  I do not know why one
  492. would ever not want it to be on.
  493. File: termcap.info,  Node: Initialization,  Next: Pad Specs,  Prev: Meta Key,  Up: Capabilities
  494. Initialization
  495. ==============
  496.      String of commands to put the terminal into whatever special
  497.      modes are needed or appropriate for programs that move the cursor
  498.      nonsequentially around the screen.  Programs that use termcap to
  499.      do full-screen display should output this string when they start
  500.      up.
  501.      String of commands to undo what is done by the `ti' string. 
  502.      Programs that output the `ti' string on entry should output this
  503.      string when they exit.
  504.      String of commands to initialize the terminal for each login
  505.      session.
  506.      String which is the name of a file containing the string of
  507.      commands to initialize the terminal for each session of use. 
  508.      Normally `is' and `if' are not both used.
  509.      Two more strings of commands to initialize the terminal for each
  510.      login session.  The `i1' string (if defined) is output before `is'
  511.      or `if', and the `i3' string (if defined) is output after.
  512.      The reason for having three separate initialization strings is to
  513.      make it easier to define a group of related terminal types with
  514.      slightly different initializations.  Define two or three of the
  515.      strings in the basic type; then the other types can override one
  516.      or two of the strings.
  517.      String of commands to reset the terminal from any strange mode it
  518.      may be in.  Normally this includes the `is' string (or other
  519.      commands with the same effects) and more.  What would go in the
  520.      `rs' string but not in the `is' string are annoying or slow
  521.      commands to bring the terminal back from strange modes that
  522.      nobody would normally use.
  523.      Numeric value, the initial spacing between hardware tab stop
  524.      columns when the terminal is powered up.  Programs to initialize
  525.      the terminal can use this to decide whether there is a need to
  526.      set the tab stops.  If the initial width is 8, well and good; if
  527.      it is not 8, then the tab stops should be set; if they cannot be
  528.      set, the kernel is told to convert tabs to spaces, and other
  529.      programs will observe this and do likewise.
  530.      String of commands to clear all tab stops.
  531.      String of commands to set tab stop at current cursor column on all
  532.      lines.
  533. File: termcap.info,  Node: Pad Specs,  Next: Status Line,  Prev: Initialization,  Up: Capabilities
  534. Padding Capabilities
  535. ====================
  536.    There are two terminal capabilities that exist just to explain the
  537. proper way to obey the padding specifications in all the command string
  538. capabilities.  One, `pc', must be obeyed by all termcap-using programs.
  539.      Numeric value, the lowest baud rate at which padding is actually
  540.      needed.  Programs may check this and refrain from doing any
  541.      padding at lower speeds.
  542.      String of commands for padding.  The first character of this
  543.      string is to be used as the pad character, instead of using null
  544.      characters for padding.  If `pc' is not provided, use null
  545.      characters.  Every program that uses termcap must look up this
  546.      capability and use it to set the variable `PC' that is used by
  547.      `tputs'.  *Note Padding::.
  548.    Some termcap capabilities exist just to specify the amount of
  549. padding that the kernel should give to cursor motion commands used in
  550. ordinary sequential output.
  551.      Numeric value, the number of msec of padding needed for the
  552.      carriage-return character.
  553.      Numeric value, the number of msec of padding needed for the
  554.      newline (linefeed) character.
  555.      Numeric value, the number of msec of padding needed for the
  556.      backspace character.
  557.      Numeric value, the number of msec of padding needed for the
  558.      formfeed character.
  559.      Numeric value, the number of msec of padding needed for the tab
  560.      character.
  561.    In some systems, the kernel uses the above capabilities; in other
  562. systems, the kernel uses the paddings specified in the string
  563. capabilities `cr', `sf', `le', `ff' and `ta'.  Descriptions of
  564. terminals which require such padding should contain the `dC' ...  `dT'
  565. capabilities and also specify the appropriate padding in the
  566. corresponding string capabilities.  Since no modern terminals require
  567. padding for ordinary sequential output, you probably won't need to do
  568. either of these things.
  569. File: termcap.info,  Node: Status Line,  Next: Half-Line,  Prev: Pad Specs,  Up: Capabilities
  570. Status Line
  571. ===========
  572.    A "status line" is a line on the terminal that is not used for
  573. ordinary display output but instead used for a special message.  The
  574. intended use is for a continuously updated description of what the
  575. user's program is doing, and that is where the name "status line"
  576. comes from, but in fact it could be used for anything.  The
  577. distinguishing characteristic of a status line is that ordinary output
  578. to the terminal does not affect it; it changes only if the special
  579. status line commands of this section are used.
  580.      Flag whose presence means that the terminal has a status line. 
  581.      If a terminal description specifies that there is a status line,
  582.      it must provide the `ts' and `fs' capabilities.
  583.      String of commands to move the terminal cursor into the status
  584.      line.  Usually these commands must specifically record the old
  585.      cursor position for the sake of the `fs' string.
  586.      String of commands to move the cursor back from the status line
  587.      to its previous position (outside the status line).
  588.      Flag whose presence means that other display commands work while
  589.      writing the status line.  In other words, one can clear parts of
  590.      it, insert or delete characters, move the cursor within it using
  591.      `ch' if there is a `ch' capability, enter and leave standout
  592.      mode, and so on.
  593.      String of commands to disable the display of the status line. 
  594.      This may be absent, if there is no way to disable the status line
  595.      display.
  596.      Numeric value, the width of the status line.  If this capability
  597.      is absent in a terminal that has a status line, it means the
  598.      status line is the same width as the other lines.
  599.      Note that the value of `ws' is sometimes as small as 8.
  600. File: termcap.info,  Node: Half-Line,  Next: Printer,  Prev: Status Line,  Up: Capabilities
  601. Half-Line Motion
  602. ================
  603.    Some terminals have commands for moving the cursor vertically by
  604. half-lines, useful for outputting subscripts and superscripts.  Mostly
  605. it is hardcopy terminals that have such features.
  606.      String of commands to move the cursor up half a line.  If the
  607.      terminal is a display, it is your responsibility to avoid moving
  608.      up past the top line; however, most likely the terminal that
  609.      supports this is a hardcopy terminal and there is nothing to be
  610.      concerned about.
  611.      String of commands to move the cursor down half a line.  If the
  612.      terminal is a display, it is your responsibility to avoid moving
  613.      down past the bottom line, etc.
  614. File: termcap.info,  Node: Printer,  Prev: Half-Line,  Up: Capabilities
  615. Controlling Printers Attached to Terminals
  616. ==========================================
  617.    Some terminals have attached hardcopy printer ports.  They may be
  618. able to copy the screen contents to the printer; they may also be able
  619. to redirect output to the printer.  Termcap does not have anything to
  620. tell the program whether the redirected output appears also on the
  621. screen; it does on some terminals but not all.
  622.      String of commands to cause the contents of the screen to be
  623.      printed.  If it is absent, the screen contents cannot be printed.
  624.      String of commands to redirect further output to the printer.
  625.      String of commands to terminate redirection of output to the
  626.      printer.  This capability must be present in the description if
  627.      `po' is.
  628.      String of commands to redirect output to the printer for next N
  629.      characters of output, regardless of what they are.  Redirection
  630.      will end automatically after N characters of further output. 
  631.      Until then, nothing that is output can end redirection, not even
  632.      the `pf' string if there is one.  The number N should not be more
  633.      than 255.
  634.      One use of this capability is to send non-text byte sequences
  635.      (such as bit-maps) to the printer.
  636.    Most terminals with printers do not support all of `ps', `po' and
  637. `pO'; any one or two of them may be supported.  To make a program that
  638. can send output to all kinds of printers, it is necessary to check for
  639. all three of these capabilities, choose the most convenient of the
  640. ones that are provided, and use it in its own appropriate fashion.
  641. File: termcap.info,  Node: Summary,  Next: Var Index,  Prev: Capabilities,  Up: Top
  642. Summary of Capability Names
  643. ***************************
  644.    Here are all the terminal capability names in alphabetical order
  645. with a brief description of each.  For cross references to their
  646. definitions, see the index of capability names (*note Cap Index::.).
  647.      String to turn off alternate character set mode.
  648.      String to insert a blank line before the cursor.
  649.      String to insert N blank lines before the cursor.
  650.      Flag: output to last column wraps cursor to next line.
  651.      String to turn on alternate character set mode.like.
  652.      Very obsolete alternative name for the `le' capability.
  653.      String to sound the bell.
  654.      Obsolete flag: ASCII backspace may be used for leftward motion.
  655.      String to move the cursor left to the previous hardware tab stop
  656.      column.
  657.      Flag: `le' at left margin wraps to end of previous line.
  658.      String to change terminal's command character.
  659.      String to clear the line the cursor is on, and following lines.
  660.      String to clear from the cursor to the end of the line.
  661.      String to position the cursor at column C in the same line.
  662.      String to clear the entire screen and put cursor at upper left
  663.      corner.
  664.      String to position the cursor at line L, column C.
  665.      String to position the cursor at line L, column C, relative to
  666.      display memory.
  667.      Number: width of the screen.
  668.      String to move cursor sideways to left margin.
  669.      String to set the scroll region.
  670.      Alternate form of string to set the scroll region.
  671.      String to clear all tab stops.
  672.      String to position the cursor at line L in the same column.
  673.      Flag: data scrolled off top of screen may be scrolled back.
  674.      Flag: data scrolled off bottom of screen may be scrolled back.
  675.      Obsolete number: msec of padding needed for the backspace
  676.      character.
  677.      String to delete one character position at the cursor.
  678.      Obsolete number: msec of padding needed for the carriage-return
  679.      character.
  680.      String to delete N characters starting at the cursor.
  681.      Obsolete number: msec of padding needed for the formfeed
  682.      character.
  683.      String to delete the line the cursor is on.
  684.      String to delete N lines starting with the cursor's line.
  685.      String to enter delete mode.
  686.      Obsolete number: msec of padding needed for the newline character.
  687.      String to move the cursor vertically down one line.
  688.      String to move cursor vertically down N lines.
  689.      String to disable the display of the status line.
  690.      Obsolete number: msec of padding needed for the tab character.
  691.      String of commands to clear N characters at cursor.
  692.      String to exit delete mode.
  693.      String to leave insert mode.
  694.      Flag: output of a space can erase an overstrike.
  695.      Flag: other display commands work while writing the status line.
  696.      String to advance to the next page, for a hardcopy terminal.
  697.      String to move the cursor back from the status line to its
  698.      previous position (outside the status line).
  699.      Flag: this terminal type is generic, not real.
  700.      Flag: hardcopy terminal.
  701.      String to move the cursor down half a line.
  702.      String to position cursor at upper left corner.
  703.      Flag: the terminal has a status line.
  704.      String to move the cursor up half a line.
  705.      Flag: terminal cannot accept `~' as output.
  706.      String to initialize the terminal for each login session.
  707.      String to initialize the terminal for each login session.
  708.      String to insert one character position at the cursor.
  709.      String to insert N character positions at the cursor.
  710.      String naming a file of commands to initialize the terminal.
  711.      String to enter insert mode.
  712.      Flag: outputting a space is different from moving over empty
  713.      positions.
  714.      String to output following an inserted character in insert mode.
  715.      String to initialize the terminal for each login session.
  716.      Number: initial spacing between hardware tab stop columns.
  717.      String of input sent by function key 0 or 10.
  718. `k1 ... k9'
  719.      Strings of input sent by function keys 1 through 9.
  720. `K1 ... K5'
  721.      Strings sent by the five other keys in 3-by-3 array with arrows.
  722.      String of input sent by the "clear all tabs" key.
  723.      String of input sent by the "insert line" key.
  724.      String of input sent by the "backspace" key.
  725.      String of input sent by the "clear screen" key.
  726.      String of input sent by typing the down-arrow key.
  727.      String of input sent by the "delete character" key.
  728.      String to make the function keys work locally.
  729.      String of input sent by the "clear to end of line" key.
  730.      String of input sent by the "scroll forward" key.
  731.      String of input sent by typing the "home-position" key.
  732.      String of input sent by the "home down" key.
  733.      String of input sent by the "insert character" or "enter insert
  734.      mode" key.
  735.      String of input sent by typing the left-arrow key.
  736.      String of input sent by the "delete line" key.
  737.      Flag: the terminal has a Meta key.
  738.      String of input sent by the "exit insert mode" key.
  739.      Numeric value, the number of numbered function keys.
  740.      String of input sent by the "next page" key.
  741.      Very obsolete string listing the terminal's named function keys.
  742.      String of input sent by the "previous page" key.
  743.      String of input sent by typing the right-arrow key.
  744.      String of input sent by the "scroll reverse" key.
  745.      String to make the function keys transmit.
  746.      String of input sent by the "clear to end of screen" key.
  747.      String of input sent by the "clear tab stop this column" key.
  748.      String of input sent by the "set tab stop in this column" key.
  749.      String of input sent by typing the up-arrow key.
  750.      String on keyboard labelling function key 0 or 10.
  751. `l1 ... l9'
  752.      Strings on keyboard labelling function keys 1 through 9.
  753.      String to move the cursor left one column.
  754.      String to move cursor left N columns.
  755.      Number: height of the screen.
  756.      String to position cursor at lower left corner.
  757.      Number: lines of display memory.
  758.      String to enter blinking mode.
  759.      String to enter double-bright mode.
  760.      String to turn off all appearance modes
  761.      String to enter half-bright mode.
  762.      Flag: cursor motion in insert mode is safe.
  763.      String to enter invisible mode.
  764.      String to enable the functioning of the Meta key.
  765.      String to disable the functioning of the Meta key.
  766.      String to enter protected mode.
  767.      String to enter reverse-video mode.
  768.      Flag: cursor motion in standout mode is safe.
  769.      Obsolete flag: do not use ASCII carriage-return on this terminal.
  770.      String to move the cursor right one column.
  771.      Obsolete alternative name for the `do' and `sf' capabilities.
  772.      Flag: the terminal does not normally scroll for sequential output.
  773.      String to move to start of next line, possibly clearing rest of
  774.      old line.
  775.      Flag: terminal can overstrike.
  776.      Number: the lowest baud rate at which padding is actually needed.
  777.      String containing character for padding.
  778.      String to terminate redirection of output to the printer.
  779.      String to redirect further output to the printer.
  780.      String to redirect N characters ofoutput to the printer.
  781.      String to print the screen on the attached printer.
  782.      String to move to last saved cursor position.
  783.      String to move cursor right N columns.
  784.      String to output character C repeated N times.
  785.      String to reset the terminal from any strange modes.
  786.      String to turn on an arbitrary combination of appearance modes.
  787.      String to save the current cursor position.
  788.      String to leave standout mode.
  789.      String to scroll the screen one line up.
  790.      String to scroll the screen N lines up.
  791.      Number: width of magic standout cookie.  Absent if magic cookies
  792.      are not used.
  793.      String to enter standout mode.
  794.      String to scroll the screen one line down.
  795.      String to scroll the screen N line down.
  796.      String to set tab stop at current cursor column on all lines. 
  797.      programs.
  798.      String to move the cursor right to the next hardware tab stop
  799.      column.
  800.      String to return terminal to settings for sequential output.
  801.      String to initialize terminal for random cursor motion.
  802.      String to move the terminal cursor into the status line.
  803.      String to underline one character and move cursor right.
  804.      String to turn off underline mode
  805.      Number: width of underlining magic cookie.  Absent if underlining
  806.      doesn't use magic cookies.
  807.      Flag: underline by overstriking with an underscore.
  808.      String to move the cursor vertically up one line.
  809.      String to move cursor vertically up N lines.
  810.      String to turn on underline mode
  811.      String to make the screen flash.
  812.      String to return the cursor to normal.
  813.      String to make the cursor invisible.
  814.      String to enhance the cursor.
  815.      String to set the terminal output screen window.
  816.      Number: the width of the status line.
  817.      Flag: superbee terminal.
  818.      Flag: cursor wraps in a strange way.
  819.      Flag: clearing a line is the only way to clear the appearance
  820.      modes of positions in that line (or, only way to remove magic
  821.      cookies on that line).
  822.      Flag: Teleray 1061; several strange characteristics.
  823. File: termcap.info,  Node: Var Index,  Next: Cap Index,  Prev: Summary,  Up: Top
  824. Variable and Function Index
  825. ***************************
  826. * Menu:
  827. * BC:                                   tgoto.
  828. * PC:                                   Output Padding.
  829. * UP:                                   tgoto.
  830. * ospeed:                               Output Padding.
  831. * tgetent:                              Find.
  832. * tgetflag:                             Interrogate.
  833. * tgetnum:                              Interrogate.
  834. * tgetstr:                              Interrogate.
  835. * tgoto:                                tgoto.
  836. * tparam:                               tparam.
  837. * tputs:                                Output Padding.
  838.