home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / termcap-1.3-bin.lha / info / termcap.info-3 (.txt) < prev    next >
GNU Info File  |  1996-10-12  |  49KB  |  836 lines

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