]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/terminfo.5.html
ncurses 6.4 - patch 20240113
[ncurses.git] / doc / html / man / terminfo.5.html
1 <!--
2   * t
3   * DO NOT EDIT THIS FILE BY HAND!
4   * It is generated from terminfo.head,  ./../include/Caps ./../include/Caps-ncurses, and terminfo.tail.
5   * Note: this must be run through tbl before nroff.
6   * The magic cookie on the first line triggers this under some man programs.
7   ****************************************************************************
8   * Copyright 2018-2023,2024 Thomas E. Dickey                                *
9   * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
10   *                                                                          *
11   * Permission is hereby granted, free of charge, to any person obtaining a  *
12   * copy of this software and associated documentation files (the            *
13   * "Software"), to deal in the Software without restriction, including      *
14   * without limitation the rights to use, copy, modify, merge, publish,      *
15   * distribute, distribute with modifications, sublicense, and/or sell       *
16   * copies of the Software, and to permit persons to whom the Software is    *
17   * furnished to do so, subject to the following conditions:                 *
18   *                                                                          *
19   * The above copyright notice and this permission notice shall be included  *
20   * in all copies or substantial portions of the Software.                   *
21   *                                                                          *
22   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
23   * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
24   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
25   * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
26   * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
27   * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
28   * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
29   *                                                                          *
30   * Except as contained in this notice, the name(s) of the above copyright   *
31   * holders shall not be used in advertising or otherwise to promote the     *
32   * sale, use or other dealings in this Software without prior written       *
33   * authorization.                                                           *
34   ****************************************************************************
35   * @Id: terminfo.head,v 1.63 2024/01/13 23:07:27 tom Exp @
36 -->
37 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
38 <HTML>
39 <HEAD>
40 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
41 <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
42 <TITLE>terminfo 5 2024-01-13 ncurses 6.4 File formats</TITLE>
43 <link rel="author" href="mailto:bug-ncurses@gnu.org">
44
45 </HEAD>
46 <BODY>
47 <H1 class="no-header">terminfo 5 2024-01-13 ncurses 6.4 File formats</H1>
48 <PRE>
49 <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>                      File formats                      <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
50
51
52
53
54 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
55        <STRONG>terminfo</STRONG> - terminal capability database
56
57
58 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
59        /usr/share/terminfo/*/*
60
61
62 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
63        <EM>Terminfo</EM>  is  a  database describing terminals, used by screen-oriented
64        programs  such  as  <STRONG>nvi(1)</STRONG>,  <STRONG>lynx(1)</STRONG>,   <STRONG>mutt(1)</STRONG>,   and   other   curses
65        applications,  using  high-level calls to libraries such as <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>.
66        It is also used via low-level calls by  non-curses  applications  which
67        may  be  screen-oriented  (such  as  <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>)  or  non-screen (such as
68        <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>).
69
70        <EM>Terminfo</EM> describes terminals by giving a set of capabilities which they
71        have, by specifying how to perform screen operations, and by specifying
72        padding requirements and initialization sequences.
73
74        This manual describes <EM>ncurses</EM> version 6.4 (patch 20240113).
75
76
77 </PRE><H3><a name="h3-terminfo-Entry-Syntax"><EM>terminfo</EM> Entry Syntax</a></H3><PRE>
78        Entries in <EM>terminfo</EM> consist of a sequence of fields:
79
80        <STRONG>o</STRONG>   Each field ends with a comma "," (embedded commas  may  be  escaped
81            with a backslash or written as "\054").
82
83        <STRONG>o</STRONG>   White space between fields is ignored.
84
85        <STRONG>o</STRONG>   The first field in a <EM>terminfo</EM> entry begins in the first column.
86
87        <STRONG>o</STRONG>   Newlines  and  leading  whitespace (spaces or tabs) may be used for
88            formatting entries for readability.  These are removed from  parsed
89            entries.
90
91            The  <STRONG>infocmp</STRONG>  <STRONG>-f</STRONG> and <STRONG>-W</STRONG> options rely on this to format if-then-else
92            expressions, or  to  enforce  maximum  line-width.   The  resulting
93            formatted terminal description can be read by <STRONG>tic</STRONG>.
94
95        <STRONG>o</STRONG>   The  first  field for each terminal gives the names which are known
96            for the terminal, separated by "|" characters.
97
98            The first name given  is  the  most  common  abbreviation  for  the
99            terminal  (its  primary name), the last name given should be a long
100            name fully identifying the terminal  (see  <STRONG><A HREF="curs_termattrs.3x.html">longname(3x)</A></STRONG>),  and  all
101            others  are  treated as synonyms (aliases) for the primary terminal
102            name.
103
104            X/Open Curses advises that all names but  the  last  should  be  in
105            lower  case  and  contain no blanks; the last name may well contain
106            upper case and blanks for readability.
107
108            This implementation is not so strict; it allows mixed case  in  the
109            primary name and aliases.  If the last name has no embedded blanks,
110            it allows that to be both an alias and a  verbose  name  (but  will
111            warn about this ambiguity).
112
113        <STRONG>o</STRONG>   Lines  beginning  with  a  "#"  in  the first column are treated as
114            comments.
115
116            While comment lines are valid at any point, the output of <STRONG>captoinfo</STRONG>
117            and  <STRONG>infotocap</STRONG>  (aliases  for <STRONG>tic</STRONG>) will move comments so they occur
118            only between entries.
119
120        Terminal names (except for the last, verbose entry)  should  be  chosen
121        using  the  following  conventions.   The  particular piece of hardware
122        making up the terminal should have a root name,  thus  "hp2621".   This
123        name should not contain hyphens.  Modes that the hardware can be in, or
124        user preferences, should be indicated by appending a hyphen and a  mode
125        suffix.   Thus,  a  vt100  in  132-column  mode  would be vt100-w.  The
126        following suffixes should be used where possible:
127
128        <STRONG>Suffix</STRONG>   <STRONG>Example</STRONG>     <STRONG>Meaning</STRONG>
129        ------------------------------------------------------------------------
130        -<EM>nn</EM>      aaa-60      Number of lines on the screen
131        -<EM>n</EM>p      c100-4p     Number of pages of memory
132        -am      vt100-am    With automargins (usually the default)
133        -m       ansi-m      Mono mode; suppress color
134        -mc      wy30-mc     Magic cookie; spaces when highlighting
135        -na      c100-na     No arrow keys (leave them in local)
136        -nam     vt100-nam   Without automatic margins
137        -nl      hp2621-nl   No status line
138        -ns      hp2626-ns   No status line
139        -rv      c100-rv     Reverse video
140        -s       vt100-s     Enable status line
141        -vb      wy370-vb    Use visible bell instead of beep
142        -w       vt100-w     Wide mode (&gt; 80 columns, usually 132)
143
144        For more on terminal naming conventions, see the <STRONG><A HREF="term.7.html">term(7)</A></STRONG> manual page.
145
146
147 </PRE><H3><a name="h3-terminfo-Capabilities-Syntax"><EM>terminfo</EM> Capabilities Syntax</a></H3><PRE>
148        The terminfo entry consists of  several  <EM>capabilities</EM>,  i.e.,  features
149        that  the  terminal  has,  or  methods  for  exercising  the terminal's
150        features.
151
152        After the first field (giving the name(s) of the terminal entry), there
153        should be one or more <EM>capability</EM> fields.  These are Boolean, numeric or
154        string names with corresponding values:
155
156        <STRONG>o</STRONG>   Boolean capabilities are true  when  present,  false  when  absent.
157            There is no explicit value for Boolean capabilities.
158
159        <STRONG>o</STRONG>   Numeric  capabilities  have  a  "#"  following  the  name,  then an
160            unsigned decimal integer value.
161
162        <STRONG>o</STRONG>   String capabilities have a "=" following the name, then  an  string
163            of characters making up the capability value.
164
165            String  capabilities  can be split into multiple lines, just as the
166            fields comprising a terminal  entry  can  be  split  into  multiple
167            lines.   While  blanks  between fields are ignored, blanks embedded
168            within a string value are retained, except for leading blanks on  a
169            line.
170
171        Any  capability  can  be  <EM>canceled</EM>,  i.e., suppressed from the terminal
172        entry, by following its name with "@" rather than a capability value.
173
174
175 </PRE><H3><a name="h3-Similar-Terminals">Similar Terminals</a></H3><PRE>
176        If there are two very similar  terminals,  one  (the  variant)  can  be
177        defined   as  being  just  like  the  other  (the  base)  with  certain
178        exceptions.  In the definition of the variant,  the  string  capability
179        <STRONG>use</STRONG> can be given with the name of the base terminal:
180
181        <STRONG>o</STRONG>   The  capabilities  given before <STRONG>use</STRONG> override those in the base type
182            named by <STRONG>use</STRONG>.
183
184        <STRONG>o</STRONG>   If there are multiple <STRONG>use</STRONG> capabilities, they are merged in  reverse
185            order.   That  is,  the rightmost <STRONG>use</STRONG> reference is processed first,
186            then the one to its left, and so forth.
187
188        <STRONG>o</STRONG>   Capabilities given explicitly in the entry override  those  brought
189            in by <STRONG>use</STRONG> references.
190
191        A  capability  can  be  canceled  by placing <STRONG>xx@</STRONG> to the left of the use
192        reference that imports it, where <EM>xx</EM> is the  capability.   For  example,
193        the entry
194
195               2621-nl, smkx@, rmkx@, use=2621,
196
197        defines a 2621-nl that does not have the <STRONG>smkx</STRONG> or <STRONG>rmkx</STRONG> capabilities, and
198        hence does not turn on the function key labels  when  in  visual  mode.
199        This  is  useful  for  different modes for a terminal, or for different
200        user preferences.
201
202        An entry included via <STRONG>use</STRONG> can contain canceled capabilities, which have
203        the  same  effect as if those cancels were inline in the using terminal
204        entry.
205
206
207 </PRE><H3><a name="h3-Predefined-Capabilities">Predefined Capabilities</a></H3><PRE>
208        The following is a complete table of the  capabilities  included  in  a
209        terminfo  description  block  and available to terminfo-using code.  In
210        each line of the table,
211
212        <STRONG>o</STRONG>   The <STRONG>variable</STRONG> is the name by which the programmer (at  the  terminfo
213            level) accesses the capability.
214
215        <STRONG>o</STRONG>   The  <STRONG>capname</STRONG>  (<EM>Cap-name</EM>)  is the short name used in the text of the
216            database, and is used by a person updating the database.
217
218            Whenever possible, capnames are chosen to be the same as or similar
219            to  the  ANSI X3.64-1979 standard (now superseded by ECMA-48, which
220            uses identical or very similar names).  Semantics are also intended
221            to match those of the specification.
222
223            Capability  names  have no hard length limit, but an informal limit
224            of 5 characters has been adopted to keep them short  and  to  allow
225            the tabs in the source file <STRONG>Caps</STRONG> to line up nicely.
226
227        <STRONG>o</STRONG>   The   <STRONG>termcap</STRONG>   (<EM>Tcap</EM>)  code  is  the  old  capability  name  (some
228            capabilities  are  new,  and  have  names  which  termcap  did  not
229            originate).
230
231        <STRONG>o</STRONG>   Finally,  the <STRONG>description</STRONG> field attempts to convey the semantics of
232            the capability.
233
234        You may find some codes in the description field:
235
236        (P)    indicates that padding may be specified
237
238        #[1-9] in the description field indicates that  the  string  is  passed
239               through <STRONG><A HREF="curs_terminfo.3x.html">tparm(3x)</A></STRONG> with parameters as given (#<EM>i</EM>).
240
241               If  no  parameters  are  listed  in the description, passing the
242               string through <STRONG><A HREF="curs_terminfo.3x.html">tparm(3x)</A></STRONG> may give unexpected results,  e.g.,  if
243               it contains percent (%%) signs.
244
245        (P*)   indicates  that  padding may vary in proportion to the number of
246               lines affected
247
248        (#<EM>i</EM>)   indicates the <EM>i</EM>th parameter.
249
250                                      <STRONG>Code</STRONG>
251        <STRONG>Boolean</STRONG> <STRONG>Capability</STRONG> <STRONG>Name</STRONG>    <STRONG>TI</STRONG>      <STRONG>TC</STRONG>   <STRONG>Description</STRONG>
252        ------------------------------------------------------------------------
253
254        <STRONG>auto_left_margin</STRONG>           <STRONG>bw</STRONG>      <STRONG>bw</STRONG>   cub1 wraps from column 0 to
255                                                last column
256        <STRONG>auto_right_margin</STRONG>          <STRONG>am</STRONG>      <STRONG>am</STRONG>   terminal has automatic margins
257        <STRONG>no_esc_ctlc</STRONG>                <STRONG>xsb</STRONG>     <STRONG>xb</STRONG>   beehive (f1=escape, f2=ctrl C)
258        <STRONG>ceol_standout_glitch</STRONG>       <STRONG>xhp</STRONG>     <STRONG>xs</STRONG>   standout not erased by
259                                                overwriting (hp)
260        <STRONG>eat_newline_glitch</STRONG>         <STRONG>xenl</STRONG>    <STRONG>xn</STRONG>   newline ignored after 80 cols
261                                                (concept)
262        <STRONG>erase_overstrike</STRONG>           <STRONG>eo</STRONG>      <STRONG>eo</STRONG>   can erase overstrikes with a
263                                                blank
264        <STRONG>generic_type</STRONG>               <STRONG>gn</STRONG>      <STRONG>gn</STRONG>   generic line type
265        <STRONG>hard_copy</STRONG>                  <STRONG>hc</STRONG>      <STRONG>hc</STRONG>   hardcopy terminal
266        <STRONG>has_meta_key</STRONG>               <STRONG>km</STRONG>      <STRONG>km</STRONG>   Has a meta key (i.e., sets 8th-
267                                                bit)
268        <STRONG>has_status_line</STRONG>            <STRONG>hs</STRONG>      <STRONG>hs</STRONG>   has extra status line
269        <STRONG>insert_null_glitch</STRONG>         <STRONG>in</STRONG>      <STRONG>in</STRONG>   insert mode distinguishes nulls
270        <STRONG>memory_above</STRONG>               <STRONG>da</STRONG>      <STRONG>da</STRONG>   display may be retained above
271                                                the screen
272        <STRONG>memory_below</STRONG>               <STRONG>db</STRONG>      <STRONG>db</STRONG>   display may be retained below
273                                                the screen
274        <STRONG>move_insert_mode</STRONG>           <STRONG>mir</STRONG>     <STRONG>mi</STRONG>   safe to move while in insert
275                                                mode
276        <STRONG>move_standout_mode</STRONG>         <STRONG>msgr</STRONG>    <STRONG>ms</STRONG>   safe to move while in standout
277                                                mode
278        <STRONG>over_strike</STRONG>                <STRONG>os</STRONG>      <STRONG>os</STRONG>   terminal can overstrike
279        <STRONG>status_line_esc_ok</STRONG>         <STRONG>eslok</STRONG>   <STRONG>es</STRONG>   escape can be used on the
280                                                status line
281        <STRONG>dest_tabs_magic_smso</STRONG>       <STRONG>xt</STRONG>      <STRONG>xt</STRONG>   tabs destructive, magic so char
282                                                (t1061)
283        <STRONG>tilde_glitch</STRONG>               <STRONG>hz</STRONG>      <STRONG>hz</STRONG>   cannot print ~'s (Hazeltine)
284        <STRONG>transparent_underline</STRONG>      <STRONG>ul</STRONG>      <STRONG>ul</STRONG>   underline character overstrikes
285        <STRONG>xon_xoff</STRONG>                   <STRONG>xon</STRONG>     <STRONG>xo</STRONG>   terminal uses xon/xoff
286                                                handshaking
287        <STRONG>needs_xon_xoff</STRONG>             <STRONG>nxon</STRONG>    <STRONG>nx</STRONG>   padding will not work, xon/xoff
288                                                required
289        <STRONG>prtr_silent</STRONG>                <STRONG>mc5i</STRONG>    <STRONG>5i</STRONG>   printer will not echo on screen
290        <STRONG>hard_cursor</STRONG>                <STRONG>chts</STRONG>    <STRONG>HC</STRONG>   cursor is hard to see
291        <STRONG>non_rev_rmcup</STRONG>              <STRONG>nrrmc</STRONG>   <STRONG>NR</STRONG>   smcup does not reverse rmcup
292        <STRONG>no_pad_char</STRONG>                <STRONG>npc</STRONG>     <STRONG>NP</STRONG>   pad character does not exist
293        <STRONG>non_dest_scroll_region</STRONG>     <STRONG>ndscr</STRONG>   <STRONG>ND</STRONG>   scrolling region is non-
294                                                destructive
295        <STRONG>can_change</STRONG>                 <STRONG>ccc</STRONG>     <STRONG>cc</STRONG>   terminal can re-define existing
296                                                colors
297        <STRONG>back_color_erase</STRONG>           <STRONG>bce</STRONG>     <STRONG>ut</STRONG>   screen erased with background
298                                                color
299        <STRONG>hue_lightness_saturation</STRONG>   <STRONG>hls</STRONG>     <STRONG>hl</STRONG>   terminal uses only HLS color
300                                                notation (Tektronix)
301        <STRONG>col_addr_glitch</STRONG>            <STRONG>xhpa</STRONG>    <STRONG>YA</STRONG>   only positive motion for
302                                                hpa/mhpa caps
303        <STRONG>cr_cancels_micro_mode</STRONG>      <STRONG>crxm</STRONG>    <STRONG>YB</STRONG>   using cr turns off micro mode
304        <STRONG>has_print_wheel</STRONG>            <STRONG>daisy</STRONG>   <STRONG>YC</STRONG>   printer needs operator to
305                                                change character set
306        <STRONG>row_addr_glitch</STRONG>            <STRONG>xvpa</STRONG>    <STRONG>YD</STRONG>   only positive motion for
307                                                vpa/mvpa caps
308        <STRONG>semi_auto_right_margin</STRONG>     <STRONG>sam</STRONG>     <STRONG>YE</STRONG>   printing in last column causes
309                                                cr
310        <STRONG>cpi_changes_res</STRONG>            <STRONG>cpix</STRONG>    <STRONG>YF</STRONG>   changing character pitch
311                                                changes resolution
312        <STRONG>lpi_changes_res</STRONG>            <STRONG>lpix</STRONG>    <STRONG>YG</STRONG>   changing line pitch changes
313                                                resolution
314
315                                     <STRONG>Code</STRONG>
316        <STRONG>Numeric</STRONG> <STRONG>Capability</STRONG> <STRONG>Name</STRONG>   <STRONG>TI</STRONG>       <STRONG>TC</STRONG>   <STRONG>Description</STRONG>
317        ------------------------------------------------------------------------
318        <STRONG>columns</STRONG>                   <STRONG>cols</STRONG>     <STRONG>co</STRONG>   number of columns in a line
319
320        <STRONG>init_tabs</STRONG>                 <STRONG>it</STRONG>       <STRONG>it</STRONG>   tabs initially every # spaces
321        <STRONG>lines</STRONG>                     <STRONG>lines</STRONG>    <STRONG>li</STRONG>   number of lines on screen or
322                                                page
323        <STRONG>lines_of_memory</STRONG>           <STRONG>lm</STRONG>       <STRONG>lm</STRONG>   lines of memory if &gt; line. 0
324                                                means varies
325        <STRONG>magic_cookie_glitch</STRONG>       <STRONG>xmc</STRONG>      <STRONG>sg</STRONG>   number of blank characters left
326                                                by smso or rmso
327        <STRONG>padding_baud_rate</STRONG>         <STRONG>pb</STRONG>       <STRONG>pb</STRONG>   lowest baud rate where padding
328                                                needed
329        <STRONG>virtual_terminal</STRONG>          <STRONG>vt</STRONG>       <STRONG>vt</STRONG>   virtual terminal number
330                                                (CB/unix)
331        <STRONG>width_status_line</STRONG>         <STRONG>wsl</STRONG>      <STRONG>ws</STRONG>   number of columns in status
332                                                line
333        <STRONG>num_labels</STRONG>                <STRONG>nlab</STRONG>     <STRONG>Nl</STRONG>   number of labels on screen
334        <STRONG>label_height</STRONG>              <STRONG>lh</STRONG>       <STRONG>lh</STRONG>   rows in each label
335        <STRONG>label_width</STRONG>               <STRONG>lw</STRONG>       <STRONG>lw</STRONG>   columns in each label
336        <STRONG>max_attributes</STRONG>            <STRONG>ma</STRONG>       <STRONG>ma</STRONG>   maximum combined attributes
337                                                terminal can handle
338        <STRONG>maximum_windows</STRONG>           <STRONG>wnum</STRONG>     <STRONG>MW</STRONG>   maximum number of definable
339                                                windows
340        <STRONG>max_colors</STRONG>                <STRONG>colors</STRONG>   <STRONG>Co</STRONG>   maximum number of colors on
341                                                screen
342        <STRONG>max_pairs</STRONG>                 <STRONG>pairs</STRONG>    <STRONG>pa</STRONG>   maximum number of color-pairs
343                                                on the screen
344        <STRONG>no_color_video</STRONG>            <STRONG>ncv</STRONG>      <STRONG>NC</STRONG>   video attributes that cannot be
345                                                used with colors
346
347        The following numeric capabilities  are  present  in  the  SVr4.0  term
348        structure,  but  are  not yet documented in the man page.  They came in
349        with SVr4's printer support.
350
351                                     <STRONG>Code</STRONG>
352        <STRONG>Numeric</STRONG> <STRONG>Capability</STRONG> <STRONG>Name</STRONG>   <STRONG>TI</STRONG>       <STRONG>TC</STRONG>   <STRONG>Description</STRONG>
353        ------------------------------------------------------------------------
354        <STRONG>buffer_capacity</STRONG>           <STRONG>bufsz</STRONG>    <STRONG>Ya</STRONG>   numbers of bytes buffered
355                                                before printing
356        <STRONG>dot_vert_spacing</STRONG>          <STRONG>spinv</STRONG>    <STRONG>Yb</STRONG>   spacing of pins vertically in
357                                                pins per inch
358        <STRONG>dot_horz_spacing</STRONG>          <STRONG>spinh</STRONG>    <STRONG>Yc</STRONG>   spacing of dots horizontally in
359                                                dots per inch
360        <STRONG>max_micro_address</STRONG>         <STRONG>maddr</STRONG>    <STRONG>Yd</STRONG>   maximum value in
361                                                micro_..._address
362        <STRONG>max_micro_jump</STRONG>            <STRONG>mjump</STRONG>    <STRONG>Ye</STRONG>   maximum value in parm_..._micro
363        <STRONG>micro_col_size</STRONG>            <STRONG>mcs</STRONG>      <STRONG>Yf</STRONG>   character step size when in
364                                                micro mode
365        <STRONG>micro_line_size</STRONG>           <STRONG>mls</STRONG>      <STRONG>Yg</STRONG>   line step size when in micro
366                                                mode
367        <STRONG>number_of_pins</STRONG>            <STRONG>npins</STRONG>    <STRONG>Yh</STRONG>   numbers of pins in print-head
368        <STRONG>output_res_char</STRONG>           <STRONG>orc</STRONG>      <STRONG>Yi</STRONG>   horizontal resolution in units
369                                                per line
370        <STRONG>output_res_line</STRONG>           <STRONG>orl</STRONG>      <STRONG>Yj</STRONG>   vertical resolution in units
371                                                per line
372        <STRONG>output_res_horz_inch</STRONG>      <STRONG>orhi</STRONG>     <STRONG>Yk</STRONG>   horizontal resolution in units
373                                                per inch
374        <STRONG>output_res_vert_inch</STRONG>      <STRONG>orvi</STRONG>     <STRONG>Yl</STRONG>   vertical resolution in units
375                                                per inch
376        <STRONG>print_rate</STRONG>                <STRONG>cps</STRONG>      <STRONG>Ym</STRONG>   print rate in characters per
377                                                second
378        <STRONG>wide_char_size</STRONG>            <STRONG>widcs</STRONG>    <STRONG>Yn</STRONG>   character step size when in
379                                                double wide mode
380        <STRONG>buttons</STRONG>                   <STRONG>btns</STRONG>     <STRONG>BT</STRONG>   number of buttons on mouse
381        <STRONG>bit_image_entwining</STRONG>       <STRONG>bitwin</STRONG>   <STRONG>Yo</STRONG>   number of passes for each bit-
382                                                image row
383        <STRONG>bit_image_type</STRONG>            <STRONG>bitype</STRONG>   <STRONG>Yp</STRONG>   type of bit-image device
384
385                                       <STRONG>Code</STRONG>
386
387        <STRONG>String</STRONG> <STRONG>Capability</STRONG> <STRONG>Name</STRONG>      <STRONG>TI</STRONG>       <STRONG>TC</STRONG>   <STRONG>Description</STRONG>
388        ------------------------------------------------------------------------
389        <STRONG>back_tab</STRONG>                    <STRONG>cbt</STRONG>      <STRONG>bt</STRONG>   back tab (P)
390        <STRONG>bell</STRONG>                        <STRONG>bel</STRONG>      <STRONG>bl</STRONG>   audible signal (bell) (P)
391        <STRONG>carriage_return</STRONG>             <STRONG>cr</STRONG>       <STRONG>cr</STRONG>   carriage return (P*) (P*)
392        <STRONG>change_scroll_region</STRONG>        <STRONG>csr</STRONG>      <STRONG>cs</STRONG>   change region to line #1 to
393                                                  line #2 (P)
394        <STRONG>clear_all_tabs</STRONG>              <STRONG>tbc</STRONG>      <STRONG>ct</STRONG>   clear all tab stops (P)
395        <STRONG>clear_screen</STRONG>                <STRONG>clear</STRONG>    <STRONG>cl</STRONG>   clear screen and home cursor
396                                                  (P*)
397        <STRONG>clr_eol</STRONG>                     <STRONG>el</STRONG>       <STRONG>ce</STRONG>   clear to end of line (P)
398        <STRONG>clr_eos</STRONG>                     <STRONG>ed</STRONG>       <STRONG>cd</STRONG>   clear to end of screen (P*)
399        <STRONG>column_address</STRONG>              <STRONG>hpa</STRONG>      <STRONG>ch</STRONG>   horizontal position #1,
400                                                  absolute (P)
401        <STRONG>command_character</STRONG>           <STRONG>cmdch</STRONG>    <STRONG>CC</STRONG>   terminal settable cmd
402                                                  character in prototype !?
403        <STRONG>cursor_address</STRONG>              <STRONG>cup</STRONG>      <STRONG>cm</STRONG>   move to row #1 columns #2
404        <STRONG>cursor_down</STRONG>                 <STRONG>cud1</STRONG>     <STRONG>do</STRONG>   down one line
405        <STRONG>cursor_home</STRONG>                 <STRONG>home</STRONG>     <STRONG>ho</STRONG>   home cursor (if no cup)
406        <STRONG>cursor_invisible</STRONG>            <STRONG>civis</STRONG>    <STRONG>vi</STRONG>   make cursor invisible
407        <STRONG>cursor_left</STRONG>                 <STRONG>cub1</STRONG>     <STRONG>le</STRONG>   move left one space
408        <STRONG>cursor_mem_address</STRONG>          <STRONG>mrcup</STRONG>    <STRONG>CM</STRONG>   memory relative cursor
409                                                  addressing, move to row #1
410                                                  columns #2
411        <STRONG>cursor_normal</STRONG>               <STRONG>cnorm</STRONG>    <STRONG>ve</STRONG>   make cursor appear normal
412                                                  (undo civis/cvvis)
413        <STRONG>cursor_right</STRONG>                <STRONG>cuf1</STRONG>     <STRONG>nd</STRONG>   non-destructive space (move
414                                                  right one space)
415        <STRONG>cursor_to_ll</STRONG>                <STRONG>ll</STRONG>       <STRONG>ll</STRONG>   last line, first column (if
416                                                  no cup)
417        <STRONG>cursor_up</STRONG>                   <STRONG>cuu1</STRONG>     <STRONG>up</STRONG>   up one line
418        <STRONG>cursor_visible</STRONG>              <STRONG>cvvis</STRONG>    <STRONG>vs</STRONG>   make cursor very visible
419        <STRONG>delete_character</STRONG>            <STRONG>dch1</STRONG>     <STRONG>dc</STRONG>   delete character (P*)
420        <STRONG>delete_line</STRONG>                 <STRONG>dl1</STRONG>      <STRONG>dl</STRONG>   delete line (P*)
421        <STRONG>dis_status_line</STRONG>             <STRONG>dsl</STRONG>      <STRONG>ds</STRONG>   disable status line
422        <STRONG>down_half_line</STRONG>              <STRONG>hd</STRONG>       <STRONG>hd</STRONG>   half a line down
423        <STRONG>enter_alt_charset_mode</STRONG>      <STRONG>smacs</STRONG>    <STRONG>as</STRONG>   start alternate character set
424                                                  (P)
425        <STRONG>enter_blink_mode</STRONG>            <STRONG>blink</STRONG>    <STRONG>mb</STRONG>   turn on blinking
426        <STRONG>enter_bold_mode</STRONG>             <STRONG>bold</STRONG>     <STRONG>md</STRONG>   turn on bold (extra bright)
427                                                  mode
428        <STRONG>enter_ca_mode</STRONG>               <STRONG>smcup</STRONG>    <STRONG>ti</STRONG>   string to start programs
429                                                  using cup
430        <STRONG>enter_delete_mode</STRONG>           <STRONG>smdc</STRONG>     <STRONG>dm</STRONG>   enter delete mode
431        <STRONG>enter_dim_mode</STRONG>              <STRONG>dim</STRONG>      <STRONG>mh</STRONG>   turn on half-bright mode
432        <STRONG>enter_insert_mode</STRONG>           <STRONG>smir</STRONG>     <STRONG>im</STRONG>   enter insert mode
433        <STRONG>enter_secure_mode</STRONG>           <STRONG>invis</STRONG>    <STRONG>mk</STRONG>   turn on blank mode
434                                                  (characters invisible)
435        <STRONG>enter_protected_mode</STRONG>        <STRONG>prot</STRONG>     <STRONG>mp</STRONG>   turn on protected mode
436        <STRONG>enter_reverse_mode</STRONG>          <STRONG>rev</STRONG>      <STRONG>mr</STRONG>   turn on reverse video mode
437        <STRONG>enter_standout_mode</STRONG>         <STRONG>smso</STRONG>     <STRONG>so</STRONG>   begin standout mode
438        <STRONG>enter_underline_mode</STRONG>        <STRONG>smul</STRONG>     <STRONG>us</STRONG>   begin underline mode
439        <STRONG>erase_chars</STRONG>                 <STRONG>ech</STRONG>      <STRONG>ec</STRONG>   erase #1 characters (P)
440        <STRONG>exit_alt_charset_mode</STRONG>       <STRONG>rmacs</STRONG>    <STRONG>ae</STRONG>   end alternate character set
441                                                  (P)
442        <STRONG>exit_attribute_mode</STRONG>         <STRONG>sgr0</STRONG>     <STRONG>me</STRONG>   turn off all attributes
443        <STRONG>exit_ca_mode</STRONG>                <STRONG>rmcup</STRONG>    <STRONG>te</STRONG>   strings to end programs using
444                                                  cup
445        <STRONG>exit_delete_mode</STRONG>            <STRONG>rmdc</STRONG>     <STRONG>ed</STRONG>   end delete mode
446        <STRONG>exit_insert_mode</STRONG>            <STRONG>rmir</STRONG>     <STRONG>ei</STRONG>   exit insert mode
447        <STRONG>exit_standout_mode</STRONG>          <STRONG>rmso</STRONG>     <STRONG>se</STRONG>   exit standout mode
448        <STRONG>exit_underline_mode</STRONG>         <STRONG>rmul</STRONG>     <STRONG>ue</STRONG>   exit underline mode
449        <STRONG>flash_screen</STRONG>                <STRONG>flash</STRONG>    <STRONG>vb</STRONG>   visible bell (may not move
450                                                  cursor)
451
452
453        <STRONG>form_feed</STRONG>                   <STRONG>ff</STRONG>       <STRONG>ff</STRONG>   hardcopy terminal page eject
454                                                  (P*)
455        <STRONG>from_status_line</STRONG>            <STRONG>fsl</STRONG>      <STRONG>fs</STRONG>   return from status line
456        <STRONG>init_1string</STRONG>                <STRONG>is1</STRONG>      <STRONG>i1</STRONG>   initialization string
457        <STRONG>init_2string</STRONG>                <STRONG>is2</STRONG>      <STRONG>is</STRONG>   initialization string
458        <STRONG>init_3string</STRONG>                <STRONG>is3</STRONG>      <STRONG>i3</STRONG>   initialization string
459        <STRONG>init_file</STRONG>                   <STRONG>if</STRONG>       <STRONG>if</STRONG>   name of initialization file
460        <STRONG>insert_character</STRONG>            <STRONG>ich1</STRONG>     <STRONG>ic</STRONG>   insert character (P)
461        <STRONG>insert_line</STRONG>                 <STRONG>il1</STRONG>      <STRONG>al</STRONG>   insert line (P*)
462        <STRONG>insert_padding</STRONG>              <STRONG>ip</STRONG>       <STRONG>ip</STRONG>   insert padding after inserted
463                                                  character
464        <STRONG>key_backspace</STRONG>               <STRONG>kbs</STRONG>      <STRONG>kb</STRONG>   backspace key
465        <STRONG>key_catab</STRONG>                   <STRONG>ktbc</STRONG>     <STRONG>ka</STRONG>   clear-all-tabs key
466        <STRONG>key_clear</STRONG>                   <STRONG>kclr</STRONG>     <STRONG>kC</STRONG>   clear-screen or erase key
467        <STRONG>key_ctab</STRONG>                    <STRONG>kctab</STRONG>    <STRONG>kt</STRONG>   clear-tab key
468        <STRONG>key_dc</STRONG>                      <STRONG>kdch1</STRONG>    <STRONG>kD</STRONG>   delete-character key
469        <STRONG>key_dl</STRONG>                      <STRONG>kdl1</STRONG>     <STRONG>kL</STRONG>   delete-line key
470        <STRONG>key_down</STRONG>                    <STRONG>kcud1</STRONG>    <STRONG>kd</STRONG>   down-arrow key
471        <STRONG>key_eic</STRONG>                     <STRONG>krmir</STRONG>    <STRONG>kM</STRONG>   sent by rmir or smir in
472                                                  insert mode
473        <STRONG>key_eol</STRONG>                     <STRONG>kel</STRONG>      <STRONG>kE</STRONG>   clear-to-end-of-line key
474        <STRONG>key_eos</STRONG>                     <STRONG>ked</STRONG>      <STRONG>kS</STRONG>   clear-to-end-of-screen key
475        <STRONG>key_f0</STRONG>                      <STRONG>kf0</STRONG>      <STRONG>k0</STRONG>   F0 function key
476        <STRONG>key_f1</STRONG>                      <STRONG>kf1</STRONG>      <STRONG>k1</STRONG>   F1 function key
477        <STRONG>key_f10</STRONG>                     <STRONG>kf10</STRONG>     <STRONG>k;</STRONG>   F10 function key
478        <STRONG>key_f2</STRONG>                      <STRONG>kf2</STRONG>      <STRONG>k2</STRONG>   F2 function key
479        <STRONG>key_f3</STRONG>                      <STRONG>kf3</STRONG>      <STRONG>k3</STRONG>   F3 function key
480        <STRONG>key_f4</STRONG>                      <STRONG>kf4</STRONG>      <STRONG>k4</STRONG>   F4 function key
481        <STRONG>key_f5</STRONG>                      <STRONG>kf5</STRONG>      <STRONG>k5</STRONG>   F5 function key
482        <STRONG>key_f6</STRONG>                      <STRONG>kf6</STRONG>      <STRONG>k6</STRONG>   F6 function key
483        <STRONG>key_f7</STRONG>                      <STRONG>kf7</STRONG>      <STRONG>k7</STRONG>   F7 function key
484        <STRONG>key_f8</STRONG>                      <STRONG>kf8</STRONG>      <STRONG>k8</STRONG>   F8 function key
485        <STRONG>key_f9</STRONG>                      <STRONG>kf9</STRONG>      <STRONG>k9</STRONG>   F9 function key
486        <STRONG>key_home</STRONG>                    <STRONG>khome</STRONG>    <STRONG>kh</STRONG>   home key
487        <STRONG>key_ic</STRONG>                      <STRONG>kich1</STRONG>    <STRONG>kI</STRONG>   insert-character key
488        <STRONG>key_il</STRONG>                      <STRONG>kil1</STRONG>     <STRONG>kA</STRONG>   insert-line key
489        <STRONG>key_left</STRONG>                    <STRONG>kcub1</STRONG>    <STRONG>kl</STRONG>   left-arrow key
490        <STRONG>key_ll</STRONG>                      <STRONG>kll</STRONG>      <STRONG>kH</STRONG>   lower-left key (home down)
491        <STRONG>key_npage</STRONG>                   <STRONG>knp</STRONG>      <STRONG>kN</STRONG>   next-page key
492        <STRONG>key_ppage</STRONG>                   <STRONG>kpp</STRONG>      <STRONG>kP</STRONG>   previous-page key
493        <STRONG>key_right</STRONG>                   <STRONG>kcuf1</STRONG>    <STRONG>kr</STRONG>   right-arrow key
494        <STRONG>key_sf</STRONG>                      <STRONG>kind</STRONG>     <STRONG>kF</STRONG>   scroll-forward key
495        <STRONG>key_sr</STRONG>                      <STRONG>kri</STRONG>      <STRONG>kR</STRONG>   scroll-backward key
496        <STRONG>key_stab</STRONG>                    <STRONG>khts</STRONG>     <STRONG>kT</STRONG>   set-tab key
497        <STRONG>key_up</STRONG>                      <STRONG>kcuu1</STRONG>    <STRONG>ku</STRONG>   up-arrow key
498        <STRONG>keypad_local</STRONG>                <STRONG>rmkx</STRONG>     <STRONG>ke</STRONG>   leave keyboard transmit mode
499        <STRONG>keypad_xmit</STRONG>                 <STRONG>smkx</STRONG>     <STRONG>ks</STRONG>   enter keyboard transmit mode
500        <STRONG>lab_f0</STRONG>                      <STRONG>lf0</STRONG>      <STRONG>l0</STRONG>   label on function key f0 if
501                                                  not f0
502        <STRONG>lab_f1</STRONG>                      <STRONG>lf1</STRONG>      <STRONG>l1</STRONG>   label on function key f1 if
503                                                  not f1
504        <STRONG>lab_f10</STRONG>                     <STRONG>lf10</STRONG>     <STRONG>la</STRONG>   label on function key f10 if
505                                                  not f10
506        <STRONG>lab_f2</STRONG>                      <STRONG>lf2</STRONG>      <STRONG>l2</STRONG>   label on function key f2 if
507                                                  not f2
508        <STRONG>lab_f3</STRONG>                      <STRONG>lf3</STRONG>      <STRONG>l3</STRONG>   label on function key f3 if
509                                                  not f3
510        <STRONG>lab_f4</STRONG>                      <STRONG>lf4</STRONG>      <STRONG>l4</STRONG>   label on function key f4 if
511                                                  not f4
512        <STRONG>lab_f5</STRONG>                      <STRONG>lf5</STRONG>      <STRONG>l5</STRONG>   label on function key f5 if
513                                                  not f5
514        <STRONG>lab_f6</STRONG>                      <STRONG>lf6</STRONG>      <STRONG>l6</STRONG>   label on function key f6 if
515                                                  not f6
516        <STRONG>lab_f7</STRONG>                      <STRONG>lf7</STRONG>      <STRONG>l7</STRONG>   label on function key f7 if
517                                                  not f7
518
519        <STRONG>lab_f8</STRONG>                      <STRONG>lf8</STRONG>      <STRONG>l8</STRONG>   label on function key f8 if
520                                                  not f8
521        <STRONG>lab_f9</STRONG>                      <STRONG>lf9</STRONG>      <STRONG>l9</STRONG>   label on function key f9 if
522                                                  not f9
523        <STRONG>meta_off</STRONG>                    <STRONG>rmm</STRONG>      <STRONG>mo</STRONG>   turn off meta mode
524        <STRONG>meta_on</STRONG>                     <STRONG>smm</STRONG>      <STRONG>mm</STRONG>   turn on meta mode (8th-bit
525                                                  on)
526        <STRONG>newline</STRONG>                     <STRONG>nel</STRONG>      <STRONG>nw</STRONG>   newline (behave like cr
527                                                  followed by lf)
528        <STRONG>pad_char</STRONG>                    <STRONG>pad</STRONG>      <STRONG>pc</STRONG>   padding char (instead of
529                                                  null)
530        <STRONG>parm_dch</STRONG>                    <STRONG>dch</STRONG>      <STRONG>DC</STRONG>   delete #1 characters (P*)
531        <STRONG>parm_delete_line</STRONG>            <STRONG>dl</STRONG>       <STRONG>DL</STRONG>   delete #1 lines (P*)
532        <STRONG>parm_down_cursor</STRONG>            <STRONG>cud</STRONG>      <STRONG>DO</STRONG>   down #1 lines (P*)
533        <STRONG>parm_ich</STRONG>                    <STRONG>ich</STRONG>      <STRONG>IC</STRONG>   insert #1 characters (P*)
534        <STRONG>parm_index</STRONG>                  <STRONG>indn</STRONG>     <STRONG>SF</STRONG>   scroll forward #1 lines (P)
535        <STRONG>parm_insert_line</STRONG>            <STRONG>il</STRONG>       <STRONG>AL</STRONG>   insert #1 lines (P*)
536        <STRONG>parm_left_cursor</STRONG>            <STRONG>cub</STRONG>      <STRONG>LE</STRONG>   move #1 characters to the
537                                                  left (P)
538        <STRONG>parm_right_cursor</STRONG>           <STRONG>cuf</STRONG>      <STRONG>RI</STRONG>   move #1 characters to the
539                                                  right (P*)
540        <STRONG>parm_rindex</STRONG>                 <STRONG>rin</STRONG>      <STRONG>SR</STRONG>   scroll back #1 lines (P)
541        <STRONG>parm_up_cursor</STRONG>              <STRONG>cuu</STRONG>      <STRONG>UP</STRONG>   up #1 lines (P*)
542        <STRONG>pkey_key</STRONG>                    <STRONG>pfkey</STRONG>    <STRONG>pk</STRONG>   program function key #1 to
543                                                  type string #2
544        <STRONG>pkey_local</STRONG>                  <STRONG>pfloc</STRONG>    <STRONG>pl</STRONG>   program function key #1 to
545                                                  execute string #2
546        <STRONG>pkey_xmit</STRONG>                   <STRONG>pfx</STRONG>      <STRONG>px</STRONG>   program function key #1 to
547                                                  transmit string #2
548        <STRONG>print_screen</STRONG>                <STRONG>mc0</STRONG>      <STRONG>ps</STRONG>   print contents of screen
549        <STRONG>prtr_off</STRONG>                    <STRONG>mc4</STRONG>      <STRONG>pf</STRONG>   turn off printer
550        <STRONG>prtr_on</STRONG>                     <STRONG>mc5</STRONG>      <STRONG>po</STRONG>   turn on printer
551        <STRONG>repeat_char</STRONG>                 <STRONG>rep</STRONG>      <STRONG>rp</STRONG>   repeat char #1 #2 times (P*)
552        <STRONG>reset_1string</STRONG>               <STRONG>rs1</STRONG>      <STRONG>r1</STRONG>   reset string
553        <STRONG>reset_2string</STRONG>               <STRONG>rs2</STRONG>      <STRONG>r2</STRONG>   reset string
554        <STRONG>reset_3string</STRONG>               <STRONG>rs3</STRONG>      <STRONG>r3</STRONG>   reset string
555        <STRONG>reset_file</STRONG>                  <STRONG>rf</STRONG>       <STRONG>rf</STRONG>   name of reset file
556        <STRONG>restore_cursor</STRONG>              <STRONG>rc</STRONG>       <STRONG>rc</STRONG>   restore cursor to position of
557                                                  last save_cursor
558        <STRONG>row_address</STRONG>                 <STRONG>vpa</STRONG>      <STRONG>cv</STRONG>   vertical position #1 absolute
559                                                  (P)
560        <STRONG>save_cursor</STRONG>                 <STRONG>sc</STRONG>       <STRONG>sc</STRONG>   save current cursor position
561                                                  (P)
562        <STRONG>scroll_forward</STRONG>              <STRONG>ind</STRONG>      <STRONG>sf</STRONG>   scroll text up (P)
563        <STRONG>scroll_reverse</STRONG>              <STRONG>ri</STRONG>       <STRONG>sr</STRONG>   scroll text down (P)
564        <STRONG>set_attributes</STRONG>              <STRONG>sgr</STRONG>      <STRONG>sa</STRONG>   define video attributes #1-#9
565                                                  (PG9)
566        <STRONG>set_tab</STRONG>                     <STRONG>hts</STRONG>      <STRONG>st</STRONG>   set a tab in every row,
567                                                  current columns
568        <STRONG>set_window</STRONG>                  <STRONG>wind</STRONG>     <STRONG>wi</STRONG>   current window is lines #1-#2
569                                                  cols #3-#4
570        <STRONG>tab</STRONG>                         <STRONG>ht</STRONG>       <STRONG>ta</STRONG>   tab to next 8-space hardware
571                                                  tab stop
572        <STRONG>to_status_line</STRONG>              <STRONG>tsl</STRONG>      <STRONG>ts</STRONG>   move to status line, column
573                                                  #1
574        <STRONG>underline_char</STRONG>              <STRONG>uc</STRONG>       <STRONG>uc</STRONG>   underline char and move past
575                                                  it
576        <STRONG>up_half_line</STRONG>                <STRONG>hu</STRONG>       <STRONG>hu</STRONG>   half a line up
577        <STRONG>init_prog</STRONG>                   <STRONG>iprog</STRONG>    <STRONG>iP</STRONG>   path name of program for
578                                                  initialization
579        <STRONG>key_a1</STRONG>                      <STRONG>ka1</STRONG>      <STRONG>K1</STRONG>   upper left of keypad
580        <STRONG>key_a3</STRONG>                      <STRONG>ka3</STRONG>      <STRONG>K3</STRONG>   upper right of keypad
581        <STRONG>key_b2</STRONG>                      <STRONG>kb2</STRONG>      <STRONG>K2</STRONG>   center of keypad
582        <STRONG>key_c1</STRONG>                      <STRONG>kc1</STRONG>      <STRONG>K4</STRONG>   lower left of keypad
583        <STRONG>key_c3</STRONG>                      <STRONG>kc3</STRONG>      <STRONG>K5</STRONG>   lower right of keypad
584
585        <STRONG>prtr_non</STRONG>                    <STRONG>mc5p</STRONG>     <STRONG>pO</STRONG>   turn on printer for #1 bytes
586        <STRONG>char_padding</STRONG>                <STRONG>rmp</STRONG>      <STRONG>rP</STRONG>   like ip but when in insert
587                                                  mode
588        <STRONG>acs_chars</STRONG>                   <STRONG>acsc</STRONG>     <STRONG>ac</STRONG>   graphics charset pairs, based
589                                                  on vt100
590        <STRONG>plab_norm</STRONG>                   <STRONG>pln</STRONG>      <STRONG>pn</STRONG>   program label #1 to show
591                                                  string #2
592        <STRONG>key_btab</STRONG>                    <STRONG>kcbt</STRONG>     <STRONG>kB</STRONG>   back-tab key
593        <STRONG>enter_xon_mode</STRONG>              <STRONG>smxon</STRONG>    <STRONG>SX</STRONG>   turn on xon/xoff handshaking
594        <STRONG>exit_xon_mode</STRONG>               <STRONG>rmxon</STRONG>    <STRONG>RX</STRONG>   turn off xon/xoff handshaking
595        <STRONG>enter_am_mode</STRONG>               <STRONG>smam</STRONG>     <STRONG>SA</STRONG>   turn on automatic margins
596        <STRONG>exit_am_mode</STRONG>                <STRONG>rmam</STRONG>     <STRONG>RA</STRONG>   turn off automatic margins
597        <STRONG>xon_character</STRONG>               <STRONG>xonc</STRONG>     <STRONG>XN</STRONG>   XON character
598        <STRONG>xoff_character</STRONG>              <STRONG>xoffc</STRONG>    <STRONG>XF</STRONG>   XOFF character
599        <STRONG>ena_acs</STRONG>                     <STRONG>enacs</STRONG>    <STRONG>eA</STRONG>   enable alternate char set
600        <STRONG>label_on</STRONG>                    <STRONG>smln</STRONG>     <STRONG>LO</STRONG>   turn on soft labels
601        <STRONG>label_off</STRONG>                   <STRONG>rmln</STRONG>     <STRONG>LF</STRONG>   turn off soft labels
602        <STRONG>key_beg</STRONG>                     <STRONG>kbeg</STRONG>     <STRONG>@1</STRONG>   begin key
603        <STRONG>key_cancel</STRONG>                  <STRONG>kcan</STRONG>     <STRONG>@2</STRONG>   cancel key
604        <STRONG>key_close</STRONG>                   <STRONG>kclo</STRONG>     <STRONG>@3</STRONG>   close key
605        <STRONG>key_command</STRONG>                 <STRONG>kcmd</STRONG>     <STRONG>@4</STRONG>   command key
606        <STRONG>key_copy</STRONG>                    <STRONG>kcpy</STRONG>     <STRONG>@5</STRONG>   copy key
607        <STRONG>key_create</STRONG>                  <STRONG>kcrt</STRONG>     <STRONG>@6</STRONG>   create key
608        <STRONG>key_end</STRONG>                     <STRONG>kend</STRONG>     <STRONG>@7</STRONG>   end key
609        <STRONG>key_enter</STRONG>                   <STRONG>kent</STRONG>     <STRONG>@8</STRONG>   enter/send key
610        <STRONG>key_exit</STRONG>                    <STRONG>kext</STRONG>     <STRONG>@9</STRONG>   exit key
611        <STRONG>key_find</STRONG>                    <STRONG>kfnd</STRONG>     <STRONG>@0</STRONG>   find key
612        <STRONG>key_help</STRONG>                    <STRONG>khlp</STRONG>     <STRONG>%1</STRONG>   help key
613        <STRONG>key_mark</STRONG>                    <STRONG>kmrk</STRONG>     <STRONG>%2</STRONG>   mark key
614        <STRONG>key_message</STRONG>                 <STRONG>kmsg</STRONG>     <STRONG>%3</STRONG>   message key
615        <STRONG>key_move</STRONG>                    <STRONG>kmov</STRONG>     <STRONG>%4</STRONG>   move key
616        <STRONG>key_next</STRONG>                    <STRONG>knxt</STRONG>     <STRONG>%5</STRONG>   next key
617        <STRONG>key_open</STRONG>                    <STRONG>kopn</STRONG>     <STRONG>%6</STRONG>   open key
618        <STRONG>key_options</STRONG>                 <STRONG>kopt</STRONG>     <STRONG>%7</STRONG>   options key
619        <STRONG>key_previous</STRONG>                <STRONG>kprv</STRONG>     <STRONG>%8</STRONG>   previous key
620        <STRONG>key_print</STRONG>                   <STRONG>kprt</STRONG>     <STRONG>%9</STRONG>   print key
621        <STRONG>key_redo</STRONG>                    <STRONG>krdo</STRONG>     <STRONG>%0</STRONG>   redo key
622        <STRONG>key_reference</STRONG>               <STRONG>kref</STRONG>     <STRONG>&amp;1</STRONG>   reference key
623        <STRONG>key_refresh</STRONG>                 <STRONG>krfr</STRONG>     <STRONG>&amp;2</STRONG>   refresh key
624        <STRONG>key_replace</STRONG>                 <STRONG>krpl</STRONG>     <STRONG>&amp;3</STRONG>   replace key
625        <STRONG>key_restart</STRONG>                 <STRONG>krst</STRONG>     <STRONG>&amp;4</STRONG>   restart key
626        <STRONG>key_resume</STRONG>                  <STRONG>kres</STRONG>     <STRONG>&amp;5</STRONG>   resume key
627        <STRONG>key_save</STRONG>                    <STRONG>ksav</STRONG>     <STRONG>&amp;6</STRONG>   save key
628        <STRONG>key_suspend</STRONG>                 <STRONG>kspd</STRONG>     <STRONG>&amp;7</STRONG>   suspend key
629        <STRONG>key_undo</STRONG>                    <STRONG>kund</STRONG>     <STRONG>&amp;8</STRONG>   undo key
630        <STRONG>key_sbeg</STRONG>                    <STRONG>kBEG</STRONG>     <STRONG>&amp;9</STRONG>   shifted begin key
631        <STRONG>key_scancel</STRONG>                 <STRONG>kCAN</STRONG>     <STRONG>&amp;0</STRONG>   shifted cancel key
632        <STRONG>key_scommand</STRONG>                <STRONG>kCMD</STRONG>     <STRONG>*1</STRONG>   shifted command key
633        <STRONG>key_scopy</STRONG>                   <STRONG>kCPY</STRONG>     <STRONG>*2</STRONG>   shifted copy key
634        <STRONG>key_screate</STRONG>                 <STRONG>kCRT</STRONG>     <STRONG>*3</STRONG>   shifted create key
635        <STRONG>key_sdc</STRONG>                     <STRONG>kDC</STRONG>      <STRONG>*4</STRONG>   shifted delete-character key
636        <STRONG>key_sdl</STRONG>                     <STRONG>kDL</STRONG>      <STRONG>*5</STRONG>   shifted delete-line key
637        <STRONG>key_select</STRONG>                  <STRONG>kslt</STRONG>     <STRONG>*6</STRONG>   select key
638        <STRONG>key_send</STRONG>                    <STRONG>kEND</STRONG>     <STRONG>*7</STRONG>   shifted end key
639        <STRONG>key_seol</STRONG>                    <STRONG>kEOL</STRONG>     <STRONG>*8</STRONG>   shifted clear-to-end-of-line
640                                                  key
641        <STRONG>key_sexit</STRONG>                   <STRONG>kEXT</STRONG>     <STRONG>*9</STRONG>   shifted exit key
642        <STRONG>key_sfind</STRONG>                   <STRONG>kFND</STRONG>     <STRONG>*0</STRONG>   shifted find key
643        <STRONG>key_shelp</STRONG>                   <STRONG>kHLP</STRONG>     <STRONG>#1</STRONG>   shifted help key
644        <STRONG>key_shome</STRONG>                   <STRONG>kHOM</STRONG>     <STRONG>#2</STRONG>   shifted home key
645        <STRONG>key_sic</STRONG>                     <STRONG>kIC</STRONG>      <STRONG>#3</STRONG>   shifted insert-character key
646        <STRONG>key_sleft</STRONG>                   <STRONG>kLFT</STRONG>     <STRONG>#4</STRONG>   shifted left-arrow key
647        <STRONG>key_smessage</STRONG>                <STRONG>kMSG</STRONG>     <STRONG>%a</STRONG>   shifted message key
648        <STRONG>key_smove</STRONG>                   <STRONG>kMOV</STRONG>     <STRONG>%b</STRONG>   shifted move key
649        <STRONG>key_snext</STRONG>                   <STRONG>kNXT</STRONG>     <STRONG>%c</STRONG>   shifted next key
650
651        <STRONG>key_soptions</STRONG>                <STRONG>kOPT</STRONG>     <STRONG>%d</STRONG>   shifted options key
652        <STRONG>key_sprevious</STRONG>               <STRONG>kPRV</STRONG>     <STRONG>%e</STRONG>   shifted previous key
653        <STRONG>key_sprint</STRONG>                  <STRONG>kPRT</STRONG>     <STRONG>%f</STRONG>   shifted print key
654        <STRONG>key_sredo</STRONG>                   <STRONG>kRDO</STRONG>     <STRONG>%g</STRONG>   shifted redo key
655        <STRONG>key_sreplace</STRONG>                <STRONG>kRPL</STRONG>     <STRONG>%h</STRONG>   shifted replace key
656        <STRONG>key_sright</STRONG>                  <STRONG>kRIT</STRONG>     <STRONG>%i</STRONG>   shifted right-arrow key
657        <STRONG>key_srsume</STRONG>                  <STRONG>kRES</STRONG>     <STRONG>%j</STRONG>   shifted resume key
658        <STRONG>key_ssave</STRONG>                   <STRONG>kSAV</STRONG>     <STRONG>!1</STRONG>   shifted save key
659        <STRONG>key_ssuspend</STRONG>                <STRONG>kSPD</STRONG>     <STRONG>!2</STRONG>   shifted suspend key
660        <STRONG>key_sundo</STRONG>                   <STRONG>kUND</STRONG>     <STRONG>!3</STRONG>   shifted undo key
661        <STRONG>req_for_input</STRONG>               <STRONG>rfi</STRONG>      <STRONG>RF</STRONG>   send next input char (for
662                                                  ptys)
663        <STRONG>key_f11</STRONG>                     <STRONG>kf11</STRONG>     <STRONG>F1</STRONG>   F11 function key
664        <STRONG>key_f12</STRONG>                     <STRONG>kf12</STRONG>     <STRONG>F2</STRONG>   F12 function key
665        <STRONG>key_f13</STRONG>                     <STRONG>kf13</STRONG>     <STRONG>F3</STRONG>   F13 function key
666        <STRONG>key_f14</STRONG>                     <STRONG>kf14</STRONG>     <STRONG>F4</STRONG>   F14 function key
667        <STRONG>key_f15</STRONG>                     <STRONG>kf15</STRONG>     <STRONG>F5</STRONG>   F15 function key
668        <STRONG>key_f16</STRONG>                     <STRONG>kf16</STRONG>     <STRONG>F6</STRONG>   F16 function key
669        <STRONG>key_f17</STRONG>                     <STRONG>kf17</STRONG>     <STRONG>F7</STRONG>   F17 function key
670        <STRONG>key_f18</STRONG>                     <STRONG>kf18</STRONG>     <STRONG>F8</STRONG>   F18 function key
671        <STRONG>key_f19</STRONG>                     <STRONG>kf19</STRONG>     <STRONG>F9</STRONG>   F19 function key
672        <STRONG>key_f20</STRONG>                     <STRONG>kf20</STRONG>     <STRONG>FA</STRONG>   F20 function key
673        <STRONG>key_f21</STRONG>                     <STRONG>kf21</STRONG>     <STRONG>FB</STRONG>   F21 function key
674        <STRONG>key_f22</STRONG>                     <STRONG>kf22</STRONG>     <STRONG>FC</STRONG>   F22 function key
675        <STRONG>key_f23</STRONG>                     <STRONG>kf23</STRONG>     <STRONG>FD</STRONG>   F23 function key
676        <STRONG>key_f24</STRONG>                     <STRONG>kf24</STRONG>     <STRONG>FE</STRONG>   F24 function key
677        <STRONG>key_f25</STRONG>                     <STRONG>kf25</STRONG>     <STRONG>FF</STRONG>   F25 function key
678        <STRONG>key_f26</STRONG>                     <STRONG>kf26</STRONG>     <STRONG>FG</STRONG>   F26 function key
679        <STRONG>key_f27</STRONG>                     <STRONG>kf27</STRONG>     <STRONG>FH</STRONG>   F27 function key
680        <STRONG>key_f28</STRONG>                     <STRONG>kf28</STRONG>     <STRONG>FI</STRONG>   F28 function key
681        <STRONG>key_f29</STRONG>                     <STRONG>kf29</STRONG>     <STRONG>FJ</STRONG>   F29 function key
682        <STRONG>key_f30</STRONG>                     <STRONG>kf30</STRONG>     <STRONG>FK</STRONG>   F30 function key
683        <STRONG>key_f31</STRONG>                     <STRONG>kf31</STRONG>     <STRONG>FL</STRONG>   F31 function key
684        <STRONG>key_f32</STRONG>                     <STRONG>kf32</STRONG>     <STRONG>FM</STRONG>   F32 function key
685        <STRONG>key_f33</STRONG>                     <STRONG>kf33</STRONG>     <STRONG>FN</STRONG>   F33 function key
686        <STRONG>key_f34</STRONG>                     <STRONG>kf34</STRONG>     <STRONG>FO</STRONG>   F34 function key
687        <STRONG>key_f35</STRONG>                     <STRONG>kf35</STRONG>     <STRONG>FP</STRONG>   F35 function key
688        <STRONG>key_f36</STRONG>                     <STRONG>kf36</STRONG>     <STRONG>FQ</STRONG>   F36 function key
689        <STRONG>key_f37</STRONG>                     <STRONG>kf37</STRONG>     <STRONG>FR</STRONG>   F37 function key
690        <STRONG>key_f38</STRONG>                     <STRONG>kf38</STRONG>     <STRONG>FS</STRONG>   F38 function key
691        <STRONG>key_f39</STRONG>                     <STRONG>kf39</STRONG>     <STRONG>FT</STRONG>   F39 function key
692        <STRONG>key_f40</STRONG>                     <STRONG>kf40</STRONG>     <STRONG>FU</STRONG>   F40 function key
693        <STRONG>key_f41</STRONG>                     <STRONG>kf41</STRONG>     <STRONG>FV</STRONG>   F41 function key
694        <STRONG>key_f42</STRONG>                     <STRONG>kf42</STRONG>     <STRONG>FW</STRONG>   F42 function key
695        <STRONG>key_f43</STRONG>                     <STRONG>kf43</STRONG>     <STRONG>FX</STRONG>   F43 function key
696        <STRONG>key_f44</STRONG>                     <STRONG>kf44</STRONG>     <STRONG>FY</STRONG>   F44 function key
697        <STRONG>key_f45</STRONG>                     <STRONG>kf45</STRONG>     <STRONG>FZ</STRONG>   F45 function key
698        <STRONG>key_f46</STRONG>                     <STRONG>kf46</STRONG>     <STRONG>Fa</STRONG>   F46 function key
699        <STRONG>key_f47</STRONG>                     <STRONG>kf47</STRONG>     <STRONG>Fb</STRONG>   F47 function key
700        <STRONG>key_f48</STRONG>                     <STRONG>kf48</STRONG>     <STRONG>Fc</STRONG>   F48 function key
701        <STRONG>key_f49</STRONG>                     <STRONG>kf49</STRONG>     <STRONG>Fd</STRONG>   F49 function key
702        <STRONG>key_f50</STRONG>                     <STRONG>kf50</STRONG>     <STRONG>Fe</STRONG>   F50 function key
703        <STRONG>key_f51</STRONG>                     <STRONG>kf51</STRONG>     <STRONG>Ff</STRONG>   F51 function key
704        <STRONG>key_f52</STRONG>                     <STRONG>kf52</STRONG>     <STRONG>Fg</STRONG>   F52 function key
705        <STRONG>key_f53</STRONG>                     <STRONG>kf53</STRONG>     <STRONG>Fh</STRONG>   F53 function key
706        <STRONG>key_f54</STRONG>                     <STRONG>kf54</STRONG>     <STRONG>Fi</STRONG>   F54 function key
707        <STRONG>key_f55</STRONG>                     <STRONG>kf55</STRONG>     <STRONG>Fj</STRONG>   F55 function key
708        <STRONG>key_f56</STRONG>                     <STRONG>kf56</STRONG>     <STRONG>Fk</STRONG>   F56 function key
709        <STRONG>key_f57</STRONG>                     <STRONG>kf57</STRONG>     <STRONG>Fl</STRONG>   F57 function key
710        <STRONG>key_f58</STRONG>                     <STRONG>kf58</STRONG>     <STRONG>Fm</STRONG>   F58 function key
711        <STRONG>key_f59</STRONG>                     <STRONG>kf59</STRONG>     <STRONG>Fn</STRONG>   F59 function key
712        <STRONG>key_f60</STRONG>                     <STRONG>kf60</STRONG>     <STRONG>Fo</STRONG>   F60 function key
713        <STRONG>key_f61</STRONG>                     <STRONG>kf61</STRONG>     <STRONG>Fp</STRONG>   F61 function key
714        <STRONG>key_f62</STRONG>                     <STRONG>kf62</STRONG>     <STRONG>Fq</STRONG>   F62 function key
715        <STRONG>key_f63</STRONG>                     <STRONG>kf63</STRONG>     <STRONG>Fr</STRONG>   F63 function key
716
717        <STRONG>clr_bol</STRONG>                     <STRONG>el1</STRONG>      <STRONG>cb</STRONG>   Clear to beginning of line
718        <STRONG>clear_margins</STRONG>               <STRONG>mgc</STRONG>      <STRONG>MC</STRONG>   clear right and left soft
719                                                  margins
720        <STRONG>set_left_margin</STRONG>             <STRONG>smgl</STRONG>     <STRONG>ML</STRONG>   set left soft margin at
721                                                  current column. (ML is not in
722                                                  BSD termcap).
723        <STRONG>set_right_margin</STRONG>            <STRONG>smgr</STRONG>     <STRONG>MR</STRONG>   set right soft margin at
724                                                  current column
725        <STRONG>label_format</STRONG>                <STRONG>fln</STRONG>      <STRONG>Lf</STRONG>   label format
726        <STRONG>set_clock</STRONG>                   <STRONG>sclk</STRONG>     <STRONG>SC</STRONG>   set clock, #1 hrs #2 mins #3
727                                                  secs
728        <STRONG>display_clock</STRONG>               <STRONG>dclk</STRONG>     <STRONG>DK</STRONG>   display clock
729        <STRONG>remove_clock</STRONG>                <STRONG>rmclk</STRONG>    <STRONG>RC</STRONG>   remove clock
730        <STRONG>create_window</STRONG>               <STRONG>cwin</STRONG>     <STRONG>CW</STRONG>   define a window #1 from #2,#3
731                                                  to #4,#5
732        <STRONG>goto_window</STRONG>                 <STRONG>wingo</STRONG>    <STRONG>WG</STRONG>   go to window #1
733        <STRONG>hangup</STRONG>                      <STRONG>hup</STRONG>      <STRONG>HU</STRONG>   hang-up phone
734        <STRONG>dial_phone</STRONG>                  <STRONG>dial</STRONG>     <STRONG>DI</STRONG>   dial number #1
735        <STRONG>quick_dial</STRONG>                  <STRONG>qdial</STRONG>    <STRONG>QD</STRONG>   dial number #1 without
736                                                  checking
737        <STRONG>tone</STRONG>                        <STRONG>tone</STRONG>     <STRONG>TO</STRONG>   select touch tone dialing
738        <STRONG>pulse</STRONG>                       <STRONG>pulse</STRONG>    <STRONG>PU</STRONG>   select pulse dialing
739        <STRONG>flash_hook</STRONG>                  <STRONG>hook</STRONG>     <STRONG>fh</STRONG>   flash switch hook
740        <STRONG>fixed_pause</STRONG>                 <STRONG>pause</STRONG>    <STRONG>PA</STRONG>   pause for 2-3 seconds
741        <STRONG>wait_tone</STRONG>                   <STRONG>wait</STRONG>     <STRONG>WA</STRONG>   wait for dial-tone
742        <STRONG>user0</STRONG>                       <STRONG>u0</STRONG>       <STRONG>u0</STRONG>   User string #0
743        <STRONG>user1</STRONG>                       <STRONG>u1</STRONG>       <STRONG>u1</STRONG>   User string #1
744        <STRONG>user2</STRONG>                       <STRONG>u2</STRONG>       <STRONG>u2</STRONG>   User string #2
745        <STRONG>user3</STRONG>                       <STRONG>u3</STRONG>       <STRONG>u3</STRONG>   User string #3
746        <STRONG>user4</STRONG>                       <STRONG>u4</STRONG>       <STRONG>u4</STRONG>   User string #4
747        <STRONG>user5</STRONG>                       <STRONG>u5</STRONG>       <STRONG>u5</STRONG>   User string #5
748        <STRONG>user6</STRONG>                       <STRONG>u6</STRONG>       <STRONG>u6</STRONG>   User string #6
749        <STRONG>user7</STRONG>                       <STRONG>u7</STRONG>       <STRONG>u7</STRONG>   User string #7
750        <STRONG>user8</STRONG>                       <STRONG>u8</STRONG>       <STRONG>u8</STRONG>   User string #8
751        <STRONG>user9</STRONG>                       <STRONG>u9</STRONG>       <STRONG>u9</STRONG>   User string #9
752        <STRONG>orig_pair</STRONG>                   <STRONG>op</STRONG>       <STRONG>op</STRONG>   Set default pair to its
753                                                  original value
754        <STRONG>orig_colors</STRONG>                 <STRONG>oc</STRONG>       <STRONG>oc</STRONG>   Set all color pairs to the
755                                                  original ones
756        <STRONG>initialize_color</STRONG>            <STRONG>initc</STRONG>    <STRONG>Ic</STRONG>   initialize color #1 to
757                                                  (#2,#3,#4)
758        <STRONG>initialize_pair</STRONG>             <STRONG>initp</STRONG>    <STRONG>Ip</STRONG>   Initialize color pair #1 to
759                                                  fg=(#2,#3,#4), bg=(#5,#6,#7)
760        <STRONG>set_color_pair</STRONG>              <STRONG>scp</STRONG>      <STRONG>sp</STRONG>   Set current color pair to #1
761        <STRONG>set_foreground</STRONG>              <STRONG>setf</STRONG>     <STRONG>Sf</STRONG>   Set foreground color #1
762        <STRONG>set_background</STRONG>              <STRONG>setb</STRONG>     <STRONG>Sb</STRONG>   Set background color #1
763        <STRONG>change_char_pitch</STRONG>           <STRONG>cpi</STRONG>      <STRONG>ZA</STRONG>   Change number of characters
764                                                  per inch to #1
765        <STRONG>change_line_pitch</STRONG>           <STRONG>lpi</STRONG>      <STRONG>ZB</STRONG>   Change number of lines per
766                                                  inch to #1
767        <STRONG>change_res_horz</STRONG>             <STRONG>chr</STRONG>      <STRONG>ZC</STRONG>   Change horizontal resolution
768                                                  to #1
769        <STRONG>change_res_vert</STRONG>             <STRONG>cvr</STRONG>      <STRONG>ZD</STRONG>   Change vertical resolution to
770                                                  #1
771        <STRONG>define_char</STRONG>                 <STRONG>defc</STRONG>     <STRONG>ZE</STRONG>   Define a character #1, #2
772                                                  dots wide, descender #3
773        <STRONG>enter_doublewide_mode</STRONG>       <STRONG>swidm</STRONG>    <STRONG>ZF</STRONG>   Enter double-wide mode
774        <STRONG>enter_draft_quality</STRONG>         <STRONG>sdrfq</STRONG>    <STRONG>ZG</STRONG>   Enter draft-quality mode
775        <STRONG>enter_italics_mode</STRONG>          <STRONG>sitm</STRONG>     <STRONG>ZH</STRONG>   Enter italic mode
776        <STRONG>enter_leftward_mode</STRONG>         <STRONG>slm</STRONG>      <STRONG>ZI</STRONG>   Start leftward carriage
777                                                  motion
778        <STRONG>enter_micro_mode</STRONG>            <STRONG>smicm</STRONG>    <STRONG>ZJ</STRONG>   Start micro-motion mode
779        <STRONG>enter_near_letter_quality</STRONG>   <STRONG>snlq</STRONG>     <STRONG>ZK</STRONG>   Enter NLQ mode
780        <STRONG>enter_normal_quality</STRONG>        <STRONG>snrmq</STRONG>    <STRONG>ZL</STRONG>   Enter normal-quality mode
781        <STRONG>enter_shadow_mode</STRONG>           <STRONG>sshm</STRONG>     <STRONG>ZM</STRONG>   Enter shadow-print mode
782
783        <STRONG>enter_subscript_mode</STRONG>        <STRONG>ssubm</STRONG>    <STRONG>ZN</STRONG>   Enter subscript mode
784        <STRONG>enter_superscript_mode</STRONG>      <STRONG>ssupm</STRONG>    <STRONG>ZO</STRONG>   Enter superscript mode
785        <STRONG>enter_upward_mode</STRONG>           <STRONG>sum</STRONG>      <STRONG>ZP</STRONG>   Start upward carriage motion
786        <STRONG>exit_doublewide_mode</STRONG>        <STRONG>rwidm</STRONG>    <STRONG>ZQ</STRONG>   End double-wide mode
787        <STRONG>exit_italics_mode</STRONG>           <STRONG>ritm</STRONG>     <STRONG>ZR</STRONG>   End italic mode
788        <STRONG>exit_leftward_mode</STRONG>          <STRONG>rlm</STRONG>      <STRONG>ZS</STRONG>   End left-motion mode
789        <STRONG>exit_micro_mode</STRONG>             <STRONG>rmicm</STRONG>    <STRONG>ZT</STRONG>   End micro-motion mode
790        <STRONG>exit_shadow_mode</STRONG>            <STRONG>rshm</STRONG>     <STRONG>ZU</STRONG>   End shadow-print mode
791        <STRONG>exit_subscript_mode</STRONG>         <STRONG>rsubm</STRONG>    <STRONG>ZV</STRONG>   End subscript mode
792        <STRONG>exit_superscript_mode</STRONG>       <STRONG>rsupm</STRONG>    <STRONG>ZW</STRONG>   End superscript mode
793        <STRONG>exit_upward_mode</STRONG>            <STRONG>rum</STRONG>      <STRONG>ZX</STRONG>   End reverse character motion
794        <STRONG>micro_column_address</STRONG>        <STRONG>mhpa</STRONG>     <STRONG>ZY</STRONG>   Like column_address in micro
795                                                  mode
796        <STRONG>micro_down</STRONG>                  <STRONG>mcud1</STRONG>    <STRONG>ZZ</STRONG>   Like cursor_down in micro
797                                                  mode
798        <STRONG>micro_left</STRONG>                  <STRONG>mcub1</STRONG>    <STRONG>Za</STRONG>   Like cursor_left in micro
799                                                  mode
800        <STRONG>micro_right</STRONG>                 <STRONG>mcuf1</STRONG>    <STRONG>Zb</STRONG>   Like cursor_right in micro
801                                                  mode
802        <STRONG>micro_row_address</STRONG>           <STRONG>mvpa</STRONG>     <STRONG>Zc</STRONG>   Like row_address #1 in micro
803                                                  mode
804        <STRONG>micro_up</STRONG>                    <STRONG>mcuu1</STRONG>    <STRONG>Zd</STRONG>   Like cursor_up in micro mode
805        <STRONG>order_of_pins</STRONG>               <STRONG>porder</STRONG>   <STRONG>Ze</STRONG>   Match software bits to print-
806                                                  head pins
807        <STRONG>parm_down_micro</STRONG>             <STRONG>mcud</STRONG>     <STRONG>Zf</STRONG>   Like parm_down_cursor in
808                                                  micro mode
809        <STRONG>parm_left_micro</STRONG>             <STRONG>mcub</STRONG>     <STRONG>Zg</STRONG>   Like parm_left_cursor in
810                                                  micro mode
811        <STRONG>parm_right_micro</STRONG>            <STRONG>mcuf</STRONG>     <STRONG>Zh</STRONG>   Like parm_right_cursor in
812                                                  micro mode
813        <STRONG>parm_up_micro</STRONG>               <STRONG>mcuu</STRONG>     <STRONG>Zi</STRONG>   Like parm_up_cursor in micro
814                                                  mode
815        <STRONG>select_char_set</STRONG>             <STRONG>scs</STRONG>      <STRONG>Zj</STRONG>   Select character set, #1
816        <STRONG>set_bottom_margin</STRONG>           <STRONG>smgb</STRONG>     <STRONG>Zk</STRONG>   Set bottom margin at current
817                                                  line
818        <STRONG>set_bottom_margin_parm</STRONG>      <STRONG>smgbp</STRONG>    <STRONG>Zl</STRONG>   Set bottom margin at line #1
819                                                  or (if smgtp is not given) #2
820                                                  lines from bottom
821        <STRONG>set_left_margin_parm</STRONG>        <STRONG>smglp</STRONG>    <STRONG>Zm</STRONG>   Set left (right) margin at
822                                                  column #1
823        <STRONG>set_right_margin_parm</STRONG>       <STRONG>smgrp</STRONG>    <STRONG>Zn</STRONG>   Set right margin at column #1
824        <STRONG>set_top_margin</STRONG>              <STRONG>smgt</STRONG>     <STRONG>Zo</STRONG>   Set top margin at current
825                                                  line
826        <STRONG>set_top_margin_parm</STRONG>         <STRONG>smgtp</STRONG>    <STRONG>Zp</STRONG>   Set top (bottom) margin at
827                                                  row #1
828        <STRONG>start_bit_image</STRONG>             <STRONG>sbim</STRONG>     <STRONG>Zq</STRONG>   Start printing bit image
829                                                  graphics
830        <STRONG>start_char_set_def</STRONG>          <STRONG>scsd</STRONG>     <STRONG>Zr</STRONG>   Start character set
831                                                  definition #1, with #2
832                                                  characters in the set
833        <STRONG>stop_bit_image</STRONG>              <STRONG>rbim</STRONG>     <STRONG>Zs</STRONG>   Stop printing bit image
834                                                  graphics
835        <STRONG>stop_char_set_def</STRONG>           <STRONG>rcsd</STRONG>     <STRONG>Zt</STRONG>   End definition of character
836                                                  set #1
837        <STRONG>subscript_characters</STRONG>        <STRONG>subcs</STRONG>    <STRONG>Zu</STRONG>   List of subscriptable
838                                                  characters
839        <STRONG>superscript_characters</STRONG>      <STRONG>supcs</STRONG>    <STRONG>Zv</STRONG>   List of superscriptable
840                                                  characters
841        <STRONG>these_cause_cr</STRONG>              <STRONG>docr</STRONG>     <STRONG>Zw</STRONG>   Printing any of these
842                                                  characters causes CR
843        <STRONG>zero_motion</STRONG>                 <STRONG>zerom</STRONG>    <STRONG>Zx</STRONG>   No motion for subsequent
844                                                  character
845
846        The following string  capabilities  are  present  in  the  SVr4.0  term
847        structure, but were originally not documented in the man page.
848
849                                        <STRONG>Code</STRONG>
850        <STRONG>String</STRONG> <STRONG>Capability</STRONG> <STRONG>Name</STRONG>      <STRONG>TI</STRONG>         <STRONG>TC</STRONG>   <STRONG>Description</STRONG>
851        ------------------------------------------------------------------------
852        <STRONG>char_set_names</STRONG>              <STRONG>csnm</STRONG>       <STRONG>Zy</STRONG>   Produce #1'th item from
853                                                    list of character set names
854        <STRONG>key_mouse</STRONG>                   <STRONG>kmous</STRONG>      <STRONG>Km</STRONG>   Mouse event has occurred
855        <STRONG>mouse_info</STRONG>                  <STRONG>minfo</STRONG>      <STRONG>Mi</STRONG>   Mouse status information
856        <STRONG>req_mouse_pos</STRONG>               <STRONG>reqmp</STRONG>      <STRONG>RQ</STRONG>   Request mouse position
857        <STRONG>get_mouse</STRONG>                   <STRONG>getm</STRONG>       <STRONG>Gm</STRONG>   Curses should get button
858                                                    events, parameter #1 not
859                                                    documented.
860        <STRONG>set_a_foreground</STRONG>            <STRONG>setaf</STRONG>      <STRONG>AF</STRONG>   Set foreground color to #1,
861                                                    using ANSI escape
862        <STRONG>set_a_background</STRONG>            <STRONG>setab</STRONG>      <STRONG>AB</STRONG>   Set background color to #1,
863                                                    using ANSI escape
864        <STRONG>pkey_plab</STRONG>                   <STRONG>pfxl</STRONG>       <STRONG>xl</STRONG>   Program function key #1 to
865                                                    type string #2 and show
866                                                    string #3
867        <STRONG>device_type</STRONG>                 <STRONG>devt</STRONG>       <STRONG>dv</STRONG>   Indicate language, codeset
868                                                    support
869        <STRONG>code_set_init</STRONG>               <STRONG>csin</STRONG>       <STRONG>ci</STRONG>   Init sequence for multiple
870                                                    codesets
871        <STRONG>set0_des_seq</STRONG>                <STRONG>s0ds</STRONG>       <STRONG>s0</STRONG>   Shift to codeset 0 (EUC set
872                                                    0, ASCII)
873        <STRONG>set1_des_seq</STRONG>                <STRONG>s1ds</STRONG>       <STRONG>s1</STRONG>   Shift to codeset 1
874        <STRONG>set2_des_seq</STRONG>                <STRONG>s2ds</STRONG>       <STRONG>s2</STRONG>   Shift to codeset 2
875        <STRONG>set3_des_seq</STRONG>                <STRONG>s3ds</STRONG>       <STRONG>s3</STRONG>   Shift to codeset 3
876        <STRONG>set_lr_margin</STRONG>               <STRONG>smglr</STRONG>      <STRONG>ML</STRONG>   Set both left and right
877                                                    margins to #1, #2.  (ML is
878                                                    not in BSD termcap).
879        <STRONG>set_tb_margin</STRONG>               <STRONG>smgtb</STRONG>      <STRONG>MT</STRONG>   Sets both top and bottom
880                                                    margins to #1, #2
881        <STRONG>bit_image_repeat</STRONG>            <STRONG>birep</STRONG>      <STRONG>Xy</STRONG>   Repeat bit image cell #1 #2
882                                                    times
883        <STRONG>bit_image_newline</STRONG>           <STRONG>binel</STRONG>      <STRONG>Zz</STRONG>   Move to next row of the bit
884                                                    image
885        <STRONG>bit_image_carriage_return</STRONG>   <STRONG>bicr</STRONG>       <STRONG>Yv</STRONG>   Move to beginning of same
886                                                    row
887        <STRONG>color_names</STRONG>                 <STRONG>colornm</STRONG>    <STRONG>Yw</STRONG>   Give name for color #1
888        <STRONG>define_bit_image_region</STRONG>     <STRONG>defbi</STRONG>      <STRONG>Yx</STRONG>   Define rectangular bit
889                                                    image region
890        <STRONG>end_bit_image_region</STRONG>        <STRONG>endbi</STRONG>      <STRONG>Yy</STRONG>   End a bit-image region
891        <STRONG>set_color_band</STRONG>              <STRONG>setcolor</STRONG>   <STRONG>Yz</STRONG>   Change to ribbon color #1
892        <STRONG>set_page_length</STRONG>             <STRONG>slines</STRONG>     <STRONG>YZ</STRONG>   Set page length to #1 lines
893        <STRONG>display_pc_char</STRONG>             <STRONG>dispc</STRONG>      <STRONG>S1</STRONG>   Display PC character #1
894        <STRONG>enter_pc_charset_mode</STRONG>       <STRONG>smpch</STRONG>      <STRONG>S2</STRONG>   Enter PC character display
895                                                    mode
896        <STRONG>exit_pc_charset_mode</STRONG>        <STRONG>rmpch</STRONG>      <STRONG>S3</STRONG>   Exit PC character display
897                                                    mode
898        <STRONG>enter_scancode_mode</STRONG>         <STRONG>smsc</STRONG>       <STRONG>S4</STRONG>   Enter PC scancode mode
899        <STRONG>exit_scancode_mode</STRONG>          <STRONG>rmsc</STRONG>       <STRONG>S5</STRONG>   Exit PC scancode mode
900        <STRONG>pc_term_options</STRONG>             <STRONG>pctrm</STRONG>      <STRONG>S6</STRONG>   PC terminal options
901        <STRONG>scancode_escape</STRONG>             <STRONG>scesc</STRONG>      <STRONG>S7</STRONG>   Escape for scancode
902                                                    emulation
903        <STRONG>alt_scancode_esc</STRONG>            <STRONG>scesa</STRONG>      <STRONG>S8</STRONG>   Alternate escape for
904                                                    scancode emulation
905
906        The XSI Curses standard added these hardcopy capabilities.   They  were
907        used  in  some  post-4.1 versions of System V curses, e.g., Solaris 2.5
908        and IRIX 6.x.  Except for <STRONG>YI</STRONG>, the <STRONG>ncurses</STRONG> termcap names  for  them  are
909        invented.   According  to the XSI Curses standard, they have no termcap
910        names.  If your compiled terminfo entries use these, they  may  not  be
911        binary-compatible with System V terminfo entries after SVr4.1; beware!
912
913                                       <STRONG>Code</STRONG>
914
915        <STRONG>String</STRONG> <STRONG>Capability</STRONG> <STRONG>Name</STRONG>     <STRONG>TI</STRONG>        <STRONG>TC</STRONG>   <STRONG>Description</STRONG>
916        ------------------------------------------------------------------------
917        <STRONG>enter_horizontal_hl_mode</STRONG>   <STRONG>ehhlm</STRONG>     <STRONG>Xh</STRONG>   Enter horizontal highlight
918                                                  mode
919        <STRONG>enter_left_hl_mode</STRONG>         <STRONG>elhlm</STRONG>     <STRONG>Xl</STRONG>   Enter left highlight mode
920        <STRONG>enter_low_hl_mode</STRONG>          <STRONG>elohlm</STRONG>    <STRONG>Xo</STRONG>   Enter low highlight mode
921        <STRONG>enter_right_hl_mode</STRONG>        <STRONG>erhlm</STRONG>     <STRONG>Xr</STRONG>   Enter right highlight mode
922        <STRONG>enter_top_hl_mode</STRONG>          <STRONG>ethlm</STRONG>     <STRONG>Xt</STRONG>   Enter top highlight mode
923        <STRONG>enter_vertical_hl_mode</STRONG>     <STRONG>evhlm</STRONG>     <STRONG>Xv</STRONG>   Enter vertical highlight mode
924        <STRONG>set_a_attributes</STRONG>           <STRONG>sgr1</STRONG>      <STRONG>sA</STRONG>   Define second set of video
925                                                  attributes #1-#6
926        <STRONG>set_pglen_inch</STRONG>             <STRONG>slength</STRONG>   <STRONG>YI</STRONG>   Set page length to #1
927                                                  hundredth of an inch (some
928                                                  implementations use sL for
929                                                  termcap).
930
931
932 </PRE><H3><a name="h3-User-Defined-Capabilities">User-Defined Capabilities</a></H3><PRE>
933        The preceding section listed the <EM>predefined</EM>  capabilities.   They  deal
934        with  some special features for terminals no longer (or possibly never)
935        produced.  Occasionally there are special features of  newer  terminals
936        which  are awkward or impossible to represent by reusing the predefined
937        capabilities.
938
939        <EM>ncurses</EM>   addresses   this   limitation   by   allowing    user-defined
940        capabilities.   The  <STRONG>tic</STRONG> and <STRONG>infocmp</STRONG> programs provide the <STRONG>-x</STRONG> option for
941        this purpose.  When <STRONG>-x</STRONG> is set, <STRONG>tic</STRONG> treats unknown capabilities as user-
942        defined.   That  is,  if <STRONG>tic</STRONG> encounters a capability name which it does
943        not recognize, it infers its type (Boolean, number or string) from  the
944        syntax  and  makes  an  extended  table entry for that capability.  The
945        <STRONG><A HREF="curs_extend.3x.html">use_extended_names(3x)</A></STRONG> function makes  this  information  conditionally
946        available  to  applications.   The  <EM>ncurses</EM>  library  provides the data
947        leaving most of the behavior to applications:
948
949        <STRONG>o</STRONG>   User-defined capability strings whose  name  begins  with  "k"  are
950            treated as function keys.
951
952        <STRONG>o</STRONG>   The  types  (Boolean,  number,  string)  determined  by  <STRONG>tic</STRONG> can be
953            inferred by successful calls on <STRONG>tigetflag</STRONG>, etc.
954
955        <STRONG>o</STRONG>   If the capability name happens to be two characters, the capability
956            is also available through the termcap interface.
957
958        While  termcap  is  said  to  be  extensible  because it does not use a
959        predefined set of capabilities, in practice it has been limited to  the
960        capabilities  defined  by  terminfo  implementations.  As a rule, user-
961        defined capabilities intended for use by termcap applications should be
962        limited  to  Booleans  and  numbers to avoid running past the 1023 byte
963        limit assumed by termcap implementations and  their  applications.   In
964        particular,  providing  extended  sets  of  function  keys (past the 60
965        numbered keys and the handful of special named keys) is best done using
966        the longer names available using terminfo.
967
968        The  <EM>ncurses</EM>  library uses a few of these user-defined capabilities, as
969        described in <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>.  Other user-defined capabilities  (including
970        function  keys)  are described in the terminal database, in the section
971        on <EM>NCURSES</EM> <EM>USER-DEFINABLE</EM> <EM>CAPABILITIES</EM>
972
973
974 </PRE><H3><a name="h3-A-Sample-Entry">A Sample Entry</a></H3><PRE>
975        The  following  entry,  describing  an   ANSI-standard   terminal,   is
976        representative of what a <STRONG>terminfo</STRONG> entry for a modern terminal typically
977        looks like.
978
979        ansi|ansi/pc-term compatible with color,
980                am, mc5i, mir, msgr,
981                colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64,
982                acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260
983                     j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303
984                     u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
985                bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J,
986                cr=^M, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B,
987                cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
988                cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
989                dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
990                el1=\E[1K, home=\E[H, hpa=\E[%i%p1%dG, ht=\E[I, hts=\EH,
991                ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=^J,
992                indn=\E[%p1%dS, invis=\E[8m, kbs=^H, kcbt=\E[Z, kcub1=\E[D,
993                kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, kich1=\E[L,
994                mc4=\E[4i, mc5=\E[5i, nel=\r\E[S, op=\E[39;49m,
995                rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rin=\E[%p1%dT,
996                rmacs=\E[10m, rmpch=\E[10m, rmso=\E[m, rmul=\E[m,
997                s0ds=\E(B, s1ds=\E)B, s2ds=\E*B, s3ds=\E+B,
998                setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
999                sgr=\E[0;10%?%p1%t;7%;
1000                           %?%p2%t;4%;
1001                           %?%p3%t;7%;
1002                           %?%p4%t;5%;
1003                           %?%p6%t;1%;
1004                           %?%p7%t;8%;
1005                           %?%p9%t;11%;m,
1006                sgr0=\E[0;10m, smacs=\E[11m, smpch=\E[11m, smso=\E[7m,
1007                smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n,
1008                u8=\E[?%[;0123456789]c, u9=\E[c, vpa=\E[%i%p1%dd,
1009
1010        Entries may continue onto multiple lines by placing white space at  the
1011        beginning  of  each line except the first.  Comments may be included on
1012        lines beginning with "#".  Capabilities in <EM>terminfo</EM> are of three types:
1013
1014        <STRONG>o</STRONG>   Boolean capabilities which indicate  that  the  terminal  has  some
1015            particular feature,
1016
1017        <STRONG>o</STRONG>   numeric capabilities giving the size of the terminal or the size of
1018            particular delays, and
1019
1020        <STRONG>o</STRONG>   string capabilities, which give a sequence which  can  be  used  to
1021            perform particular terminal operations.
1022
1023
1024 </PRE><H3><a name="h3-Types-of-Capabilities">Types of Capabilities</a></H3><PRE>
1025        All capabilities have names.  For instance, the fact that ANSI-standard
1026        terminals have <EM>automatic</EM> <EM>margins</EM> (i.e., an automatic return  and  line-
1027        feed  when the end of a line is reached) is indicated by the capability
1028        <STRONG>am</STRONG>.  Hence the description of ansi includes <STRONG>am</STRONG>.   Numeric  capabilities
1029        are  followed  by  the  character  "#" and then a positive value.  Thus
1030        <STRONG>cols</STRONG>, which indicates the number of columns the terminal has, gives the
1031        value  "80" for ansi.  Values for numeric capabilities may be specified
1032        in decimal, octal, or hexadecimal, using  the  C  programming  language
1033        conventions (e.g., 255, 0377 and 0xff or 0xFF).
1034
1035        Finally,  string  valued capabilities, such as <STRONG>el</STRONG> (clear to end of line
1036        sequence) are given by the two-character  code,  an  "=",  and  then  a
1037        string ending at the next following ",".
1038
1039        A  number  of  escape  sequences  are  provided  in  the  string valued
1040        capabilities for easy encoding of characters there:
1041
1042        <STRONG>o</STRONG>   Both <STRONG>\E</STRONG> and <STRONG>\e</STRONG> map to an ESCAPE character,
1043
1044        <STRONG>o</STRONG>   <STRONG>^</STRONG><STRONG><EM>x</EM></STRONG> maps to a control-<EM>x</EM> for any appropriate <EM>x</EM>, and
1045
1046        <STRONG>o</STRONG>   the sequences
1047
1048              <STRONG>\n</STRONG>, <STRONG>\l</STRONG>, <STRONG>\r</STRONG>, <STRONG>\t</STRONG>, <STRONG>\b</STRONG>, <STRONG>\f</STRONG>, and <STRONG>\s</STRONG>
1049
1050            produce
1051
1052              <EM>newline</EM>, <EM>line-feed</EM>, <EM>return</EM>, <EM>tab</EM>, <EM>backspace</EM>, <EM>form-feed</EM>, and <EM>space</EM>,
1053
1054            respectively.
1055
1056        X/Open Curses does not say what "appropriate <EM>x</EM>" might be.  In practice,
1057        that  is a printable ASCII graphic character.  The special case "^?" is
1058        interpreted as DEL (127).  In all other cases, the character  value  is
1059        AND'd  with 0x1f, mapping to ASCII control codes in the range 0 through
1060        31.
1061
1062        Other escapes include
1063
1064        <STRONG>o</STRONG>   <STRONG>\^</STRONG> for <STRONG>^</STRONG>,
1065
1066        <STRONG>o</STRONG>   <STRONG>\\</STRONG> for <STRONG>\</STRONG>,
1067
1068        <STRONG>o</STRONG>   <STRONG>\</STRONG>, for comma,
1069
1070        <STRONG>o</STRONG>   <STRONG>\:</STRONG> for <STRONG>:</STRONG>,
1071
1072        <STRONG>o</STRONG>   and <STRONG>\0</STRONG> for null.
1073
1074            <STRONG>\0</STRONG> will produce \200, which does not terminate a string but behaves
1075            as  a null character on most terminals, providing CS7 is specified.
1076            See <STRONG>stty(1)</STRONG>.
1077
1078            The reason for this quirk is to maintain  binary  compatibility  of
1079            the  compiled  terminfo files with other implementations, e.g., the
1080            SVr4 systems, which document this.   Compiled  terminfo  files  use
1081            null-terminated  strings,  with  no  lengths.  Modifying this would
1082            require a new binary  format,  which  would  not  work  with  other
1083            implementations.
1084
1085        Finally, characters may be given as three octal digits after a <STRONG>\</STRONG>.
1086
1087        A  delay  in  milliseconds  may appear anywhere in a string capability,
1088        enclosed in $&lt;..&gt; brackets, as in <STRONG>el</STRONG>=\EK$&lt;5&gt;,  and  padding  characters
1089        are supplied by <STRONG><A HREF="curs_terminfo.3x.html">tputs(3x)</A></STRONG> to provide this delay.
1090
1091        <STRONG>o</STRONG>   The  delay  must  be  a  number  with  at most one decimal place of
1092            precision; it may be followed by suffixes "*" or "/" or both.
1093
1094        <STRONG>o</STRONG>   A "*" indicates that the padding required is  proportional  to  the
1095            number  of lines affected by the operation, and the amount given is
1096            the per-affected-unit padding required.  (In  the  case  of  insert
1097            character, the factor is still the number of <EM>lines</EM> affected.)
1098
1099            Normally, padding is advisory if the device has the <STRONG>xon</STRONG> capability;
1100            it is used for cost computation but does not trigger delays.
1101
1102        <STRONG>o</STRONG>   A "/" suffix indicates that the padding is mandatory and  forces  a
1103            delay of the given number of milliseconds even on devices for which
1104            <STRONG>xon</STRONG> is present to indicate flow control.
1105
1106        Sometimes individual capabilities must be commented out.  To  do  this,
1107        put  a  period before the capability name.  For example, see the second
1108        <STRONG>ind</STRONG> in the example above.
1109
1110
1111 </PRE><H3><a name="h3-Fetching-Compiled-Descriptions">Fetching Compiled Descriptions</a></H3><PRE>
1112        Terminal descriptions in <EM>ncurses</EM>  are  stored  in  terminal  databases.
1113        These  databases,  which are found by their pathname, may be configured
1114        either as directory trees or hashed databases (see <STRONG><A HREF="term.5.html">term(5)</A></STRONG>),
1115
1116        The library  uses  a  compiled-in  list  of  pathnames,  which  can  be
1117        overridden  by  environment  variables.   Before  starting  to  search,
1118        <EM>ncurses</EM> checks the search list, eliminating  duplicates  and  pathnames
1119        where  no  terminal  database  is found.  The <EM>ncurses</EM> library reads the
1120        first description which passes its consistency checks.
1121
1122        <STRONG>o</STRONG>   The environment variable <STRONG>TERMINFO</STRONG> is checked first, for a  terminal
1123            database containing the terminal description.
1124
1125        <STRONG>o</STRONG>   Next, <EM>ncurses</EM> looks in <EM>$HOME/.terminfo</EM> for a compiled description.
1126
1127            This  is an optional feature which may be omitted entirely from the
1128            library,  or  limited  to  prevent  accidental  use  by  privileged
1129            applications.
1130
1131        <STRONG>o</STRONG>   Next,  if  the  environment  variable <EM>TERMINFO</EM><STRONG>_</STRONG><EM>DIRS</EM> is set, <EM>ncurses</EM>
1132            interprets the contents of  that  variable  as  a  list  of  colon-
1133            separated pathnames of terminal databases to be searched.
1134
1135            An  empty  pathname  (i.e.,  if  the variable begins or ends with a
1136            colon, or contains adjacent colons) is interpreted  as  the  system
1137            location <EM>/usr/share/terminfo</EM>.
1138
1139        <STRONG>o</STRONG>   Finally, <EM>ncurses</EM> searches these compiled-in locations:
1140
1141            <STRONG>o</STRONG>   a list of directories (/usr/share/terminfo), and
1142
1143            <STRONG>o</STRONG>   the system terminfo directory, <EM>/usr/share/terminfo</EM>
1144
1145        The <STRONG>TERMINFO</STRONG> variable can contain a terminal description instead of the
1146        pathname of a terminal database.  If this variable begins  with  "hex:"
1147        or  "b64:"  then <EM>ncurses</EM> reads a terminal description from hexadecimal-
1148        or base64-encoded data,  and  if  that  description  matches  the  name
1149        sought,  will  use  that.   This encoded data can be set using the "-Q"
1150        option of <STRONG>tic</STRONG> or <STRONG>infocmp</STRONG>.
1151
1152        The preceding addresses the usual configuration of <EM>ncurses</EM>, which  uses
1153        terminal  descriptions  prepared  in <EM>terminfo</EM> format.  While <EM>termcap</EM> is
1154        less expressive,  <EM>ncurses</EM>  can  also  be  configured  to  read  <EM>termcap</EM>
1155        descriptions.   In  that  configuration,  it  checks  the  <EM>TERMCAP</EM>  and
1156        <EM>TERMPATH</EM> variables (for content and search  path,  respectively)  after
1157        the system terminal database.
1158
1159
1160 </PRE><H3><a name="h3-Preparing-Descriptions">Preparing Descriptions</a></H3><PRE>
1161        We  now  outline  how  to  prepare descriptions of terminals.  The most
1162        effective way to prepare a terminal description  is  by  imitating  the
1163        description  of  a  similar  terminal  in  <EM>terminfo</EM>  and  to build up a
1164        description gradually, using partial descriptions with <EM>vi</EM> or some other
1165        screen-oriented  program to check that they are correct.  Be aware that
1166        a very unusual terminal may expose deficiencies in the ability  of  the
1167        <EM>terminfo</EM> file to describe it or bugs in the screen-handling code of the
1168        test program.
1169
1170        To get the padding for insert line right (if the terminal  manufacturer
1171        did  not  document  it)  a  severe test is to edit a large file at 9600
1172        baud, delete 16 or so lines from the middle of the screen, then hit the
1173        "u" key several times quickly.  If the terminal messes up, more padding
1174        is usually needed.  A similar test can be used for insert character.
1175
1176
1177 </PRE><H3><a name="h3-Basic-Capabilities">Basic Capabilities</a></H3><PRE>
1178        The number of columns on each line for the terminal  is  given  by  the
1179        <STRONG>cols</STRONG>  numeric capability.  If the terminal is a CRT, then the number of
1180        lines on the screen is given by the <STRONG>lines</STRONG> capability.  If the  terminal
1181        wraps  around  to  the  beginning  of the next line when it reaches the
1182        right margin, then it should have the <STRONG>am</STRONG> capability.  If  the  terminal
1183        can  clear  its  screen,  leaving the cursor in the home position, then
1184        this is  given  by  the  <STRONG>clear</STRONG>  string  capability.   If  the  terminal
1185        overstrikes (rather than clearing a position when a character is struck
1186        over) then it should have the <STRONG>os</STRONG> capability.   If  the  terminal  is  a
1187        printing terminal, with no soft copy unit, give it both <STRONG>hc</STRONG> and <STRONG>os</STRONG>.  (<STRONG>os</STRONG>
1188        applies to storage scope terminals, such as TEKTRONIX 4010  series,  as
1189        well  as  hard copy and APL terminals.)  If there is a code to move the
1190        cursor to the left edge of the current row, give this as <STRONG>cr</STRONG>.  (Normally
1191        this  will  be  carriage  return,  control/M.)   If  there is a code to
1192        produce an audible signal (bell, beep, etc) give this as <STRONG>bel</STRONG>.
1193
1194        If there is a code to move the cursor one position to the left (such as
1195        backspace)  that  capability should be given as <STRONG>cub1</STRONG>.  Similarly, codes
1196        to move to the right, up, and down should be given as <STRONG>cuf1</STRONG>,  <STRONG>cuu1</STRONG>,  and
1197        <STRONG>cud1</STRONG>.   These  local cursor motions should not alter the text they pass
1198        over, for example, you would not  normally  use  "<STRONG>cuf1</STRONG>= "  because  the
1199        space would erase the character moved over.
1200
1201        A very important point here is that the local cursor motions encoded in
1202        <EM>terminfo</EM> are undefined at the left and top edges  of  a  CRT  terminal.
1203        Programs should never attempt to backspace around the left edge, unless
1204        <STRONG>bw</STRONG> is given, and never attempt to go up locally off the top.  In  order
1205        to  scroll  text up, a program will go to the bottom left corner of the
1206        screen and send the <STRONG>ind</STRONG> (index) string.
1207
1208        To scroll text down, a program goes to  the  top  left  corner  of  the
1209        screen and sends the <STRONG>ri</STRONG> (reverse index) string.  The strings <STRONG>ind</STRONG> and <STRONG>ri</STRONG>
1210        are undefined when not on their respective corners of the screen.
1211
1212        Parameterized versions of the scrolling  sequences  are  <STRONG>indn</STRONG>  and  <STRONG>rin</STRONG>
1213        which  have  the same semantics as <STRONG>ind</STRONG> and <STRONG>ri</STRONG> except that they take one
1214        parameter, and scroll that many lines.  They are also undefined  except
1215        at the appropriate edge of the screen.
1216
1217        The  <STRONG>am</STRONG> capability tells whether the cursor sticks at the right edge of
1218        the screen when text is output, but this does not necessarily apply  to
1219        a  <STRONG>cuf1</STRONG>  from  the last column.  The only local motion which is defined
1220        from the left edge is if <STRONG>bw</STRONG> is given, then a <STRONG>cub1</STRONG> from  the  left  edge
1221        will  move  to the right edge of the previous row.  If <STRONG>bw</STRONG> is not given,
1222        the effect is undefined.  This is useful for drawing a box  around  the
1223        edge of the screen, for example.  If the terminal has switch selectable
1224        automatic margins, the <EM>terminfo</EM> file usually assumes that this  is  on;
1225        i.e.,  <STRONG>am</STRONG>.   If  the  terminal  has  a command which moves to the first
1226        column of the next line, that command can be given  as  <STRONG>nel</STRONG>  (newline).
1227        It  does  not matter if the command clears the remainder of the current
1228        line, so if the terminal has no <STRONG>cr</STRONG> and <STRONG>lf</STRONG> it may still be  possible  to
1229        craft a working <STRONG>nel</STRONG> out of one or both of them.
1230
1231        These  capabilities  suffice  to  describe  hard-copy  and  "glass-tty"
1232        terminals.  Thus the model 33 teletype is described as
1233
1234        33|tty33|tty|model 33 teletype,
1235                bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,
1236
1237        while the Lear Siegler ADM-3 is described as
1238
1239        adm3|3|lsi adm3,
1240                am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J,
1241                ind=^J, lines#24,
1242
1243
1244 </PRE><H3><a name="h3-Parameterized-Strings">Parameterized Strings</a></H3><PRE>
1245        Cursor  addressing  and  other  strings  requiring  parameters  in  the
1246        terminal  are  described  by  a  parameterized  string capability, with
1247        <EM>printf</EM>-like escapes such as <EM>%x</EM> in it.   For  example,  to  address  the
1248        cursor,  the <STRONG>cup</STRONG> capability is given, using two parameters: the row and
1249        column to address to.  (Rows and columns are  numbered  from  zero  and
1250        refer  to  the  physical  screen visible to the user, not to any unseen
1251        memory.)  If the terminal has memory relative cursor  addressing,  that
1252        can be indicated by <STRONG>mrcup</STRONG>.
1253
1254        The  parameter mechanism uses a stack and special <STRONG>%</STRONG> codes to manipulate
1255        it.  Typically a sequence will push one  of  the  parameters  onto  the
1256        stack  and  then  print  it  in  some  format.  Print (e.g., "%d") is a
1257        special case.  Other operations, including "%t" pop their operand  from
1258        the  stack.   It  is  noted  that  more  complex  operations  are often
1259        necessary, e.g., in the <STRONG>sgr</STRONG> string.
1260
1261        The <STRONG>%</STRONG> encodings have the following meanings:
1262
1263        <STRONG>%%</STRONG>   outputs "%"
1264
1265        <STRONG>%</STRONG><EM>[[</EM>:<EM>]flags][width[.precision]][</EM><STRONG>doxXs</STRONG><EM>]</EM>
1266             as in <STRONG>printf(3)</STRONG>, flags are <EM>[-+#]</EM> and <EM>space</EM>.  Use a  ":"  to  allow
1267             the next character to be a "-" flag, avoiding interpreting "%-" as
1268             an operator.
1269
1270        <STRONG>%c</STRONG>   print <EM>pop()</EM> like %c in <STRONG>printf</STRONG>
1271
1272        <STRONG>%s</STRONG>   print <EM>pop()</EM> like %s in <STRONG>printf</STRONG>
1273
1274        <STRONG>%p</STRONG><EM>[1-9]</EM>
1275             push <EM>i</EM>'th parameter
1276
1277        <STRONG>%P</STRONG><EM>[a-z]</EM>
1278             set dynamic variable <EM>[a-z]</EM> to <EM>pop()</EM>
1279
1280        <STRONG>%g</STRONG><EM>[a-z]</EM>
1281             get dynamic variable <EM>[a-z]</EM> and push it
1282
1283        <STRONG>%P</STRONG><EM>[A-Z]</EM>
1284             set static variable <EM>[a-z]</EM> to <EM>pop()</EM>
1285
1286        <STRONG>%g</STRONG><EM>[A-Z]</EM>
1287             get static variable <EM>[a-z]</EM> and push it
1288
1289             The terms "static" and "dynamic"  are  misleading.   Historically,
1290             these are simply two different sets of variables, whose values are
1291             not reset between calls to <STRONG><A HREF="curs_terminfo.3x.html">tparm(3x)</A></STRONG>.  However, that fact  is  not
1292             documented in other implementations.  Relying on it will adversely
1293             impact portability to other implementations:
1294
1295             <STRONG>o</STRONG>   SVr2 curses supported <EM>dynamic</EM> variables.  Those are  set  only
1296                 by  a  <STRONG>%P</STRONG>  operator.   A <STRONG>%g</STRONG> for a given variable without first
1297                 setting it with <STRONG>%P</STRONG> will give  unpredictable  results,  because
1298                 dynamic  variables  are  an  uninitialized  local array on the
1299                 stack in the <STRONG>tparm</STRONG> function.
1300
1301             <STRONG>o</STRONG>   SVr3.2 curses supported <EM>static</EM> variables.  Those are an  array
1302                 in the <EM>TERMINAL</EM> structure (declared in <STRONG>term.h</STRONG>), and are zeroed
1303                 automatically when the <STRONG>setupterm</STRONG> function allocates the data.
1304
1305             <STRONG>o</STRONG>   SVr4 curses made no further improvements to the <EM>dynamic/static</EM>
1306                 variable feature.
1307
1308             <STRONG>o</STRONG>   Solaris  XPG4  curses does not distinguish between <EM>dynamic</EM> and
1309                 <EM>static</EM> variables.  They are the same.  Like SVr4 curses,  XPG4
1310                 curses does not initialize these explicitly.
1311
1312             <STRONG>o</STRONG>   Before  version  6.3,  <EM>ncurses</EM>  stores both <EM>dynamic</EM> and <EM>static</EM>
1313                 variables in persistent storage, initialized to zeros.
1314
1315             <STRONG>o</STRONG>   Beginning with version 6.3, <EM>ncurses</EM> stores <EM>static</EM> and  <EM>dynamic</EM>
1316                 variables in the same manner as SVr4.
1317
1318                 <STRONG>o</STRONG>   Unlike   other   implementations,  <EM>ncurses</EM>  zeros  dynamic
1319                     variables before the first <STRONG>%g</STRONG> or <STRONG>%P</STRONG> operator.
1320
1321                 <STRONG>o</STRONG>   Like SVr2, the scope of dynamic variables  in  <EM>ncurses</EM>  is
1322                     within the current call to <STRONG>tparm</STRONG>.  Use static variables if
1323                     persistent storage is needed.
1324
1325        <STRONG>%'</STRONG><EM>c</EM><STRONG>'</STRONG> char constant <EM>c</EM>
1326
1327        <STRONG>%{</STRONG><EM>nn</EM><STRONG>}</STRONG>
1328             integer constant <EM>nn</EM>
1329
1330        <STRONG>%l</STRONG>   push strlen(pop)
1331
1332        <STRONG>%+</STRONG>, <STRONG>%-</STRONG>, <STRONG>%*</STRONG>, <STRONG>%/</STRONG>, <STRONG>%m</STRONG>
1333             arithmetic (%m is <EM>mod</EM>): <EM>push(pop()</EM> <EM>op</EM> <EM>pop())</EM>
1334
1335        <STRONG>%&amp;</STRONG>, <STRONG>%|</STRONG>, <STRONG>%^</STRONG>
1336             bit operations (AND, OR and exclusive-OR): <EM>push(pop()</EM> <EM>op</EM> <EM>pop())</EM>
1337
1338        <STRONG>%=</STRONG>, <STRONG>%&gt;</STRONG>, <STRONG>%&lt;</STRONG>
1339             logical operations: <EM>push(pop()</EM> <EM>op</EM> <EM>pop())</EM>
1340
1341        <STRONG>%A</STRONG>, <STRONG>%O</STRONG>
1342             logical AND and OR operations (for conditionals)
1343
1344        <STRONG>%!</STRONG>, <STRONG>%~</STRONG>
1345             unary operations (logical and bit complement): <EM>push(op</EM> <EM>pop())</EM>
1346
1347        <STRONG>%i</STRONG>   add 1 to first two parameters (for ANSI terminals)
1348
1349        <STRONG>%?</STRONG> <EM>expr</EM> <STRONG>%t</STRONG> <EM>thenpart</EM> <STRONG>%e</STRONG> <EM>elsepart</EM> <STRONG>%;</STRONG>
1350             This forms an if-then-else.  The <STRONG>%e</STRONG> <EM>elsepart</EM> is optional.  Usually
1351             the  <STRONG>%?</STRONG>  <EM>expr</EM>  part  pushes a value onto the stack, and <STRONG>%t</STRONG> pops it
1352             from the stack, testing if it is nonzero (true).  If  it  is  zero
1353             (false), control passes to the <STRONG>%e</STRONG> (else) part.
1354
1355             It is possible to form else-if's a la Algol 68:
1356             <STRONG>%?</STRONG> c1 <STRONG>%t</STRONG> b1 <STRONG>%e</STRONG> c2 <STRONG>%t</STRONG> b2 <STRONG>%e</STRONG> c3 <STRONG>%t</STRONG> b3 <STRONG>%e</STRONG> c4 <STRONG>%t</STRONG> b4 <STRONG>%e</STRONG> <STRONG>%;</STRONG>
1357
1358             where ci are conditions, bi are bodies.
1359
1360             Use  the  <STRONG>-f</STRONG>  option of <STRONG>tic</STRONG> or <STRONG>infocmp</STRONG> to see the structure of if-
1361             then-else's.  Some strings, e.g., <STRONG>sgr</STRONG> can be very complicated when
1362             written  on  one line.  The <STRONG>-f</STRONG> option splits the string into lines
1363             with the parts indented.
1364
1365        Binary operations are in postfix form with the operands  in  the  usual
1366        order.   That  is,  to  get  x-5  one would use "%gx%{5}%-".  <STRONG>%P</STRONG> and <STRONG>%g</STRONG>
1367        variables are persistent across escape-string evaluations.
1368
1369        Consider the HP2645, which, to get to row 3 and column 12, needs to  be
1370        sent  \E&amp;a12c03Y  padded for 6 milliseconds.  The order of the rows and
1371        columns is inverted here, and the row and column  are  printed  as  two
1372        digits.  The corresponding terminal description is expressed thus:
1373               cup=\E&amp;a%p2%dc%p1%dY$&lt;6&gt;,
1374
1375        The  Microterm ACT-IV needs the current row and column sent preceded by
1376        a <STRONG>^T</STRONG>, with the row and column simply encoded in binary,
1377               cup=^T%p1%c%p2%c
1378
1379        Terminals which use "%c" need  to  be  able  to  backspace  the  cursor
1380        (<STRONG>cub1</STRONG>),  and to move the cursor up one line on the screen (<STRONG>cuu1</STRONG>).  This
1381        is necessary because it is not always safe to transmit <STRONG>\n</STRONG> <STRONG>^D</STRONG> and <STRONG>\r</STRONG>, as
1382        the  system  may change or discard them.  (The library routines dealing
1383        with terminfo set tty modes so that tabs are never expanded, so  \t  is
1384        safe to send.  This turns out to be essential for the Ann Arbor 4080.)
1385
1386        A  final example is the LSI ADM-3a, which uses row and column offset by
1387        a blank character, thus
1388               cup=\E=%p1%' '%+%c%p2%' '%+%c
1389
1390        After sending "\E=", this pushes the first parameter, pushes the  ASCII
1391        value  for  a  space  (32),  adds them (pushing the sum on the stack in
1392        place of  the  two  previous  values)  and  outputs  that  value  as  a
1393        character.   Then  the  same  is  done  for the second parameter.  More
1394        complex arithmetic is possible using the stack.
1395
1396
1397 </PRE><H3><a name="h3-Cursor-Motions">Cursor Motions</a></H3><PRE>
1398        If the terminal has a fast way to home the cursor (to very  upper  left
1399        corner  of screen) then this can be given as <STRONG>home</STRONG>; similarly a fast way
1400        of getting to the lower left-hand corner can be given as <STRONG>ll</STRONG>;  this  may
1401        involve going up with <STRONG>cuu1</STRONG> from the home position, but a program should
1402        never do this itself (unless <STRONG>ll</STRONG> does) because it can make no assumption
1403        about  the  effect  of moving up from the home position.  Note that the
1404        home position is the same as addressing  to  (0,0):  to  the  top  left
1405        corner  of  the  screen,  not of memory.  (Thus, the \EH sequence on HP
1406        terminals cannot be used for <STRONG>home</STRONG>.)
1407
1408        If the terminal has row or column absolute cursor addressing, these can
1409        be  given  as  single  parameter  capabilities <STRONG>hpa</STRONG> (horizontal position
1410        absolute) and <STRONG>vpa</STRONG> (vertical position absolute).   Sometimes  these  are
1411        shorter  than  the  more  general  two  parameter sequence (as with the
1412        hp2645)  and  can  be  used  in  preference  to  <STRONG>cup</STRONG>.   If  there   are
1413        parameterized  local  motions  (e.g., move <EM>n</EM> spaces to the right) these
1414        can be given as  <STRONG>cud</STRONG>,  <STRONG>cub</STRONG>,  <STRONG>cuf</STRONG>,  and  <STRONG>cuu</STRONG>  with  a  single  parameter
1415        indicating  how many spaces to move.  These are primarily useful if the
1416        terminal does not have <STRONG>cup</STRONG>, such as the TEKTRONIX 4025.
1417
1418        If the terminal needs to be in a special mode when  running  a  program
1419        that uses these capabilities, the codes to enter and exit this mode can
1420        be given as <STRONG>smcup</STRONG> and <STRONG>rmcup</STRONG>.  This arises, for example, from  terminals
1421        like  the  Concept  with more than one page of memory.  If the terminal
1422        has only memory relative cursor  addressing  and  not  screen  relative
1423        cursor  addressing,  a  one  screen-sized window must be fixed into the
1424        terminal for cursor addressing to work properly.  This is also used for
1425        the  TEKTRONIX  4025,  where <STRONG>smcup</STRONG> sets the command character to be the
1426        one used by terminfo.  If the  <STRONG>smcup</STRONG>  sequence  will  not  restore  the
1427        screen  after  an  <STRONG>rmcup</STRONG>  sequence  is  output  (to  the state prior to
1428        outputting <STRONG>rmcup</STRONG>), specify <STRONG>nrrmc</STRONG>.
1429
1430
1431 </PRE><H3><a name="h3-Margins">Margins</a></H3><PRE>
1432        SVr4 (and X/Open Curses) list several string capabilities  for  setting
1433        margins.   Two  were  intended  for use with terminals, and another six
1434        were intended for use with printers.
1435
1436        <STRONG>o</STRONG>   The two terminal capabilities assume that the terminal may have the
1437            capability  of  setting the left and/or right margin at the current
1438            cursor column position.
1439
1440        <STRONG>o</STRONG>   The printer capabilities assume that the printer may have two types
1441            of capability:
1442
1443            <STRONG>o</STRONG>   the ability to set a top and/or bottom margin using the current
1444                line position, and
1445
1446            <STRONG>o</STRONG>   parameterized capabilities for setting the top,  bottom,  left,
1447                right margins given the number of rows or columns.
1448
1449        In  practice,  the  categorization into "terminal" and "printer" is not
1450        suitable:
1451
1452        <STRONG>o</STRONG>   The AT&amp;T SVr4 terminal database uses  <STRONG>smgl</STRONG>  four  times,  for  AT&amp;T
1453            hardware.
1454
1455            Three  of  the  four  are  printers.   They lack the ability to set
1456            left/right margins by specifying the column.
1457
1458        <STRONG>o</STRONG>   Other (non-AT&amp;T) terminals may support margins but using  different
1459            assumptions from AT&amp;T.
1460
1461            For  instance,  the DEC VT420 supports left/right margins, but only
1462            using a column parameter.  As an added complication, the VT420 uses
1463            two  settings to fully enable left/right margins (left/right margin
1464            mode, and origin mode).  The  former  enables  the  margins,  which
1465            causes  printed  text  to  wrap  within  margins, but the latter is
1466            needed to prevent cursor-addressing outside those margins.
1467
1468        <STRONG>o</STRONG>   Both DEC VT420 left/right margins are set  with  a  single  control
1469            sequence.  If either is omitted, the corresponding margin is set to
1470            the left or right edge of the  display  (rather  than  leaving  the
1471            margin unmodified).
1472
1473        These are the margin-related capabilities:
1474
1475                  <STRONG>Name</STRONG>    <STRONG>Description</STRONG>
1476                  ---------------------------------------------------
1477                  <STRONG>smgl</STRONG>    Set left margin at current column
1478                  <STRONG>smgr</STRONG>    Set right margin at current column
1479                  <STRONG>smgb</STRONG>    Set bottom margin at current line
1480                  <STRONG>smgt</STRONG>    Set top margin at current line
1481                  <STRONG>smgbp</STRONG>   Set bottom margin at line <EM>N</EM>
1482                  <STRONG>smglp</STRONG>   Set left margin at column <EM>N</EM>
1483                  <STRONG>smgrp</STRONG>   Set right margin at column <EM>N</EM>
1484                  <STRONG>smgtp</STRONG>   Set top margin at line <EM>N</EM>
1485                  <STRONG>smglr</STRONG>   Set both left and right margins to <EM>L</EM> and <EM>R</EM>
1486                  <STRONG>smgtb</STRONG>   Set both top and bottom margins to <EM>T</EM> and <EM>B</EM>
1487
1488        When  writing  an  application that uses these string capabilities, the
1489        pairs should be first checked to see if each capability in the pair  is
1490        set or only one is set:
1491
1492        <STRONG>o</STRONG>   If  both  <STRONG>smglp</STRONG>  and  <STRONG>smgrp</STRONG>  are  set,  each  is used with a single
1493            argument, <EM>N</EM>, that gives the column number of  the  left  and  right
1494            margin, respectively.
1495
1496        <STRONG>o</STRONG>   If  both  <STRONG>smgtp</STRONG>  and <STRONG>smgbp</STRONG> are set, each is used to set the top and
1497            bottom margin, respectively:
1498
1499            <STRONG>o</STRONG>   <STRONG>smgtp</STRONG> is used with a single argument, <EM>N</EM>, the line number of the
1500                top margin.
1501
1502            <STRONG>o</STRONG>   <STRONG>smgbp</STRONG>  is  used with two arguments, <EM>N</EM> and <EM>M</EM>, that give the line
1503                number of the bottom margin, the first counting from the top of
1504                the  page  and  the  second  counting  from  the  bottom.  This
1505                accommodates the two styles of specifying the bottom margin  in
1506                different manufacturers' printers.
1507
1508            When  designing  a terminfo entry for a printer that has a settable
1509            bottom margin, only the first or second argument  should  be  used,
1510            depending on the printer.  When developing an application that uses
1511            <STRONG>smgbp</STRONG> to set the bottom margin, both arguments must be given.
1512
1513        Conversely, when only one capability in the pair is set:
1514
1515        <STRONG>o</STRONG>   If only one of <STRONG>smglp</STRONG> and <STRONG>smgrp</STRONG> is set, then it  is  used  with  two
1516            arguments, the column number of the left and right margins, in that
1517            order.
1518
1519        <STRONG>o</STRONG>   Likewise, if only one of <STRONG>smgtp</STRONG> and <STRONG>smgbp</STRONG> is set, then  it  is  used
1520            with  two  arguments  that give the top and bottom margins, in that
1521            order, counting from the top of the page.
1522
1523            When designing a terminfo entry for a printer that requires setting
1524            both  left and right or top and bottom margins simultaneously, only
1525            one capability in the pairs <STRONG>smglp</STRONG> and  <STRONG>smgrp</STRONG>  or  <STRONG>smgtp</STRONG>  and  <STRONG>smgbp</STRONG>
1526            should be defined, leaving the other unset.
1527
1528        Except  for  very  old terminal descriptions, e.g., those developed for
1529        SVr4, the scheme just described  should  be  considered  obsolete.   An
1530        improved set of capabilities was added late in the SVr4 releases (<STRONG>smglr</STRONG>
1531        and <STRONG>smgtb</STRONG>),  which  explicitly  use  two  parameters  for  setting  the
1532        left/right or top/bottom margins.
1533
1534        When setting margins, the line- and column-values are zero-based.
1535
1536        The  <STRONG>mgc</STRONG>  string  capability  should  be defined.  Applications such as
1537        <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG> rely upon this to reset all margins.
1538
1539
1540 </PRE><H3><a name="h3-Area-Clears">Area Clears</a></H3><PRE>
1541        If the terminal can clear from the current position to the end  of  the
1542        line,  leaving  the cursor where it is, this should be given as <STRONG>el</STRONG>.  If
1543        the terminal can clear from the beginning of the line  to  the  current
1544        position  inclusive,  leaving  the  cursor  where it is, this should be
1545        given as <STRONG>el1</STRONG>.  If the terminal can clear from the current  position  to
1546        the  end  of  the display, then this should be given as <STRONG>ed</STRONG>.  <STRONG>Ed</STRONG> is only
1547        defined from the first column of a line.  (Thus, it can be simulated by
1548        a  request  to  delete  a  large  number  of lines, if a true <STRONG>ed</STRONG> is not
1549        available.)
1550
1551
1552 </PRE><H3><a name="h3-Insert_Delete-Line-and-Vertical-Motions">Insert/Delete Line and Vertical Motions</a></H3><PRE>
1553        If the terminal can open a new blank line before  the  line  where  the
1554        cursor  is,  this  should  be  given as <STRONG>il1</STRONG>; this is done only from the
1555        first position of a line.  The cursor must then  appear  on  the  newly
1556        blank  line.   If  the terminal can delete the line which the cursor is
1557        on, then this should be given as <STRONG>dl1</STRONG>; this is done only from the  first
1558        position on the line to be deleted.  Versions of <STRONG>il1</STRONG> and <STRONG>dl1</STRONG> which take
1559        a single parameter and insert or delete that many lines can be given as
1560        <STRONG>il</STRONG> and <STRONG>dl</STRONG>.
1561
1562        If  the  terminal  has a settable scrolling region (like the vt100) the
1563        command to set this can be described with  the  <STRONG>csr</STRONG>  capability,  which
1564        takes two parameters: the top and bottom lines of the scrolling region.
1565        The cursor position is, alas, undefined after using this command.
1566
1567        It is possible to get the effect of insert or delete line using <STRONG>csr</STRONG>  on
1568        a  properly  chosen  region;  the  <STRONG>sc</STRONG>  and <STRONG>rc</STRONG> (save and restore cursor)
1569        commands may be useful for ensuring that your synthesized insert/delete
1570        string  does  not  move the cursor.  (Note that the <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> library
1571        does  this  synthesis  automatically,   so   you   need   not   compose
1572        insert/delete strings for an entry with <STRONG>csr</STRONG>).
1573
1574        Yet  another  way  to  construct  insert  and  delete might be to use a
1575        combination of  index  with  the  memory-lock  feature  found  on  some
1576        terminals   (like   the   HP-700/90  series,  which  however  also  has
1577        insert/delete).
1578
1579        Inserting lines at the top or bottom of the screen  can  also  be  done
1580        using  <STRONG>ri</STRONG>  or  <STRONG>ind</STRONG> on many terminals without a true insert/delete line,
1581        and is often faster even on terminals with those features.
1582
1583        The Boolean <STRONG>non_dest_scroll_region</STRONG> should  be  set  if  each  scrolling
1584        window  is  effectively  a view port on a screen-sized canvas.  To test
1585        for this capability, create a scrolling region in  the  middle  of  the
1586        screen,  write something to the bottom line, move the cursor to the top
1587        of the region, and do <STRONG>ri</STRONG> followed by <STRONG>dl1</STRONG> or <STRONG>ind</STRONG>.  If the data  scrolled
1588        off  the  bottom  of the region by the <STRONG>ri</STRONG> re-appears, then scrolling is
1589        non-destructive.  System V and XSI Curses expect that  <STRONG>ind</STRONG>,  <STRONG>ri</STRONG>,  <STRONG>indn</STRONG>,
1590        and  <STRONG>rin</STRONG>  will  simulate  destructive  scrolling;  their  documentation
1591        cautions you not to define  <STRONG>csr</STRONG>  unless  this  is  true.   This  <STRONG>curses</STRONG>
1592        implementation  is  more  liberal  and  will  do  explicit erases after
1593        scrolling if <STRONG>ndsrc</STRONG> is defined.
1594
1595        If the terminal has the ability to define a window as part  of  memory,
1596        which  all  commands  affect,  it  should be given as the parameterized
1597        string <STRONG>wind</STRONG>.  The four parameters are the starting and ending lines  in
1598        memory and the starting and ending columns in memory, in that order.
1599
1600        If the terminal can retain display memory above, then the <STRONG>da</STRONG> capability
1601        should be given; if display memory  can  be  retained  below,  then  <STRONG>db</STRONG>
1602        should  be given.  These indicate that deleting a line or scrolling may
1603        bring non-blank lines up from below or that scrolling back with <STRONG>ri</STRONG>  may
1604        bring down non-blank lines.
1605
1606
1607 </PRE><H3><a name="h3-Insert_Delete-Character">Insert/Delete Character</a></H3><PRE>
1608        There  are  two  basic  kinds  of intelligent terminals with respect to
1609        insert/delete character which can be  described  using  <EM>terminfo.</EM>   The
1610        most   common   insert/delete  character  operations  affect  only  the
1611        characters on the current line and shift characters off the end of  the
1612        line  rigidly.  Other terminals, such as the Concept 100 and the Perkin
1613        Elmer Owl, make a distinction between typed and untyped blanks  on  the
1614        screen,  shifting  upon an insert or delete only to an untyped blank on
1615        the screen which is either  eliminated,  or  expanded  to  two  untyped
1616        blanks.
1617
1618        You  can determine the kind of terminal you have by clearing the screen
1619        and then typing text separated by cursor  motions.   Type  "abc    def"
1620        using  local  cursor  motions  (not  spaces)  between the "abc" and the
1621        "def".  Then position the cursor before the "abc" and put the  terminal
1622        in  insert  mode.   If typing characters causes the rest of the line to
1623        shift rigidly and characters to fall off the end,  then  your  terminal
1624        does  not  distinguish  between  blanks  and untyped positions.  If the
1625        "abc" shifts over to the "def" which then move together around the  end
1626        of  the  current  line  and  onto  the next as you insert, you have the
1627        second type of terminal, and  should  give  the  capability  <STRONG>in</STRONG>,  which
1628        stands for "insert null".
1629
1630        While  these  are  two  logically  separate attributes (one line versus
1631        multi-line insert mode, and special treatment  of  untyped  spaces)  we
1632        have  seen  no terminals whose insert mode cannot be described with the
1633        single attribute.
1634
1635        Terminfo can describe both terminals which have  an  insert  mode,  and
1636        terminals  which send a simple sequence to open a blank position on the
1637        current line.  Give as <STRONG>smir</STRONG> the sequence to get into insert mode.  Give
1638        as  <STRONG>rmir</STRONG>  the  sequence  to  leave  insert  mode.  Now give as <STRONG>ich1</STRONG> any
1639        sequence needed to be sent just before  sending  the  character  to  be
1640        inserted.   Most  terminals with a true insert mode will not give <STRONG>ich1</STRONG>;
1641        terminals which send a sequence to open a screen position  should  give
1642        it here.
1643
1644        If  your  terminal has both, insert mode is usually preferable to <STRONG>ich1</STRONG>.
1645        Technically, you should not give  both  unless  the  terminal  actually
1646        requires  both to be used in combination.  Accordingly, some non-curses
1647        applications get confused if both are present; the symptom  is  doubled
1648        characters  in  an  update using insert.  This requirement is now rare;
1649        most <STRONG>ich</STRONG> sequences do not require previous smir, and most  smir  insert
1650        modes  do  not  require <STRONG>ich1</STRONG> before each character.  Therefore, the new
1651        <STRONG>curses</STRONG> actually assumes this is the case and uses either  <STRONG>rmir</STRONG>/<STRONG>smir</STRONG>  or
1652        <STRONG>ich</STRONG>/<STRONG>ich1</STRONG>  as appropriate (but not both).  If you have to write an entry
1653        to be used under new curses for a terminal old  enough  to  need  both,
1654        include the <STRONG>rmir</STRONG>/<STRONG>smir</STRONG> sequences in <STRONG>ich1</STRONG>.
1655
1656        If post insert padding is needed, give this as a number of milliseconds
1657        in <STRONG>ip</STRONG> (a string option).  Any other sequence which may need to be  sent
1658        after an insert of a single character may also be given in <STRONG>ip</STRONG>.  If your
1659        terminal needs both to be placed into an "insert mode"  and  a  special
1660        code  to  precede each inserted character, then both <STRONG>smir</STRONG>/<STRONG>rmir</STRONG> and <STRONG>ich1</STRONG>
1661        can be given, and both will be used.   The  <STRONG>ich</STRONG>  capability,  with  one
1662        parameter, <EM>n</EM>, will repeat the effects of <STRONG>ich1</STRONG> <EM>n</EM> times.
1663
1664        If  padding  is  necessary between characters typed while not in insert
1665        mode, give this as a number of milliseconds padding in <STRONG>rmp</STRONG>.
1666
1667        It is occasionally necessary to move around while  in  insert  mode  to
1668        delete  characters  on the same line (e.g., if there is a tab after the
1669        insertion position).  If your terminal allows motion  while  in  insert
1670        mode  you  can  give  the  capability <STRONG>mir</STRONG> to speed up inserting in this
1671        case.  Omitting <STRONG>mir</STRONG> will affect only speed.   Some  terminals  (notably
1672        Datamedia's)  must  not  have  <STRONG>mir</STRONG> because of the way their insert mode
1673        works.
1674
1675        Finally, you can specify <STRONG>dch1</STRONG> to delete a single  character,  <STRONG>dch</STRONG>  with
1676        one  parameter,  <EM>n</EM>,  to  delete <EM>n</EM> <EM>characters,</EM> and delete mode by giving
1677        <STRONG>smdc</STRONG> and <STRONG>rmdc</STRONG> to enter and exit delete  mode  (any  mode  the  terminal
1678        needs to be placed in for <STRONG>dch1</STRONG> to work).
1679
1680        A  command  to  erase  <EM>n</EM>  characters (equivalent to outputting <EM>n</EM> blanks
1681        without moving the cursor) can be given as <STRONG>ech</STRONG> with one parameter.
1682
1683
1684 </PRE><H3><a name="h3-Highlighting_Underlining_and-Visible-Bells">Highlighting, Underlining, and Visible Bells</a></H3><PRE>
1685        If your terminal has one or more kinds of display attributes, these can
1686        be  represented  in  a number of different ways.  You should choose one
1687        display form as <EM>standout</EM> <EM>mode</EM>,  representing  a  good,  high  contrast,
1688        easy-on-the-eyes,  format  for  highlighting  error  messages and other
1689        attention getters.  (If you have a choice,  reverse  video  plus  half-
1690        bright  is  good,  or reverse video alone.)  The sequences to enter and
1691        exit standout mode are given as <STRONG>smso</STRONG> and <STRONG>rmso</STRONG>,  respectively.   If  the
1692        code  to  change  into  or  out of standout mode leaves one or even two
1693        blank spaces on the screen, as the TVI 912 and Teleray  1061  do,  then
1694        <STRONG>xmc</STRONG> should be given to tell how many spaces are left.
1695
1696        Codes to begin underlining and end underlining can be given as <STRONG>smul</STRONG> and
1697        <STRONG>rmul</STRONG> respectively.  If the terminal has a code to underline the current
1698        character  and  move  the  cursor  one  space to the right, such as the
1699        Microterm Mime, this can be given as <STRONG>uc</STRONG>.
1700
1701        Other capabilities to enter various highlighting  modes  include  <STRONG>blink</STRONG>
1702        (blinking)  <STRONG>bold</STRONG>  (bold or extra bright) <STRONG>dim</STRONG> (dim or half-bright) <STRONG>invis</STRONG>
1703        (blanking or invisible text) <STRONG>prot</STRONG> (protected) <STRONG>rev</STRONG> (reverse video)  <STRONG>sgr0</STRONG>
1704        (turn  off  <EM>all</EM>  attribute  modes) <STRONG>smacs</STRONG> (enter alternate character set
1705        mode) and <STRONG>rmacs</STRONG> (exit alternate character set mode).  Turning on any of
1706        these modes singly may or may not turn off other modes.
1707
1708        If  there  is  a  sequence to set arbitrary combinations of modes, this
1709        should be given as <STRONG>sgr</STRONG> (set attributes),  taking  9  parameters.   Each
1710        parameter is either zero (0) or nonzero, as the corresponding attribute
1711        is on or off.  The 9 parameters are,  in  order:  standout,  underline,
1712        reverse,  blink,  dim,  bold,  blank, protect, alternate character set.
1713        Not  all  modes  need  be  supported  by  <STRONG>sgr</STRONG>,  only  those  for  which
1714        corresponding separate attribute commands exist.
1715
1716        For example, the DEC vt220 supports most of the modes:
1717
1718                    <STRONG>tparm</STRONG> <STRONG>Parameter</STRONG>   <STRONG>Attribute</STRONG>    <STRONG>Escape</STRONG> <STRONG>Sequence</STRONG>
1719                    ------------------------------------------------
1720                    none              none         \E[0m
1721                    p1                standout     \E[0;1;7m
1722                    p2                underline    \E[0;4m
1723                    p3                reverse      \E[0;7m
1724                    p4                blink        \E[0;5m
1725                    p5                dim          not available
1726                    p6                bold         \E[0;1m
1727                    p7                invis        \E[0;8m
1728                    p8                protect      not used
1729                    p9                altcharset   ^O (off) ^N (on)
1730
1731        We  begin each escape sequence by turning off any existing modes, since
1732        there is no quick way to determine whether they are  active.   Standout
1733        is  set  up  to  be  the  combination  of  reverse and bold.  The vt220
1734        terminal has a protect mode, though it is  not  commonly  used  in  sgr
1735        because  it protects characters on the screen from the host's erasures.
1736        The altcharset mode also is different in that it is either  ^O  or  ^N,
1737        depending  on whether it is off or on.  If all modes are turned on, the
1738        resulting sequence is \E[0;1;4;5;7;8m^N.
1739
1740        Some sequences are common to  different  modes.   For  example,  ;7  is
1741        output  when  either  p1  or p3 is true, that is, if either standout or
1742        reverse modes are turned on.
1743
1744        Writing out the above sequences, along with their dependencies yields
1745
1746                  <STRONG>Sequence</STRONG>   <STRONG>When</STRONG> <STRONG>to</STRONG> <STRONG>Output</STRONG>      <STRONG>terminfo</STRONG> <STRONG>Translation</STRONG>
1747                  ----------------------------------------------------
1748                  \E[0       always              \E[0
1749                  ;1         if p1 or p6         %?%p1%p6%|%t;1%;
1750                  ;4         if p2               %?%p2%|%t;4%;
1751                  ;5         if p4               %?%p4%|%t;5%;
1752                  ;7         if p1 or p3         %?%p1%p3%|%t;7%;
1753                  ;8         if p7               %?%p7%|%t;8%;
1754                  m          always              m
1755                  ^N or ^O   if p9 ^N, else ^O   %?%p9%t^N%e^O%;
1756
1757        Putting this all together into the sgr sequence gives:
1758
1759            sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p4%t;5%;
1760                %?%p1%p3%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
1761
1762        Remember that if you specify sgr, you must also  specify  sgr0.   Also,
1763        some  implementations  rely  on  sgr  being  given  if sgr0 is, Not all
1764        terminfo  entries  necessarily  have  an  sgr  string,  however.   Many
1765        terminfo  entries  are  derived  from termcap entries which have no sgr
1766        string.  The only drawback to adding an sgr string is that termcap also
1767        assumes that sgr0 does not exit alternate character set mode.
1768
1769        Terminals   with  the  "magic  cookie"  glitch  (<STRONG>xmc</STRONG>)  deposit  special
1770        "cookies" when they receive mode-setting sequences,  which  affect  the
1771        display  algorithm  rather  than  having extra bits for each character.
1772        Some terminals, such as the HP 2621, automatically leave standout  mode
1773        when  they  move  to  a  new line or the cursor is addressed.  Programs
1774        using standout mode should exit standout mode before moving the  cursor
1775        or  sending a newline, unless the <STRONG>msgr</STRONG> capability, asserting that it is
1776        safe to move in standout mode, is present.
1777
1778        If the terminal has a way of flashing the screen to indicate  an  error
1779        quietly  (a  bell replacement) then this can be given as <STRONG>flash</STRONG>; it must
1780        not move the cursor.
1781
1782        If the cursor needs to be made more visible than normal when it is  not
1783        on the bottom line (to make, for example, a non-blinking underline into
1784        an easier to find block or blinking underline) give  this  sequence  as
1785        <STRONG>cvvis</STRONG>.  If there is a way to make the cursor completely invisible, give
1786        that as <STRONG>civis</STRONG>.  The capability <STRONG>cnorm</STRONG> should be given which  undoes  the
1787        effects of both of these modes.
1788
1789        If  your  terminal  correctly  generates underlined characters (with no
1790        special codes needed) even though it  does  not  overstrike,  then  you
1791        should  give  the  capability  <STRONG>ul</STRONG>.  If a character overstriking another
1792        leaves both characters on the screen, specify the  capability  <STRONG>os</STRONG>.   If
1793        overstrikes are erasable with a blank, then this should be indicated by
1794        giving <STRONG>eo</STRONG>.
1795
1796
1797 </PRE><H3><a name="h3-Keypad-and-Function-Keys">Keypad and Function Keys</a></H3><PRE>
1798        If the terminal has a keypad that transmits codes  when  the  keys  are
1799        pressed,  this  information can be given.  Note that it is not possible
1800        to handle terminals where the keypad only works in local (this applies,
1801        for  example, to the unshifted HP 2621 keys).  If the keypad can be set
1802        to transmit or not  transmit,  give  these  codes  as  <STRONG>smkx</STRONG>  and  <STRONG>rmkx</STRONG>.
1803        Otherwise the keypad is assumed to always transmit.
1804
1805        The  codes  sent  by the left arrow, right arrow, up arrow, down arrow,
1806        and home keys can be given as <STRONG>kcub1,</STRONG> <STRONG>kcuf1,</STRONG>  <STRONG>kcuu1,</STRONG>  <STRONG>kcud1,</STRONG>  and  <STRONG>khome</STRONG>
1807        respectively.  If there are function keys such as f0, f1, ..., f10, the
1808        codes they send can be given as <STRONG>kf0,</STRONG> <STRONG>kf1,</STRONG> <STRONG>...,</STRONG>  <STRONG>kf10</STRONG>.   If  these  keys
1809        have  labels  other  than the default f0 through f10, the labels can be
1810        given as <STRONG>lf0,</STRONG> <STRONG>lf1,</STRONG> <STRONG>...,</STRONG> <STRONG>lf10</STRONG>.
1811
1812        The codes transmitted by certain other special keys can be given:
1813
1814        <STRONG>o</STRONG>   <STRONG>kll</STRONG> (home down),
1815
1816        <STRONG>o</STRONG>   <STRONG>kbs</STRONG> (backspace),
1817
1818        <STRONG>o</STRONG>   <STRONG>ktbc</STRONG> (clear all tabs),
1819
1820        <STRONG>o</STRONG>   <STRONG>kctab</STRONG> (clear the tab stop in this column),
1821
1822        <STRONG>o</STRONG>   <STRONG>kclr</STRONG> (clear screen or erase key),
1823
1824        <STRONG>o</STRONG>   <STRONG>kdch1</STRONG> (delete character),
1825
1826        <STRONG>o</STRONG>   <STRONG>kdl1</STRONG> (delete line),
1827
1828        <STRONG>o</STRONG>   <STRONG>krmir</STRONG> (exit insert mode),
1829
1830        <STRONG>o</STRONG>   <STRONG>kel</STRONG> (clear to end of line),
1831
1832        <STRONG>o</STRONG>   <STRONG>ked</STRONG> (clear to end of screen),
1833
1834        <STRONG>o</STRONG>   <STRONG>kich1</STRONG> (insert character or enter insert mode),
1835
1836        <STRONG>o</STRONG>   <STRONG>kil1</STRONG> (insert line),
1837
1838        <STRONG>o</STRONG>   <STRONG>knp</STRONG> (next page),
1839
1840        <STRONG>o</STRONG>   <STRONG>kpp</STRONG> (previous page),
1841
1842        <STRONG>o</STRONG>   <STRONG>kind</STRONG> (scroll forward/down),
1843
1844        <STRONG>o</STRONG>   <STRONG>kri</STRONG> (scroll backward/up),
1845
1846        <STRONG>o</STRONG>   <STRONG>khts</STRONG> (set a tab stop in this column).
1847
1848        In addition, if the keypad has a 3 by 3 array  of  keys  including  the
1849        four  arrow  keys,  the  other five keys can be given as <STRONG>ka1</STRONG>, <STRONG>ka3</STRONG>, <STRONG>kb2</STRONG>,
1850        <STRONG>kc1</STRONG>, and <STRONG>kc3</STRONG>.  These keys are useful when the  effects  of  a  3  by  3
1851        directional pad are needed.
1852
1853        Strings to program function keys can be given as <STRONG>pfkey</STRONG>, <STRONG>pfloc</STRONG>, and <STRONG>pfx</STRONG>.
1854        A string to program screen labels should be specified as <STRONG>pln</STRONG>.  Each  of
1855        these  strings takes two parameters: the function key number to program
1856        (from 0 to 10) and the string to program it with.  Function key numbers
1857        out  of  this  range may program undefined keys in a terminal dependent
1858        manner.  The difference between the capabilities is that  <STRONG>pfkey</STRONG>  causes
1859        pressing  the  given  key  to  be the same as the user typing the given
1860        string; <STRONG>pfloc</STRONG> causes the string to  be  executed  by  the  terminal  in
1861        local; and <STRONG>pfx</STRONG> causes the string to be transmitted to the computer.
1862
1863        The  capabilities  <STRONG>nlab</STRONG>,  <STRONG>lw</STRONG>  and  <STRONG>lh</STRONG> define the number of programmable
1864        screen labels and their width and height.  If  there  are  commands  to
1865        turn  the  labels  on  and  off,  give  them in <STRONG>smln</STRONG> and <STRONG>rmln</STRONG>.  <STRONG>smln</STRONG> is
1866        normally output after one or more pln sequences to make sure  that  the
1867        change becomes visible.
1868
1869
1870 </PRE><H3><a name="h3-Tabs-and-Initialization">Tabs and Initialization</a></H3><PRE>
1871        A few capabilities are used only for tabs:
1872
1873        <STRONG>o</STRONG>   If  the  terminal  has hardware tabs, the command to advance to the
1874            next tab stop can be given as <STRONG>ht</STRONG> (usually control/I).
1875
1876        <STRONG>o</STRONG>   A "back-tab" command which moves leftward to the preceding tab stop
1877            can be given as <STRONG>cbt</STRONG>.
1878
1879            By  convention,  if the teletype modes indicate that tabs are being
1880            expanded by the computer rather than being sent  to  the  terminal,
1881            programs  should  not use <STRONG>ht</STRONG> or <STRONG>cbt</STRONG> even if they are present, since
1882            the user may not have the tab stops properly set.
1883
1884        <STRONG>o</STRONG>   If the terminal has hardware tabs which are initially set  every  <EM>n</EM>
1885            spaces when the terminal is powered up, the numeric parameter <STRONG>it</STRONG> is
1886            given, showing the number of spaces the tabs are set to.
1887
1888            The <STRONG>it</STRONG> capability is normally used by the <STRONG>tset</STRONG> command to determine
1889            whether  to set the mode for hardware tab expansion, and whether to
1890            set the tab stops.  If the terminal has tab stops that can be saved
1891            in  non-volatile  memory,  the terminfo description can assume that
1892            they are properly set.
1893
1894        Other capabilities include
1895
1896        <STRONG>o</STRONG>   <STRONG>is1</STRONG>, <STRONG>is2</STRONG>, and <STRONG>is3</STRONG>, initialization strings for the terminal,
1897
1898        <STRONG>o</STRONG>   <STRONG>iprog</STRONG>, the path name of a program  to  be  run  to  initialize  the
1899            terminal,
1900
1901        <STRONG>o</STRONG>   and <STRONG>if</STRONG>, the name of a file containing long initialization strings.
1902
1903        These  strings  are  expected to set the terminal into modes consistent
1904        with the rest of the terminfo description.  They are normally  sent  to
1905        the  terminal,  by  the  <EM>init</EM> option of the <STRONG>tput</STRONG> program, each time the
1906        user logs in.  They will be printed in the following order:
1907
1908               run the program
1909                      <STRONG>iprog</STRONG>
1910
1911               output
1912                      <STRONG>is1</STRONG> and
1913                      <STRONG>is2</STRONG>
1914
1915               set the margins using
1916                      <STRONG>mgc</STRONG> or
1917                      <STRONG>smglp</STRONG> and <STRONG>smgrp</STRONG> or
1918                      <STRONG>smgl</STRONG> and <STRONG>smgr</STRONG>
1919
1920               set tabs using
1921                      <STRONG>tbc</STRONG> and <STRONG>hts</STRONG>
1922
1923               print the file
1924                      <STRONG>if</STRONG>
1925
1926               and finally output
1927                      <STRONG>is3</STRONG>.
1928
1929        Most initialization is done with <STRONG>is2</STRONG>.  Special terminal  modes  can  be
1930        set  up  without duplicating strings by putting the common sequences in
1931        <STRONG>is2</STRONG> and special cases in <STRONG>is1</STRONG> and <STRONG>is3</STRONG>.
1932
1933        A set of sequences that does a harder  reset  from  a  totally  unknown
1934        state can be given as <STRONG>rs1</STRONG>, <STRONG>rs2</STRONG>, <STRONG>rf</STRONG> and <STRONG>rs3</STRONG>, analogous to <STRONG>is1</STRONG> <STRONG>,</STRONG> <STRONG>is2</STRONG> <STRONG>,</STRONG> <STRONG>if</STRONG>
1935        and <STRONG>is3</STRONG> respectively.  These strings are  output  by  <EM>reset</EM>  option  of
1936        <STRONG>tput</STRONG>,  or  by  the <STRONG>reset</STRONG> program (an alias of <STRONG>tset</STRONG>), which is used when
1937        the terminal gets into a wedged state.  Commands are normally placed in
1938        <STRONG>rs1</STRONG>, <STRONG>rs2</STRONG> <STRONG>rs3</STRONG> and <STRONG>rf</STRONG> only if they produce annoying effects on the screen
1939        and are not necessary when logging in.  For example, the command to set
1940        the  vt100  into  80-column  mode would normally be part of <STRONG>is2</STRONG>, but it
1941        causes an annoying glitch of the screen  and  is  not  normally  needed
1942        since the terminal is usually already in 80-column mode.
1943
1944        The  <STRONG>reset</STRONG>  program  writes  strings including <STRONG>iprog</STRONG>, etc., in the same
1945        order as the <EM>init</EM> program, using <STRONG>rs1</STRONG>, etc., instead of  <STRONG>is1</STRONG>,  etc.   If
1946        any  of  <STRONG>rs1</STRONG>, <STRONG>rs2</STRONG>, <STRONG>rs3</STRONG>, or <STRONG>rf</STRONG> reset capability strings are missing, the
1947        <STRONG>reset</STRONG>  program  falls  back  upon  the   corresponding   initialization
1948        capability string.
1949
1950        If  there are commands to set and clear tab stops, they can be given as
1951        <STRONG>tbc</STRONG> (clear all tab stops) and <STRONG>hts</STRONG> (set a tab stop in the current column
1952        of  every  row).   If a more complex sequence is needed to set the tabs
1953        than can be described by this, the sequence can be placed in <STRONG>is2</STRONG> or <STRONG>if</STRONG>.
1954
1955        The <STRONG>tput</STRONG> <STRONG>reset</STRONG> command uses the same capability strings  as  the  <STRONG>reset</STRONG>
1956        command,  although  the two programs (<STRONG>tput</STRONG> and <STRONG>reset</STRONG>) provide different
1957        command-line options.
1958
1959        In  practice,  these  terminfo  capabilities  are  not  often  used  in
1960        initialization of tabs (though they are required for the <STRONG>tabs</STRONG> program):
1961
1962        <STRONG>o</STRONG>   Almost all hardware terminals (at least those which supported tabs)
1963            initialized those to every <EM>eight</EM> columns:
1964
1965            The only exception was the AT&amp;T 2300  series,  which  set  tabs  to
1966            every <EM>five</EM> columns.
1967
1968        <STRONG>o</STRONG>   In  particular,  developers  of  the  hardware  terminals which are
1969            commonly used as models  for  modern  terminal  emulators  provided
1970            documentation demonstrating that <EM>eight</EM> columns were the standard.
1971
1972        <STRONG>o</STRONG>   Because of this, the terminal initialization programs <STRONG>tput</STRONG> and <STRONG>tset</STRONG>
1973            use  the  <STRONG>tbc</STRONG>  (<STRONG>clear_all_tabs</STRONG>)  and  <STRONG>hts</STRONG>  (<STRONG>set_tab</STRONG>)   capabilities
1974            directly  only when the <STRONG>it</STRONG> (<STRONG>init_tabs</STRONG>) capability is set to a value
1975            other than <EM>eight</EM>.
1976
1977
1978 </PRE><H3><a name="h3-Delays-and-Padding">Delays and Padding</a></H3><PRE>
1979        Many older and slower terminals do not support either XON/XOFF  or  DTR
1980        handshaking,  including  hard copy terminals and some very archaic CRTs
1981        (including, for  example,  DEC  VT100s).   These  may  require  padding
1982        characters after certain cursor motions and screen changes.
1983
1984        If the terminal uses xon/xoff handshaking for flow control (that is, it
1985        automatically emits ^S back to the host  when  its  input  buffers  are
1986        close  to  full),  set <STRONG>xon</STRONG>.  This capability suppresses the emission of
1987        padding.  You  can  also  set  it  for  memory-mapped  console  devices
1988        effectively that do not have a speed limit.  Padding information should
1989        still be included so that routines  can  make  better  decisions  about
1990        relative costs, but actual pad characters will not be transmitted.
1991
1992        If <STRONG>pb</STRONG> (padding baud rate) is given, padding is suppressed at baud rates
1993        below the value of <STRONG>pb</STRONG>.  If the entry has no  padding  baud  rate,  then
1994        whether padding is emitted or not is completely controlled by <STRONG>xon</STRONG>.
1995
1996        If  the  terminal requires other than a null (zero) character as a pad,
1997        then this can be given as <STRONG>pad</STRONG>.  Only the first  character  of  the  <STRONG>pad</STRONG>
1998        string is used.
1999
2000
2001 </PRE><H3><a name="h3-Status-Lines">Status Lines</a></H3><PRE>
2002        Some  terminals  have an extra "status line" which is not normally used
2003        by software (and thus not counted in the terminal's <STRONG>lines</STRONG> capability).
2004
2005        The simplest case is a status line which is cursor-addressable but  not
2006        part of the main scrolling region on the screen; the Heathkit H19 has a
2007        status line of this kind, as would  a  24-line  VT100  with  a  23-line
2008        scrolling region set up on initialization.  This situation is indicated
2009        by the <STRONG>hs</STRONG> capability.
2010
2011        Some terminals with status lines need special sequences to  access  the
2012        status  line.  These may be expressed as a string with single parameter
2013        <STRONG>tsl</STRONG> which takes the cursor to a given zero-origin column on the  status
2014        line.   The  capability  <STRONG>fsl</STRONG>  must  return  to  the  main-screen cursor
2015        positions before the last <STRONG>tsl</STRONG>.  You may need to embed the string values
2016        of  <STRONG>sc</STRONG>  (save  cursor)  and  <STRONG>rc</STRONG>  (restore  cursor)  in  <STRONG>tsl</STRONG>  and <STRONG>fsl</STRONG> to
2017        accomplish this.
2018
2019        The status line is normally assumed to be the same width as  the  width
2020        of  the  terminal.   If  this  is  untrue,  you can specify it with the
2021        numeric capability <STRONG>wsl</STRONG>.
2022
2023        A command to erase or blank the status line may be specified as <STRONG>dsl</STRONG>.
2024
2025        The Boolean capability <STRONG>eslok</STRONG> specifies  that  escape  sequences,  tabs,
2026        etc., work ordinarily in the status line.
2027
2028        The  <EM>ncurses</EM> implementation does not yet use any of these capabilities.
2029        They are documented here in case they ever become important.
2030
2031
2032 </PRE><H3><a name="h3-Line-Graphics">Line Graphics</a></H3><PRE>
2033        Many terminals have alternate character sets useful for  forms-drawing.
2034        Terminfo  and  <STRONG>curses</STRONG>  have  built-in  support  for most of the drawing
2035        characters supported by the VT100, with some characters from  the  AT&amp;T
2036        4410v1  added.   This  alternate  character set may be specified by the
2037        <STRONG>acsc</STRONG> capability.
2038
2039                           <STRONG>acsc</STRONG>
2040        <STRONG>ACS</STRONG> <STRONG>Name</STRONG>      <STRONG>Value</STRONG>   <STRONG>Symbol</STRONG>   <STRONG>ASCII</STRONG> <STRONG>Fallback</STRONG> <STRONG>/</STRONG> <STRONG>Glyph</STRONG> <STRONG>Name</STRONG>
2041        ------------------------------------------------------------------------
2042        <STRONG>ACS_RARROW</STRONG>    0x2b      +      <STRONG>&gt;</STRONG>  arrow pointing right
2043        <STRONG>ACS_LARROW</STRONG>    0x2c      ,      <STRONG>&lt;</STRONG>  arrow pointing left
2044        <STRONG>ACS_UARROW</STRONG>    0x2d      -      <STRONG>^</STRONG>  arrow pointing up
2045        <STRONG>ACS_DARROW</STRONG>    0x2e      .      <STRONG>v</STRONG>  arrow pointing down
2046        <STRONG>ACS_BLOCK</STRONG>     0x30      0      <STRONG>#</STRONG>  solid square block
2047        <STRONG>ACS_DIAMOND</STRONG>   0x60      `      <STRONG>+</STRONG>  diamond
2048        <STRONG>ACS_CKBOARD</STRONG>   0x61      a      <STRONG>:</STRONG>  checker board (stipple)
2049        <STRONG>ACS_DEGREE</STRONG>    0x66      f      <STRONG>\</STRONG>  degree symbol
2050        <STRONG>ACS_PLMINUS</STRONG>   0x67      g      <STRONG>#</STRONG>  plus/minus
2051        <STRONG>ACS_BOARD</STRONG>     0x68      h      <STRONG>#</STRONG>  board of squares
2052        <STRONG>ACS_LANTERN</STRONG>   0x69      i      <STRONG>#</STRONG>  lantern symbol
2053        <STRONG>ACS_LRCORNER</STRONG>  0x6a      j      <STRONG>+</STRONG>  lower right corner
2054
2055        <STRONG>ACS_URCORNER</STRONG>  0x6b      k      <STRONG>+</STRONG>  upper right corner
2056        <STRONG>ACS_ULCORNER</STRONG>  0x6c      l      <STRONG>+</STRONG>  upper left corner
2057        <STRONG>ACS_LLCORNER</STRONG>  0x6d      m      <STRONG>+</STRONG>  lower left corner
2058        <STRONG>ACS_PLUS</STRONG>      0x6e      n      <STRONG>+</STRONG>  large plus or crossover
2059        <STRONG>ACS_S1</STRONG>        0x6f      o      <STRONG>~</STRONG>  scan line 1
2060        <STRONG>ACS_S3</STRONG>        0x70      p      <STRONG>-</STRONG>  scan line 3
2061        <STRONG>ACS_HLINE</STRONG>     0x71      q      <STRONG>-</STRONG>  horizontal line
2062        <STRONG>ACS_S7</STRONG>        0x72      r      <STRONG>-</STRONG>  scan line 7
2063        <STRONG>ACS_S9</STRONG>        0x73      s      <STRONG>_</STRONG>  scan line 9
2064        <STRONG>ACS_LTEE</STRONG>      0x74      t      <STRONG>+</STRONG>  tee pointing right
2065        <STRONG>ACS_RTEE</STRONG>      0x75      u      <STRONG>+</STRONG>  tee pointing left
2066        <STRONG>ACS_BTEE</STRONG>      0x76      v      <STRONG>+</STRONG>  tee pointing up
2067        <STRONG>ACS_TTEE</STRONG>      0x77      w      <STRONG>+</STRONG>  tee pointing down
2068        <STRONG>ACS_VLINE</STRONG>     0x78      x      <STRONG>|</STRONG>  vertical line
2069        <STRONG>ACS_LEQUAL</STRONG>    0x79      y      <STRONG>&lt;</STRONG>  less-than-or-equal-to
2070        <STRONG>ACS_GEQUAL</STRONG>    0x7a      z      <STRONG>&gt;</STRONG>  greater-than-or-equal-to
2071        <STRONG>ACS_PI</STRONG>        0x7b      {      <STRONG>*</STRONG>  greek pi
2072        <STRONG>ACS_NEQUAL</STRONG>    0x7c      |      <STRONG>!</STRONG>  not-equal
2073        <STRONG>ACS_STERLING</STRONG>  0x7d      }      <STRONG>f</STRONG>  UK pound sign
2074        <STRONG>ACS_BULLET</STRONG>    0x7e      ~      <STRONG>o</STRONG>  bullet
2075
2076        A few notes apply to the table itself:
2077
2078        <STRONG>o</STRONG>   X/Open Curses incorrectly states that the mapping  for  <EM>lantern</EM>  is
2079            uppercase  "I"  although Unix implementations use the lowercase "i"
2080            mapping.
2081
2082        <STRONG>o</STRONG>   The DEC VT100 implemented graphics using  the  alternate  character
2083            set  feature, temporarily switching <EM>modes</EM> and sending characters in
2084            the range 0x60 (96) to 0x7e (126) (the <STRONG>acsc</STRONG>  <STRONG>Value</STRONG>  column  in  the
2085            table).
2086
2087        <STRONG>o</STRONG>   The AT&amp;T terminal added graphics characters outside that range.
2088
2089            Some  of  the  characters  within the range do not match the VT100;
2090            presumably they were used in the AT&amp;T terminal:  <EM>board</EM>  <EM>of</EM>  <EM>squares</EM>
2091            replaces  the  VT100  <EM>newline</EM> symbol, while <EM>lantern</EM> <EM>symbol</EM> replaces
2092            the VT100 <EM>vertical</EM> <EM>tab</EM> symbol.  The other VT100 symbols for control
2093            characters  (<EM>horizontal</EM> <EM>tab</EM>, <EM>carriage</EM> <EM>return</EM> and <EM>line-feed</EM>) are not
2094            (re)used in curses.
2095
2096        The best way to define a new device's graphics set is to add  a  column
2097        to  a  copy of this table for your terminal, giving the character which
2098        (when emitted between <STRONG>smacs</STRONG>/<STRONG>rmacs</STRONG> switches) will  be  rendered  as  the
2099        corresponding graphic.  Then read off the VT100/your terminal character
2100        pairs right to left in sequence; these become the ACSC string.
2101
2102
2103 </PRE><H3><a name="h3-Color-Handling">Color Handling</a></H3><PRE>
2104        The curses library functions <STRONG>init_pair</STRONG> and  <STRONG>init_color</STRONG>  manipulate  the
2105        <EM>color</EM>   <EM>pairs</EM>   and   <EM>color</EM>  <EM>values</EM>  discussed  in  this  section  (see
2106        <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG> for details on these and related functions).
2107
2108        Most color terminals are either "Tektronix-like" or "HP-like":
2109
2110        <STRONG>o</STRONG>   Tektronix-like terminals have a predefined set of <EM>N</EM> colors (where <EM>N</EM>
2111            is usually 8), and can set character-cell foreground and background
2112            characters independently, mixing them into <EM>N</EM> * <EM>N</EM> color pairs.
2113
2114        <STRONG>o</STRONG>   On HP-like  terminals,  the  user  must  set  each  color  pair  up
2115            separately   (foreground   and  background  are  not  independently
2116            settable).  Up to <EM>M</EM> color pairs may be set up  from  2*<EM>M</EM>  different
2117            colors.  ANSI-compatible terminals are Tektronix-like.
2118
2119        Some basic color capabilities are independent of the color method.  The
2120        numeric capabilities <STRONG>colors</STRONG> and <STRONG>pairs</STRONG> specify the  maximum  numbers  of
2121        colors  and  color  pairs that can be displayed simultaneously.  The <STRONG>op</STRONG>
2122        (original pair) string resets foreground and background colors to their
2123        default  values  for  the terminal.  The <STRONG>oc</STRONG> string resets all colors or
2124        color pairs to their default values for the terminal.   Some  terminals
2125        (including  many  PC  terminal  emulators)  erase screen areas with the
2126        current background color rather than the power-up  default  background;
2127        these should have the Boolean capability <STRONG>bce</STRONG>.
2128
2129        While  the  curses  library  works  with  <EM>color</EM>  <EM>pairs</EM>  (reflecting the
2130        inability of some devices  to  set  foreground  and  background  colors
2131        independently),  there  are  separate  capabilities  for  setting these
2132        features:
2133
2134        <STRONG>o</STRONG>   To  change  the  current  foreground  or  background  color  on   a
2135            Tektronix-type  terminal, use <STRONG>setaf</STRONG> (set ANSI foreground) and <STRONG>setab</STRONG>
2136            (set ANSI background)  or  <STRONG>setf</STRONG>  (set  foreground)  and  <STRONG>setb</STRONG>  (set
2137            background).  These take one parameter, the color number.  The SVr4
2138            documentation describes only <STRONG>setaf</STRONG>/<STRONG>setab</STRONG>; the XPG4 draft says  that
2139            "If  the  terminal supports ANSI escape sequences to set background
2140            and  foreground,  they  should  be  coded  as  <STRONG>setaf</STRONG>   and   <STRONG>setab</STRONG>,
2141            respectively.
2142
2143        <STRONG>o</STRONG>   If  the  terminal supports other escape sequences to set background
2144            and  foreground,  they  should  be  coded   as   <STRONG>setf</STRONG>   and   <STRONG>setb</STRONG>,
2145            respectively.   The  <STRONG>vidputs</STRONG>  and the <STRONG><A HREF="curs_refresh.3x.html">refresh(3x)</A></STRONG> functions use the
2146            <STRONG>setaf</STRONG> and <STRONG>setab</STRONG> capabilities if they are defined.
2147
2148        The <STRONG>setaf</STRONG>/<STRONG>setab</STRONG>  and  <STRONG>setf</STRONG>/<STRONG>setb</STRONG>  capabilities  take  a  single  numeric
2149        argument each.  Argument values 0-7 of <STRONG>setaf</STRONG>/<STRONG>setab</STRONG> are portably defined
2150        as follows (the middle column is the symbolic #define available in  the
2151        header  for the <STRONG>curses</STRONG> or <EM>ncurses</EM> libraries).  The terminal hardware is
2152        free to map these as it likes,  but  the  RGB  values  indicate  normal
2153        locations in color space.
2154
2155                     <STRONG>Color</STRONG>      <STRONG>#define</STRONG>       <STRONG>Value</STRONG>        <STRONG>RGB</STRONG>
2156                    ------------------------------------------------
2157                    black     <STRONG>COLOR_BLACK</STRONG>       0     0,   0,   0
2158                    red       <STRONG>COLOR_RED</STRONG>         1     max, 0,   0
2159                    green     <STRONG>COLOR_GREEN</STRONG>       2     0,   max, 0
2160                    yellow    <STRONG>COLOR_YELLOW</STRONG>      3     max, max, 0
2161                    blue      <STRONG>COLOR_BLUE</STRONG>        4     0,   0,   max
2162                    magenta   <STRONG>COLOR_MAGENTA</STRONG>     5     max, 0,   max
2163                    cyan      <STRONG>COLOR_CYAN</STRONG>        6     0,   max, max
2164                    white     <STRONG>COLOR_WHITE</STRONG>       7     max, max, max
2165
2166        The argument values of <STRONG>setf</STRONG>/<STRONG>setb</STRONG> historically correspond to a different
2167        mapping, i.e.,
2168
2169                     <STRONG>Color</STRONG>      <STRONG>#define</STRONG>       <STRONG>Value</STRONG>        <STRONG>RGB</STRONG>
2170                    ------------------------------------------------
2171                    black     <STRONG>COLOR_BLACK</STRONG>       0     0,   0,   0
2172                    blue      <STRONG>COLOR_BLUE</STRONG>        1     0,   0,   max
2173                    green     <STRONG>COLOR_GREEN</STRONG>       2     0,   max, 0
2174                    cyan      <STRONG>COLOR_CYAN</STRONG>        3     0,   max, max
2175                    red       <STRONG>COLOR_RED</STRONG>         4     max, 0,   0
2176                    magenta   <STRONG>COLOR_MAGENTA</STRONG>     5     max, 0,   max
2177                    yellow    <STRONG>COLOR_YELLOW</STRONG>      6     max, max, 0
2178                    white     <STRONG>COLOR_WHITE</STRONG>       7     max, max, max
2179
2180        It is important to not confuse the  two  sets  of  color  capabilities;
2181        otherwise red/blue will be interchanged on the display.
2182
2183        On  an  HP-like terminal, use <STRONG>scp</STRONG> with a color pair number parameter to
2184        set which color pair is current.
2185
2186        Some terminals allow the <EM>color</EM> <EM>values</EM> to be modified:
2187
2188        <STRONG>o</STRONG>   On a Tektronix-like terminal, the capability <STRONG>ccc</STRONG> may be present  to
2189            indicate  that colors can be modified.  If so, the <STRONG>initc</STRONG> capability
2190            will take a color number (0 to <STRONG>colors</STRONG> - 1)and three more parameters
2191            which  describe the color.  These three parameters default to being
2192            interpreted as RGB (Red,  Green,  Blue)  values.   If  the  Boolean
2193            capability <STRONG>hls</STRONG> is present, they are instead as HLS (Hue, Lightness,
2194            Saturation) indices.  The ranges are terminal-dependent.
2195
2196        <STRONG>o</STRONG>   On an HP-like terminal, <STRONG>initp</STRONG> may give a capability for changing  a
2197            color  pair  value.   It  will  take seven parameters; a color pair
2198            number (0 to <STRONG>max_pairs</STRONG> -  1),  and  two  triples  describing  first
2199            background  and  then  foreground colors.  These parameters must be
2200            (Red, Green, Blue) or (Hue,  Lightness,  Saturation)  depending  on
2201            <STRONG>hls</STRONG>.
2202
2203        On  some  color  terminals,  colors  collide  with highlights.  You can
2204        register these collisions with the <STRONG>ncv</STRONG> capability.  This is a bit  mask
2205        of   attributes   not   to  be  used  when  colors  are  enabled.   The
2206        correspondence with the attributes understood by <STRONG>curses</STRONG> is as follows:
2207
2208                          <STRONG>Attribute</STRONG>     <STRONG>Bit</STRONG>   <STRONG>Decimal</STRONG>   <STRONG>Set</STRONG> <STRONG>by</STRONG>
2209                         --------------------------------------
2210                         <STRONG>A_STANDOUT</STRONG>      0         1    <STRONG>sgr</STRONG>
2211                         <STRONG>A_UNDERLINE</STRONG>     1         2    <STRONG>sgr</STRONG>
2212                         <STRONG>A_REVERSE</STRONG>       2         4    <STRONG>sgr</STRONG>
2213                         <STRONG>A_BLINK</STRONG>         3         8    <STRONG>sgr</STRONG>
2214                         <STRONG>A_DIM</STRONG>           4        16    <STRONG>sgr</STRONG>
2215                         <STRONG>A_BOLD</STRONG>          5        32    <STRONG>sgr</STRONG>
2216                         <STRONG>A_INVIS</STRONG>         6        64    <STRONG>sgr</STRONG>
2217                         <STRONG>A_PROTECT</STRONG>       7       128    <STRONG>sgr</STRONG>
2218                         <STRONG>A_ALTCHARSET</STRONG>    8       256    <STRONG>sgr</STRONG>
2219                         <STRONG>A_HORIZONTAL</STRONG>    9       512    <STRONG>sgr1</STRONG>
2220                         <STRONG>A_LEFT</STRONG>         10      1024    <STRONG>sgr1</STRONG>
2221                         <STRONG>A_LOW</STRONG>          11      2048    <STRONG>sgr1</STRONG>
2222                         <STRONG>A_RIGHT</STRONG>        12      4096    <STRONG>sgr1</STRONG>
2223                         <STRONG>A_TOP</STRONG>          13      8192    <STRONG>sgr1</STRONG>
2224                         <STRONG>A_VERTICAL</STRONG>     14     16384    <STRONG>sgr1</STRONG>
2225                         <STRONG>A_ITALIC</STRONG>       15     32768    <STRONG>sitm</STRONG>
2226
2227        For example, on many IBM PC consoles, the underline attribute  collides
2228        with  the  foreground  color  blue  and is not available in color mode.
2229        These should have an <STRONG>ncv</STRONG> capability of 2.
2230
2231        SVr4 curses does nothing with <STRONG>ncv</STRONG>, <EM>ncurses</EM> recognizes it and  optimizes
2232        the output in favor of colors.
2233
2234
2235 </PRE><H3><a name="h3-Miscellaneous">Miscellaneous</a></H3><PRE>
2236        If  the  terminal requires other than a null (zero) character as a pad,
2237        then this can be given as pad.  Only the first  character  of  the  pad
2238        string is used.  If the terminal does not have a pad character, specify
2239        npc.  Note that <EM>ncurses</EM> implements the termcap-compatible <STRONG>PC</STRONG>  variable;
2240        though  the  application  may  set this value to something other than a
2241        null, <EM>ncurses</EM> will test <STRONG>npc</STRONG> first and use napms if the terminal has  no
2242        pad character.
2243
2244        If  the terminal can move up or down half a line, this can be indicated
2245        with <STRONG>hu</STRONG> (half-line up) and <STRONG>hd</STRONG>  (half-line  down).   This  is  primarily
2246        useful  for  superscripts  and subscripts on hard-copy terminals.  If a
2247        hard-copy terminal can eject to the next page (form feed), give this as
2248        <STRONG>ff</STRONG> (usually control/L).
2249
2250        If  there  is  a  command to repeat a given character a given number of
2251        times  (to  save  time  transmitting  a  large  number   of   identical
2252        characters)  this  can  be indicated with the parameterized string <STRONG>rep</STRONG>.
2253        The first parameter is the character to be repeated and the  second  is
2254        the number of times to repeat it.  Thus, tparm(repeat_char, 'x', 10) is
2255        the same as "xxxxxxxxxx".
2256
2257        If the terminal has a settable command character, such as the TEKTRONIX
2258        4025,  this can be indicated with <STRONG>cmdch</STRONG>.  A prototype command character
2259        is chosen which is used in all capabilities.  This character  is  given
2260        in  the  <STRONG>cmdch</STRONG>  capability to identify it.  The following convention is
2261        supported on some Unix systems: The environment is to be searched for a
2262        <STRONG>CC</STRONG>  variable,  and if found, all occurrences of the prototype character
2263        are replaced with the character in the environment variable.
2264
2265        Terminal descriptions that do not represent a specific  kind  of  known
2266        terminal,  such  as  <EM>switch</EM>, <EM>dialup</EM>, <EM>patch</EM>, and <EM>network</EM>, should include
2267        the <STRONG>gn</STRONG> (generic) capability so that programs can complain that they  do
2268        not  know how to talk to the terminal.  (This capability does not apply
2269        to <EM>virtual</EM> terminal descriptions for which  the  escape  sequences  are
2270        known.)
2271
2272        If the terminal has a "meta key" which acts as a shift key, setting the
2273        8th bit of any character transmitted, this fact can be  indicated  with
2274        <STRONG>km</STRONG>.   Otherwise, software will assume that the 8th bit is parity and it
2275        will usually be cleared.  If strings exist to turn this "meta mode"  on
2276        and off, they can be given as <STRONG>smm</STRONG> and <STRONG>rmm</STRONG>.
2277
2278        If the terminal has more lines of memory than will fit on the screen at
2279        once, the number of lines of memory can be indicated with <STRONG>lm</STRONG>.  A  value
2280        of <STRONG>lm</STRONG>#0 indicates that the number of lines is not fixed, but that there
2281        is still more memory than fits on the screen.
2282
2283        If the terminal is one of those supported by the Unix virtual  terminal
2284        protocol, the terminal number can be given as <STRONG>vt</STRONG>.
2285
2286        Media  copy strings which control an auxiliary printer connected to the
2287        terminal can be given as <STRONG>mc0</STRONG>: print the contents of  the  screen,  <STRONG>mc4</STRONG>:
2288        turn  off  the printer, and <STRONG>mc5</STRONG>: turn on the printer.  When the printer
2289        is on, all text sent to the terminal will be sent to the  printer.   It
2290        is  undefined whether the text is also displayed on the terminal screen
2291        when the printer is on.  A variation  <STRONG>mc5p</STRONG>  takes  one  parameter,  and
2292        leaves  the  printer  on  for  as  many  characters as the value of the
2293        parameter, then turns the printer off.  The parameter should not exceed
2294        255.   All  text, including <STRONG>mc4</STRONG>, is transparently passed to the printer
2295        while an <STRONG>mc5p</STRONG> is in effect.
2296
2297
2298 </PRE><H3><a name="h3-Glitches-and-Brain-Damage">Glitches and Brain Damage</a></H3><PRE>
2299        Hazeltine terminals, which do not allow "~" characters to be  displayed
2300        should indicate <STRONG>hz</STRONG>.
2301
2302        Terminals  which  ignore a line-feed immediately after an <STRONG>am</STRONG> wrap, such
2303        as the Concept and vt100, should indicate <STRONG>xenl</STRONG>.
2304
2305        If <STRONG>el</STRONG> is required to get rid of standout  (instead  of  merely  writing
2306        normal text on top of it), <STRONG>xhp</STRONG> should be given.
2307
2308        Teleray terminals, where tabs turn all characters moved over to blanks,
2309        should indicate <STRONG>xt</STRONG> (destructive tabs).  Note: the  variable  indicating
2310        this   is   now  "dest_tabs_magic_smso";  in  older  versions,  it  was
2311        teleray_glitch.  This glitch is also taken  to  mean  that  it  is  not
2312        possible  to  position  the  cursor on top of a "magic cookie", that to
2313        erase standout mode it is instead necessary to use  delete  and  insert
2314        line.  The <EM>ncurses</EM> implementation ignores this glitch.
2315
2316        The  Beehive Superbee, which is unable to correctly transmit the escape
2317        or control/C characters, has <STRONG>xsb</STRONG>, indicating that the f1  key  is  used
2318        for  escape  and  f2  for control/C.  (Only certain Superbees have this
2319        problem, depending on the ROM.)  Note that in older terminfo  versions,
2320        this capability was called "beehive_glitch"; it is now "no_esc_ctl_c".
2321
2322        Other  specific  terminal  problems  may  be  corrected  by adding more
2323        capabilities of the form <STRONG>x</STRONG><EM>x</EM>.
2324
2325
2326 </PRE><H3><a name="h3-Pitfalls-of-Long-Entries">Pitfalls of Long Entries</a></H3><PRE>
2327        Long terminfo entries are unlikely to be a problem; to date,  no  entry
2328        has   even   approached   terminfo's  4096-byte  string-table  maximum.
2329        Unfortunately, the termcap translations are much more strictly  limited
2330        (to 1023 bytes), thus termcap translations of long terminfo entries can
2331        cause problems.
2332
2333        The man pages for 4.3BSD and older versions  of  <STRONG>tgetent</STRONG>  instruct  the
2334        user  to  allocate a 1024-byte buffer for the termcap entry.  The entry
2335        gets null-terminated by the termcap library, so that makes the  maximum
2336        safe  length  for a termcap entry 1k-1 (1023) bytes.  Depending on what
2337        the application and the termcap library being used does, and  where  in
2338        the  termcap  file  the terminal type that <STRONG>tgetent</STRONG> is searching for is,
2339        several bad things can happen:
2340
2341        <STRONG>o</STRONG>   some termcap libraries print a warning message,
2342
2343        <STRONG>o</STRONG>   some exit if they find an entry that's longer than 1023 bytes,
2344
2345        <STRONG>o</STRONG>   some neither exit nor warn, doing nothing useful, and
2346
2347        <STRONG>o</STRONG>   some simply truncate the entries to 1023 bytes.
2348
2349        Some application programs allocate more than the recommended 1K for the
2350        termcap entry; others do not.
2351
2352        Each  termcap  entry has two important sizes associated with it: before
2353        "tc" expansion, and after "tc" expansion.  "tc" is the capability  that
2354        tacks on another termcap entry to the end of the current one, to add on
2355        its capabilities.  If a termcap entry does not use the "tc" capability,
2356        then of course the two lengths are the same.
2357
2358        The  "before tc expansion" length is the most important one, because it
2359        affects more than just users of that particular terminal.  This is  the
2360        length  of the entry as it exists in /etc/termcap, minus the backslash-
2361        newline pairs, which <STRONG>tgetent</STRONG> strips out while reading it.  Some termcap
2362        libraries strip off the final newline, too (GNU termcap does not).  Now
2363        suppose:
2364
2365        <STRONG>o</STRONG>   a termcap entry before expansion is more than 1023 bytes long,
2366
2367        <STRONG>o</STRONG>   and the application has only allocated a 1k buffer,
2368
2369        <STRONG>o</STRONG>   and the termcap library (like the one in BSD/OS 1.1 and GNU)  reads
2370            the  whole entry into the buffer, no matter what its length, to see
2371            if it is the entry it wants,
2372
2373        <STRONG>o</STRONG>   and <STRONG>tgetent</STRONG> is searching for a terminal type  that  either  is  the
2374            long  entry,  appears  in the termcap file after the long entry, or
2375            does not appear in the file at all (so that <STRONG>tgetent</STRONG> has  to  search
2376            the whole termcap file).
2377
2378        Then  <STRONG>tgetent</STRONG>  will  overwrite  memory, perhaps its stack, and probably
2379        core  dump  the  program.   Programs  like  telnet   are   particularly
2380        vulnerable;  modern  telnets  pass  along values like the terminal type
2381        automatically.  The results are almost as undesirable  with  a  termcap
2382        library,  like SunOS 4.1.3 and Ultrix 4.4, that prints warning messages
2383        when it reads an overly long  termcap  entry.   If  a  termcap  library
2384        truncates  long entries, like OSF/1 3.0, it is immune to dying here but
2385        will return incorrect data for the terminal.
2386
2387        The "after tc expansion" length will  have  a  similar  effect  to  the
2388        above, but only for people who actually set <EM>TERM</EM> to that terminal type,
2389        since <STRONG>tgetent</STRONG> only does "tc" expansion once it is  found  the  terminal
2390        type it was looking for, not while searching.
2391
2392        In  summary,  a termcap entry that is longer than 1023 bytes can cause,
2393        on various combinations of termcap libraries and applications,  a  core
2394        dump,  warnings, or incorrect operation.  If it is too long even before
2395        "tc" expansion, it will have this effect even for users of  some  other
2396        terminal  types  and  users whose <EM>TERM</EM> variable does not have a termcap
2397        entry.
2398
2399        When in -C (translate to termcap) mode, the <EM>ncurses</EM>  implementation  of
2400        <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>  issues  warning  messages  when the pre-tc length of a termcap
2401        translation is too long.  The -c (check) option  also  checks  resolved
2402        (after tc expansion) lengths.
2403
2404
2405 </PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
2406        <EM>/usr/share/terminfo</EM>
2407               compiled terminal description database directory
2408
2409
2410 </PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
2411        Searching    for   terminal   descriptions   in   <EM>$HOME/.terminfo</EM>   and
2412        <EM>TERMINFO</EM><STRONG>_</STRONG><EM>DIRS</EM> is not supported by older implementations.
2413
2414        Some SVr4 <STRONG>curses</STRONG> implementations, and all  previous  to  SVr4,  do  not
2415        interpret the %A and %O operators in parameter strings.
2416
2417        SVr4/XPG4  do  not  specify  whether <STRONG>msgr</STRONG> licenses movement while in an
2418        alternate-character-set mode (such modes may, among other  things,  map
2419        CR  and  NL  to  characters  that  do  not trigger local motions).  The
2420        <EM>ncurses</EM> implementation ignores <STRONG>msgr</STRONG> in <STRONG>ALTCHARSET</STRONG>  mode.   This  raises
2421        the  possibility  that  an  XPG4  implementation  making  the  opposite
2422        interpretation may need terminfo entries made for <EM>ncurses</EM> to have  <STRONG>msgr</STRONG>
2423        turned off.
2424
2425        The <EM>ncurses</EM> library handles insert-character and insert-character modes
2426        in a slightly non-standard way to get better  update  efficiency.   See
2427        the <STRONG>Insert/Delete</STRONG> <STRONG>Character</STRONG> subsection above.
2428
2429        The  parameter  substitutions  for  <STRONG>set_clock</STRONG> and <STRONG>display_clock</STRONG> are not
2430        documented in SVr4 or the XSI Curses standard.  They are  deduced  from
2431        the documentation for the AT&amp;T 505 terminal.
2432
2433        Be  careful  assigning the <STRONG>kmous</STRONG> capability.  The <EM>ncurses</EM> library wants
2434        to interpret it as <STRONG>KEY_MOUSE</STRONG>, for use by terminals and  emulators  like
2435        xterm  that can return mouse-tracking information in the keyboard-input
2436        stream.
2437
2438        X/Open Curses does not mention  italics.   Portable  applications  must
2439        assume  that  numeric  capabilities  are  signed  16-bit  values.  This
2440        includes the <EM>no</EM><STRONG>_</STRONG><EM>color</EM><STRONG>_</STRONG><EM>video</EM> (<STRONG>ncv</STRONG>) capability.   The  32768  mask  value
2441        used  for  italics with <STRONG>ncv</STRONG> can be confused with an absent or cancelled
2442        <STRONG>ncv</STRONG>.  If italics should work with colors, then the <STRONG>ncv</STRONG>  value  must  be
2443        specified, even if it is zero.
2444
2445        Different  commercial  ports  of  <EM>terminfo</EM> and <EM>curses</EM> support different
2446        subsets of XSI Curses and (in some cases) different  extensions.   Here
2447        is  a  summary, accurate as of October 1995, after which the commercial
2448        Unix market contracted and lost diversity.
2449
2450        <STRONG>o</STRONG>   SVr4, Solaris, and <EM>ncurses</EM> support all SVr4 capabilities.
2451
2452        <STRONG>o</STRONG>   IRIX supports the SVr4  set  and  adds  one  undocumented  extended
2453            string capability (<STRONG>set_pglen</STRONG>).
2454
2455        <STRONG>o</STRONG>   SVr1   and   Ultrix   support   a  restricted  subset  of  <EM>terminfo</EM>
2456            capabilities.  The Booleans end with <STRONG>xon_xoff</STRONG>;  the  numerics  with
2457            <STRONG>width_status_line</STRONG>; and the strings with <STRONG>prtr_non</STRONG>.
2458
2459        <STRONG>o</STRONG>   HP/UX   supports  the  SVr1  subset,  plus  the  SVr[234]  numerics
2460            <STRONG>num_labels</STRONG>,  <STRONG>label_height</STRONG>,  <STRONG>label_width</STRONG>,  plus  function  keys   11
2461            through  63, plus <STRONG>plab_norm</STRONG>, <STRONG>label_on</STRONG>, and <STRONG>label_off</STRONG>, plus a number
2462            of incompatible string table extensions.
2463
2464        <STRONG>o</STRONG>   AIX supports the SVr1 subset, plus function  keys  11  through  63,
2465            plus a number of incompatible string table extensions.
2466
2467        <STRONG>o</STRONG>   OSF/1 supports both the SVr4 set and the AIX extensions.
2468
2469
2470 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
2471        Do  not  count  on  compiled  (binary)  <EM>terminfo</EM> entries being portable
2472        between commercial Unix  systems.   At  least  two  implementations  of
2473        <EM>terminfo</EM> (those of HP-UX and AIX) diverged from those of other System V
2474        Unices after SVr1, adding extension capabilities to  the  string  table
2475        that  (in  the  binary format) collide with subsequent System V and XSI
2476        Curses extensions.
2477
2478
2479 </PRE><H2><a name="h2-AUTHORS">AUTHORS</a></H2><PRE>
2480        Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.  Based on <EM>pcurses</EM>
2481        by Pavel Curtis.
2482
2483
2484 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
2485        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,     <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>,    <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>,    <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,    <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>,
2486        <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,  <STRONG>printf(3)</STRONG>,  <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>,
2487        <STRONG><A HREF="term.5.html">term(5)</A></STRONG>, <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>
2488
2489
2490
2491 ncurses 6.4                       2024-01-13                       <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
2492 </PRE>
2493 <div class="nav">
2494 <ul>
2495 <li><a href="#h2-NAME">NAME</a></li>
2496 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
2497 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
2498 <ul>
2499 <li><a href="#h3-terminfo-Entry-Syntax">terminfo Entry Syntax</a></li>
2500 <li><a href="#h3-terminfo-Capabilities-Syntax">terminfo Capabilities Syntax</a></li>
2501 <li><a href="#h3-Similar-Terminals">Similar Terminals</a></li>
2502 <li><a href="#h3-Predefined-Capabilities">Predefined Capabilities</a></li>
2503 <li><a href="#h3-User-Defined-Capabilities">User-Defined Capabilities</a></li>
2504 <li><a href="#h3-A-Sample-Entry">A Sample Entry</a></li>
2505 <li><a href="#h3-Types-of-Capabilities">Types of Capabilities</a></li>
2506 <li><a href="#h3-Fetching-Compiled-Descriptions">Fetching Compiled Descriptions</a></li>
2507 <li><a href="#h3-Preparing-Descriptions">Preparing Descriptions</a></li>
2508 <li><a href="#h3-Basic-Capabilities">Basic Capabilities</a></li>
2509 <li><a href="#h3-Parameterized-Strings">Parameterized Strings</a></li>
2510 <li><a href="#h3-Cursor-Motions">Cursor Motions</a></li>
2511 <li><a href="#h3-Margins">Margins</a></li>
2512 <li><a href="#h3-Area-Clears">Area Clears</a></li>
2513 <li><a href="#h3-Insert_Delete-Line-and-Vertical-Motions">Insert/Delete Line and Vertical Motions</a></li>
2514 <li><a href="#h3-Insert_Delete-Character">Insert/Delete Character</a></li>
2515 <li><a href="#h3-Highlighting_Underlining_and-Visible-Bells">Highlighting, Underlining, and Visible Bells</a></li>
2516 <li><a href="#h3-Keypad-and-Function-Keys">Keypad and Function Keys</a></li>
2517 <li><a href="#h3-Tabs-and-Initialization">Tabs and Initialization</a></li>
2518 <li><a href="#h3-Delays-and-Padding">Delays and Padding</a></li>
2519 <li><a href="#h3-Status-Lines">Status Lines</a></li>
2520 <li><a href="#h3-Line-Graphics">Line Graphics</a></li>
2521 <li><a href="#h3-Color-Handling">Color Handling</a></li>
2522 <li><a href="#h3-Miscellaneous">Miscellaneous</a></li>
2523 <li><a href="#h3-Glitches-and-Brain-Damage">Glitches and Brain Damage</a></li>
2524 <li><a href="#h3-Pitfalls-of-Long-Entries">Pitfalls of Long Entries</a></li>
2525 </ul>
2526 </li>
2527 <li><a href="#h2-FILES">FILES</a></li>
2528 <li><a href="#h2-EXTENSIONS">EXTENSIONS</a></li>
2529 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
2530 <li><a href="#h2-AUTHORS">AUTHORS</a></li>
2531 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
2532 </ul>
2533 </div>
2534 </BODY>
2535 </HTML>