Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ terminfo(4) — Interactive 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

curses(3X)

printf(3S)

profile(4)

tput(1)

vi(1)

captoinfo(1M)

infocmp(1M)

tic(1M)

term(5)

tty(7)



          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          NAME
               terminfo - terminal capability data base

          SYNOPSIS
               /usr/lib/terminfo/?/*

          DESCRIPTION
               terminfo is a compiled database [see tic(1M)] describing the
               capabilities of terminals.  Terminals are described in ter-
               minfo source descriptions by giving a set of capabilities
               which they have, by describing how operations are performed,
               by describing padding requirements, and by specifying ini-
               tialization sequences.  This database is used, for example,
               by vi(1) and curses(3X), so they can work with a variety of
               terminals without changes to the programs.  To obtain the
               source description for a terminal, use the -I option of
               infocmp(1M).  When doing an infocmp for the terminal you are
               on, there is no difference between infocmp and infocmp -I.

               Entries in terminfo source files consist of a number of
               fields separated by commas.  White space after each comma is
               ignored.  The first line of each terminal description in the
               terminfo database gives the name by which terminfo knows the
               terminal, separated by bar ( | ) characters.  The first name
               given is the most common abbreviation for the terminal [this
               is the one to use to set the environment variable TERM in
               $HOME/.profile; see profile(4)]; the last name given should
               be a long name fully identifying the terminal, and all
               others are understood as synonyms for the terminal name.
               All names but the last should contain no blanks and must be
               unique in the first 14 characters; the last name may contain
               blanks for readability.

               Terminal names (except for the last verbose entry) should be
               chosen using the following conventions.  The particular
               piece of hardware making up the terminal should have a root
               name chosen, for example, for the AT&T 4425 terminal,
               att4425.  Modes that the hardware can be in, or user prefer-
               ences, should be indicated by appending a hyphen and an
               indicator of the mode.  See term(5) for examples and more
               information on choosing names and synonyms.

             PART 1: TERMINAL CAPABILITIES
               Capabilities in terminfo are of three types:  boolean capa-
               bilities (which show that the terminal has some particular
               feature), numeric capabilities (which specify the size of
               the terminal or particular features), and string capabili-
               ties (which provide a sequence that can be used to perform
               particular terminal operations).

               In the following tables, a Variable is the name by which a C
               programmer accesses a capability (at the terminfo level).  A
               Capname is the short name for a capability used in the


          Rev.                                                       Page 1





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               source description.  It is used by a person updating the
               database and by the tput(1) command when asking what the
               value of the capability is for a particular terminal.  A
               Termcap Code is a two-letter code that corresponds to the
               old termcap capability name.

               Capability names have no hard length limit, but an informal
               limit of five characters has been adopted to keep them
               short.  Whenever possible, names are chosen to be the same
               as or similar to those specified by the ANSI X3.64-1979
               standard.  Semantics are also intended to match those of the
               ANSI standard.

               All string capabilities listed below may have padding speci-
               fied, with the exception of those used for input.  Input
               capabilities, listed under the Strings section in the fol-
               lowing table, have names beginning with key_.  The following
               indicators may appear at the end of the Description for a
               variable.

               (G)  indicates that the string is passed through tparm()
                    with parameters (parms) as given (#i)

               (*)  indicates that padding may be based on the number of
                    lines affected

               (#i) indicates the ith parameter




























          Rev.                                                       Page 2





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Booleans
                  Variable           Cap-    Termcap                      Description
                                     name    Code
          auto_left_margin           bw      bw        cub1 wraps from column 0 to last column
          auto_right_margin          am      am        Terminal has automatic margins
          back_color_erase           bce     be        Screen erased with background color
          can_change                 ccc     cc        Terminal can re-define existing color
          ceol_standout_glitch       xhp     xs        Standout not erased by overwriting (hp)
          col_addr_glitch            xhpa    YA        Only positive motion for hpa/mhpa caps
          cpi_changes_res            cpix    YF        Changing character pitch changes resolution
          cr_cancels_micro_mode      crxm    YB        Using cr turns off micro mode
          eat_newline_glitch         xenl    xn        Newline ignored after 80 columns (Concept)
          erase_overstrike           eo      eo        Can erase overstrikes with a blank
          generic_type               gn      gn        Generic line type (e.g., dialup, switch)
          hard_copy                  hc      hc        Hardcopy terminal
          hard_cursor                chts    HC        Cursor is hard to see
          has_meta_key               km      km        Has a meta key (shift, sets parity bit)
          has_print_wheel            daisy   YC        Printer needs operator to change character set
          has_status_line            hs      hs        Has extra "status line"
          hue_lightness_saturation   hls     hl        Terminal uses only HLS color notation (Tektronix)
          insert_null_glitch         in      in        Insert mode distinguishes nulls
          lpi_changes_res            lpix    YG        Changing line pitch changes resolution
          memory_above               da      da        Display may be retained above the screen
          memory_below               db      db        Display may be retained below the screen
          move_insert_mode           mir     mi        Safe to move while in insert mode
          move_standout_mode         msgr    ms        Safe to move in standout modes
          needs_xon_xoff             nxon    nx        Padding won't work, xon/xoff required
          no_esc_ctlc                xsb     xb        Beehive (f1=escape, f2=ctrl C)
          no_pad_char                npc     NP        Pad character doesn't exist
          non_dest_scroll_region     ndscr   ND        Scrolling region is non-destructive
          non_rev_rmcup              nrrmc   NR        smcup does not reverse rmcup
          over_strike                os      os        Terminal overstrikes on hard-copy terminal
          prtr_silent                mc5i    5i        Printer won't echo on screen
          row_addr_glitch            xvpa    YD        Only positive motion for vpa/mvpa caps
          semi_auto_right_margin     sam     YE         Printing in last column causes cr
          status_line_esc_ok         eslok   es        Escape can be used on the status line
          dest_tabs_magic_smso       xt      xt        Destructive tabs, magic smso char (t1061)
          tilde_glitch               hz      hz        Hazeltine; can't print tilde (~)
          transparent_underline      ul      ul        Underline character overstrikes
          xon_xoff                   xon     xo        Terminal uses xon/xoff handshaking















          Rev.                                                       Page 3





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Numbers
                Variable         Cap-     Termcap                     Description
                                 name     Code
          buffer_capacity        bufsz    Ya        Number of bytes buffered before printing
          columns                cols     co        Number of columns in a line
          dot_vert_spacing       spinv    Yb        Spacing of pins vertically in pins per inch
          dot_horz_spacing       spinh    Yc        Spacing of dots horizontally in dots per inch
          init_tabs              it       it        Tabs initially every # spaces
          label_height           lh       lh        Number of rows in each label
          label_width            lw       lw        Number of columns in each label
          lines                  lines    li        Number of lines on a screen or a page
          lines_of_memory        lm       lm        Lines of memory if > lines; 0 means varies
          magic_cookie_glitch    xmc      sg        Number of blank characters left by smso or rmso
          max_attributes         ma       ma        Maximum combined video attributes terminal can
                                                    display
          max_colors             colors   Co        Maximum number of colors on the screen
          max_micro_address      maddr    Yd        Maximum value in micro_..._address
          max_micro_jump         mjump    Ye        Maximum value in parm_..._micro
          max_pairs              pairs    pa        Maximum number of color-pairs on the screen
          maximum_windows        wnum     MW        Maximum number of definable windows
          micro_col_size         mcs      Yf        Character step size when in micro mode
          micro_line_size        mls      Yg        Line step size when in micro mode
          no_color_video         ncv      NC        Video attributes that can't be used with colors
          number_of_pins         npins    Yh        Number of pins in print-head
          num_labels             nlab     Nl        Number of labels on screen (start at 1)
          output_res_char        orc      Yi        Horizontal resolution in units per character
          output_res_line        orl      Yj        Vertical resolution in units per line
          output_res_horz_inch   orhi     Yk        Horizontal resolution in units per inch
          output_res_vert_inch   orvi     Yl        Vertical resolution in units per inch
          padding_baud_rate      pb       pb        Lowest baud rate where padding needed
          print_rate             cps      Ym        Print rate in characters per second
          virtual_terminal       vt       vt        Virtual terminal number (UNIX system)
          wide_char_size         widcs    Yn        Character step size when in double wide mode
          width_status_line      wsl      ws        Number of columns in status line





















          Rev.                                                       Page 4





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Strings
                 Variable          Cap-    Termcap                     Description
                                   name    Code
          acs_chars                acsc    ac        Graphic charset pairs aAbBcC - def=vt100
          back_tab                 cbt     bt        Back tab
          bell                     bel     bl        Audible signal (bell)
          carriage_return          cr      cr        Carriage return (*)
          change_char_pitch        cpi     ZA        Change number of characters per inch(dg
          change_line_pitch        lpi     ZB        Change number of lines per inch(dg
          change_res_horz          chr     ZC        Change horizontal resolution(dg
          change_res_vert          cvr     ZD        Change vertical resolution(dg
          change_scroll_region     csr     cs        Change to lines #1 through #2 (vt100) (G)
          char_padding             rmp     rP        Like ip but when in replace mode
          char_set_names           csnm    Zy        List of character set names
          clear_all_tabs           tbc     ct        Clear all tab stops
          clear_margins            mgc     MC        Clear all margins (top, bottom, and sides)
          clear_screen             clear   cl        Clear screen and home cursor (*)
          clr_bol                  el1     cb        Clear to beginning of line, inclusive
          clr_eol                  el      ce        Clear to end of line
          clr_eos                  ed      cd        Clear to end of display (*)
          column_address           hpa     ch        Horizontal position absolute (G)
          command_character        cmdch   CC        Terminal settable cmd character in prototype
          create_window            cwin    CW        Define win #1 to go from #2,#3 to #4,#5
          cursor_address           cup     cm        Move to row #1 col #2 (G)
          cursor_down              cud1    do        Down one line
          cursor_home              home    ho        Home cursor (if no cup)
          cursor_invisible         civis   vi        Make cursor invisible
          cursor_left              cub1    le        Move left one space.
          cursor_mem_address       mrcup   CM        Memory relative cursor addressing (G)
          cursor_normal            cnorm   ve        Make cursor appear normal (undo vs/vi)
          cursor_right             cuf1    nd        Non-destructive space (cursor or carriage right)
          cursor_to_ll             ll      ll        Last line, first column (if no cup)
          cursor_up                cuu1    up        Upline (cursor up)
          cursor_visible           cvvis   vs        Make cursor very visible
          define_char              defc    ZE        Define a character in a character set†
          delete_character         dch1    dc        Delete character (*)
          delete_line              dl1     dl        Delete line (*)
          delete_phone             dial    DI        Dial phone number #1
          dis_status_line          dsl     ds        Disable status line
          display_clock            dclk    DK        Display time-of-day clock
          down_half_line           hd      hd        Half-line down (forward 1/2 linefeed)
          ena_acs                  enacs   eA        Enable alternate character set
          enter_alt_charset_mode   smacs   as        Start alternate character set
          enter_am_mode            smam    SA        Turn on automatic margins
          enter_blink_mode         blink   mb        Turn on blinking
          enter_bold_mode          bold    md        Turn on bold (extra bright) mode
          enter_ca_mode            smcup   ti        String to begin programs that use cup
          enter_delete_mode        smdc    dm        Delete mode (enter)
          enter_dim_mode           dim     mh        Turn on half-bright mode
          enter_doublewide_mode    swidm   ZF        Enable double wide printing





          Rev.                                                       Page 5





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



                  Variable            Cap-    Termcap                  Description
                                      name    Code
          enter_draft_quality         sdrfq   ZG        Set draft quality print
          enter_insert_mode           smir    im        Insert mode (enter)
          enter_italics_mode          sitm    ZH        Enable italics
          enter_leftward_mode         slm     ZI        Enable leftward carriage motion
          enter_micro_mode            smicm   ZJ        Enable micro motion capabilities
          enter_near_letter_quality   snlq    ZK        Set near-letter quality print
          enter_normal_quality        snrmq   ZL        Set normal quality print
          enter_protected_mode        prot    mp        Turn on protected mode
          enter_reverse_mode          rev     mr        Turn on reverse video mode
          enter_secure_mode           invis   mk        Turn on blank mode (characters invisible)
          enter_shadow_mode           sshm    ZM        Enable shadow printing
          enter_standout_mode         smso    so        Begin standout mode
          enter_subscript_mode        ssubm   ZN        Enable subscript printing
          enter_superscript_mode      ssupm   ZO        Enable superscript printing
          enter_underline_mode        smul    us        Start underscore mode
          enter_upward_mode           sum     ZP        Enable upward carriage motion
          enter_xon_mode              smxon   SX        Turn on xon/xoff handshaking
          erase_chars                 ech     ec        Erase #1 characters (G)
          exit_alt_charset_mode       rmacs   ae        End alternate character set
          exit_am_mode                rmam    RA        Turn off automatic margins
          exit_attribute_mode         sgr0    me        Turn off all attributes
          exit_ca_mode                rmcup   te        String to end programs that use cup
          exit_delete_mode            rmdc    ed        End delete mode
          exit_doublewide_mode        rwidm   ZQ        Disable double wide printing
          exit_insert_mode            rmir    ei        End insert mode
          exit_italics_mode           ritm    ZR        Disable italics
          exit_leftward_mode          rlm     ZS        Enable rightward (normal) carriage motion
          exit_micro_mode             rmicm   ZT        Disable micro motion capabilities
          exit_shadow_mode            rshm    ZU        Disable shadow printing
          exit_standout_mode          rmso    se        End standout mode
          exit_subscript_mode         rsubm   ZV        Disable subscript printing
          exit_superscript_mode       rsupm   ZW        Disable superscript printing
          exit_underline_mode         rmul    ue        End underscore mode
          exit_upward_mode            rum     ZX        Enable downward (normal) carriage motion
          exit_xon_mode               rmxon   RX        Turn off xon/xoff handshaking
          fixed_pause                 pause   PA        Pause for 2-3 seconds
          flash_hook                  hook    fh        Flash the switch hook
          flash_screen                flash   vb        Visible bell (may not move cursor)
          form_feed                   ff      ff        Hardcopy terminal page eject (*)
          from_status_line            fsl     fs        Return from status line
          goto_window                 wingo   WG        Go to window #1
          hangup                      hup     HU        Hang-up phone
          init_1string                is1     i1        Terminal or printer initialization string
          init_2string                is2     is        Terminal or printer initialization string
          init_3string                is3     i3        Terminal or printer initialization string
          init_file                   if      if        Name of initialization file
          init_prog                   iprog   iP        Path name of program for initialization
          initialize_color            initc   Ic        Initialize the definition of color





          Rev.                                                       Page 6





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



              Variable       Cap-    Termcap                      Description
                             name    Code
          initialize_pair    initp   Ip        Initialize color-pair
          insert_character   ich1    ic        Insert character
          insert_line        il1     al        Add new blank line (*)
          insert_padding     ip      ip        Insert pad after character inserted (*)
          key_a1             ka1     K1        KEY_A1, 0534, upper left of keypad
          key_a3             ka3     K3        KEY_A3, 0535, upper right of keypad
          key_b2             kb2     K2        KEY_B2, 0536, center of keypad
          key_backspace      kbs     kb        KEY_BACKSPACE, 0407, sent by backspace key
          key_beg            kbeg    @1        KEY_BEG, 0542, sent by beg(inning) key
          key_btab           kcbt    kB        KEY_BTAB, 0541, sent by back-tab key
          key_c1             kc1     K4        KEY_C1, 0537, lower left of keypad
          key_c3             kc3     K5        KEY_C3, 0540, lower right of keypad
          key_cancel         kcan    @2        KEY_CANCEL, 0543, sent by cancel key
          key_catab          ktbc    ka        KEY_CATAB, 0526, sent by clear-all-tabs key
          key_clear          kclr    kC        KEY_CLEAR, 0515, sent by clear-screen or erase
                                               key
          key_close          kclo    @3        KEY_CLOSE, 0544, sent by close key
          key_command        kcmd    @4        KEY_COMMAND, 0545, sent by cmd (command)
                                               key
          key_copy           kcpy    @5        KEY_COPY, 0546, sent by copy key
          key_create         kcrt    @6        KEY_CREATE, 0547, sent by create key
          key_ctab           kctab   kt        KEY_CTAB, 0525, sent by clear-tab key
          key_dc             kdch1   kD        KEY_DC, 0512, sent by delete-character key
          key_dl             kdl1    kL        KEY_DL, 0510, sent by delete-line key
          key_down           kcud1   kd        KEY_DOWN, 0402, sent by terminal down-arrow
                                               key
          key_eic            krmir   kM        KEY_EIC, 0514, sent by rmir or smir in insert mode
          key_end            kend    @7        KEY_END, 0550, sent by end key
          key_enter          kent    @8        KEY_ENTER, 0527, sent by enter/send key
          key_eol            kel     kE        KEY_EOL, 0517, sent by clear-to-end-of-line key
          key_eos            ked     kS        KEY_EOS, 0516, sent by clear-to-end-of-screen key
          key_exit           kext    @9        KEY_EXIT, 0551, sent by exit key
          key_f0             kf0     k0        KEY_F(0), 0410, sent by function key f0
          key_f1             kf1     k1        KEY_F(1), 0411, sent by function key f1
          key_f2             kf2     k2        KEY_F(2), 0412, sent by function key f2
          key_f3             kf3     k3        KEY_F(3), 0413, sent by function key f3
          key_f4             kf4     k4        KEY_F(4), 0414, sent by function key f4
          key_f5             kf5     k5        KEY_F(5), 0415, sent by function key f5
          key_f6             kf6     k6        KEY_F(6), 0416, sent by function key f6
          key_f7             kf7     k7        KEY_F(7), 0417, sent by function key f7
          key_f8             kf8     k8        KEY_F(8), 0420, sent by function key f8
          key_f9             kf9     k9        KEY_F(9), 0421, sent by function key f9
          key_f10            kf10    k;        KEY_F(10), 0422, sent by function key f10
          key_f11            kf11    F1        KEY_F(11), 0423, sent by function key f11
          key_f12            kf12    F2        KEY_F(12), 0424, sent by function key f12
          key_f13            kf13    F3        KEY_F(13), 0425, sent by function key f13
          key_f14            kf14    F4        KEY_F(14), 0426, sent by function key f14
          key_f15            kf15    F5        KEY_F(15), 0427, sent by function key f15





          Rev.                                                       Page 7





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



           Variable     Cap-   Termcap                  Description
                        name   Code
          key_f16       kf16   F6        KEY_F(16), 0430, sent by function key f16
          key_f17       kf17   F7        KEY_F(17), 0431, sent by function key f17
          key_f18       kf18   F8        KEY_F(18), 0432, sent by function key f18
          key_f19       kf19   F9        KEY_F(19), 0433, sent by function key f19
          key_f20       kf20   FA        KEY_F(20), 0434, sent by function key f20
          key_f21       kf21   FB        KEY_F(21), 0435, sent by function key f21
          key_f22       kf22   FC        KEY_F(22), 0436, sent by function key f22
          key_f23       kf23   FD        KEY_F(23), 0437, sent by function key f23
          key_f24       kf24   FE        KEY_F(24), 0440, sent by function key f24
          key_f25       kf25   FF        KEY_F(25), 0441, sent by function key f25
          key_f26       kf26   FG        KEY_F(26), 0442, sent by function key f26
          key_f27       kf27   FH        KEY_F(27), 0443, sent by function key f27
          key_f28       kf28   FI        KEY_F(28), 0444, sent by function key f28
          key_f29       kf29   FJ        KEY_F(29), 0445, sent by function key f29
          key_f30       kf30   FK        KEY_F(30), 0446, sent by function key f30
          key_f31       kf31   FL        KEY_F(31), 0447, sent by function key f31
          key_f32       kf32   FM        KEY_F(32), 0450, sent by function key f32
          key_f33       kf33   FN        KEY_F(13), 0451, sent by function key f13
          key_f34       kf34   FO        KEY_F(34), 0452, sent by function key f34
          key_f35       kf35   FP        KEY_F(35), 0453, sent by function key f35
          key_f36       kf36   FQ        KEY_F(36), 0454, sent by function key f36
          key_f37       kf37   FR        KEY_F(37), 0455, sent by function key f37
          key_f38       kf38   FS        KEY_F(38), 0456, sent by function key f38
          key_f39       kf39   FT        KEY_F(39), 0457, sent by function key f39
          key_f40       kf40   FU        KEY_F(40), 0460, sent by function key f40
          key_f41       kf41   FV        KEY_F(41), 0461, sent by function key f41
          key_f42       kf42   FW        KEY_F(42), 0462, sent by function key f42
          key_f43       kf43   FX        KEY_F(43), 0463, sent by function key f43
          key_f44       kf44   FY        KEY_F(44), 0464, sent by function key f44
          key_f45       kf45   FZ        KEY_F(45), 0465, sent by function key f45
          key_f46       kf46   Fa        KEY_F(46), 0466, sent by function key f46
          key_f47       kf47   Fb        KEY_F(47), 0467, sent by function key f47
          key_f48       kf48   Fc        KEY_F(48), 0470, sent by function key f48
          key_f49       kf49   Fd        KEY_F(49), 0471, sent by function key f49
          key_f50       kf50   Fe        KEY_F(50), 0472, sent by function key f50
          key_f51       kf51   Ff        KEY_F(51), 0473, sent by function key f51
          key_f52       kf52   Fg        KEY_F(52), 0474, sent by function key f52
          key_f53       kf53   Fh        KEY_F(53), 0475, sent by function key f53
          key_f54       kf54   Fi        KEY_F(54), 0476, sent by function key f54
          key_f55       kf55   Fj        KEY_F(55), 0477, sent by function key f55
          key_f56       kf56   Fk        KEY_F(56), 0500, sent by function key f56
          key_f57       kf57   Fl        KEY_F(57), 0501, sent by function key f57
          key_f58       kf58   Fm        KEY_F(58), 0502, sent by function key f58
          key_f59       kf59   Fn        KEY_F(59), 0503, sent by function key f59
          key_f60       kf60   Fo        KEY_F(60), 0504, sent by function key f60
          key_f61       kf61   Fp        KEY_F(61), 0505, sent by function key f61
          key_f62       kf62   Fq        KEY_F(62), 0506, sent by function key f62
          key_f63       kf63   Fr        KEY_F(63), 0507, sent by function key f63





          Rev.                                                       Page 8





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



            Variable      Cap-    Termcap                      Description
                          name    Code
          key_find        kfnd    @0        KEY_FIND, 0552, sent by find key
          key_help        khlp    %1        KEY_HELP, 0553, sent by help key
          key_home        khome   kh        KEY_HOME, 0406, sent by home key
          key_ic          kich1   kI        KEY_IC, 0513, sent by ins-char/enter ins-mode key
          key_il          kil1    kA        KEY_IL, 0511, sent by insert-line key
          key_left        kcub1   kl        KEY_LEFT, 0404, sent by terminal left-arrow key
          key_ll          kll     kH        KEY_LL, 0533, sent by home-down key
          key_mark        kmrk    %2        KEY_MARK, 0554, sent by mark key
          key_message     kmsg    %3        KEY_MESSAGE, 0555, sent by message key
          key_move        kmov    %4        KEY_MOVE, 0556, sent by move key
          key_next        knxt    %5        KEY_NEXT, 0557, sent by next-object key
          key_npage       knp     kN        KEY_NPAGE, 0522, sent by next-page key
          key_open        kopn    %6        KEY_OPEN, 0560, sent by open key
          key_options     kopt    %7        KEY_OPTIONS, 0561, sent by options key
          key_ppage       kpp     kP        KEY_PPAGE, 0523, sent by previous-page key
          key_previous    kprv    %8        KEY_PREVIOUS, 0562, sent by previous-object
                                            key
          key_print       kprt    %9        KEY_PRINT, 0532, sent by print or copy key
          key_redo        krdo    %0        KEY_REDO, 0563, sent by redo key
          key_reference   kref    &1        KEY_REFERENCE, 0564, sent by ref(erence) key
          key_refresh     krfr    &2        KEY_REFRESH, 0565, sent by refresh key
          key_replace     krpl    &3        KEY_REPLACE, 0566, sent by replace key
          key_restart     krst    &4        KEY_RESTART, 0567, sent by restart key
          key_resume      kres    &5        KEY_RESUME, 0570, sent by resume key
          key_right       kcuf1   kr        KEY_RIGHT, 0405, sent by terminal right-arrow
                                            key
          key_save        ksav    &6        KEY_SAVE, 0571, sent by save key
          key_sbeg        kBEG    &9        KEY_SBEG, 0572, sent by shifted beginning key
          key_scancel     kCAN    &0        KEY_SCANCEL, 0573, sent by shifted cancel key
          key_scommand    kCMD    *1        KEY_SCOMMAND, 0574, sent by shifted
                                            command key
          key_scopy       kCPY    *2        KEY_SCOPY, 0575, sent by shifted copy key
          key_screate     kCRT    *3        KEY_SCREATE, 0576, sent by shifted create key
          key_sdc         kDC     *4        KEY_SDC, 0577, sent by shifted delete-char key
          key_sdl         kDL     *5        KEY_SDL, 0600, sent by shifted delete-line key
          key_select      kslt    *6        KEY_SELECT, 0601, sent by select key
          key_send        kEND    *7        KEY_SEND, 0602, sent by shifted end key
          key_seol        kEOL    *8        KEY_SEOL, 0603, sent by shifted clear-line key
          key_sexit       kEXT    *9        KEY_SEXIT, 0604, sent by shifted exit key
          key_sf          kind    kF        KEY_SF, 0520, sent by scroll-forward/down key
          key_sfind       kFND    *0        KEY_SFIND, 0605, sent by shifted find key
          key_shelp       kHLP    #1        KEY_SHELP, 0606, sent by shifted help key
          key_shome       kHOM    #2        KEY_SHOME, 0607, sent by shifted home key
          key_sic         kIC     #3        KEY_SIC, 0610, sent by shifted input key
          key_sleft       kLFT    #4        KEY_SLEFT, 0611, sent by shifted left-arrow key
          key_smessage    kMSG    %a        KEY_SMESSAGE, 0612, sent by shifted message
                                            key
          key_smove       kMOV    %b        KEY_SMOVE, 0613, sent by shifted move key





          Rev.                                                       Page 9





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



                Variable         Cap-     Termcap                     Description
                                 name     Code
          key_snext              kNXT     %c        KEY_SNEXT, 0614, sent by shifted next key
          key_soptions           kOPT     %d        KEY_SOPTIONS, 0615, sent by shifted options key
          key_sprevious          kPRV     %e        KEY_SPREVIOUS, 0616, sent by shifted prev key
          key_sprint             kPRT     %f        KEY_SPRINT, 0617, sent by shifted print key
          key_sr                 kri      kR        KEY_SR, 0521, sent by scroll-backward/up key
          key_sredo              kRDO     %g        KEY_SREDO, 0620, sent by shifted redo key
          key_sreplace           kRPL     %h        KEY_SREPLACE, 0621, sent by shifted replace
                                                    key
          key_sright             kRIT     %i        KEY_SRIGHT, 0622, sent by shifted right-arrow
                                                    key
          key_srsume             kRES     %j        KEY_SRSUME, 0623, sent by shifted resume key
          key_ssave              kSAV     !1        KEY_SSAVE, 0624, sent by shifted save key
          key_ssuspend           kSPD     !2        KEY_SSUSPEND, 0625, sent by shifted suspend
                                                    key
          key_stab               khts     kT        KEY_STAB, 0524, sent by set-tab key
          key_sundo              kUND     !3        KEY_SUNDO, 0626, sent by shifted undo key
          key_suspend            kspd     &7        KEY_SUSPEND, 0627, sent by suspend key
          key_undo               kund     &8        KEY_UNDO, 0630, sent by undo key
          key_up                 kcuu1    ku        KEY_UP, 0403, sent by terminal up-arrow key
          keypad_local           rmkx     ke        Out of ``keypad-transmit'' mode
          keypad_xmit            smkx     ks        Put terminal in ``keypad-transmit'' mode
          lab_f0                 lf0      l0        Labels on function key f0 if not f0
          lab_f1                 lf1      l1        Labels on function key f1 if not f1
          lab_f2                 lf2      l2        Labels on function key f2 if not f2
          lab_f3                 lf3      l3        Labels on function key f3 if not f3
          lab_f4                 lf4      l4        Labels on function key f4 if not f4
          lab_f5                 lf5      l5        Labels on function key f5 if not f5
          lab_f6                 lf6      l6        Labels on function key f6 if not f6
          lab_f7                 lf7      l7        Labels on function key f7 if not f7
          lab_f8                 lf8      l8        Labels on function key f8 if not f8
          lab_f9                 lf9      l9        Labels on function key f9 if not f9
          lab_f10                lf10     la        Labels on function key f10 if not f10
          label_format           fln      Lf        Label format
          label_off              rmln     LF        Turn off soft labels
          label_on               smln     LO        Turn on soft labels
          meta_off               rmm      mo        Turn off "meta mode"
          meta_on                smm      mm        Turn on "meta mode" (8th bit)
          micro_column_address   mhpa     ZY        Like column_address for micro adjustment†
          micro_down             mcud1    ZZ        Like cursor_down for micro adjustment
          micro_left             mcub1    Za        Like cursor_left for micro adjustment
          micro_right            mcuf1    Zb        Like cursor_right for micro adjustment
          micro_row_address      mvpa     Zc        Like row_address for micro adjustment†
          micro_up               mcuu1    Zd        Like cursor_up for micro adjustment
          newline                nel      nw        Newline (behaves like cr followed by lf)
          order_of_pins          porder   Ze        Matches software bits to print-head pins
          orig_colors            oc       oc        Set all color(-pair)s to the original ones
          orig_pair              op       op        Set default color-pair to the original one
          pad_char               pad      pc        Pad character (rather than null)





          Rev.                                                      Page 10





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



                 Variable          Cap-     Termcap                     Description
                                   name     Code
          parm_dch                  dch     DC        Delete #1 chars (G*)
          parm_delete_line         dl       DL        Delete #1 lines (G*)
          parm_down_cursor         cud      DO        Move down #1 lines. (G*)
          parm_down_micro          mcud     Zf        Like parm_down_cursor for micro adjust. (G*)
          parm_ich                 ich      IC        Insert #1 blank chars (G*)
          parm_index               indn     SF        Scroll forward #1 lines. (G)
          parm_insert_line         il       AL        Add #1 new blank lines (G*)
          parm_left_cursor         cub      LE        Move cursor left #1 spaces (G)
          parm_left_micro          mcub     Zg        Like parm_left_cursor for micro adjust.†
          parm_right_cursor        cuf      RI        Move right #1 spaces. (G*)
          parm_right_micro         mcuf     Zh        Like parm_right_cursor for micro adjust.†
          parm_rindex              rin      SR        Scroll backward #1 lines. (G)
          parm_up_cursor           cuu      UP        Move cursor up #1 lines. (G*)
          parm_up_micro            mcuu     Zi        Like parm_up_cursor for micro adjust.†
          pkey_key                  pfkey   pk        Prog funct key #1 to type string #2
          pkey_local               pfloc    pl        Prog funct key #1 to execute string #2
          pkey_xmit                pfx      px        Prog funct key #1 to xmit string #2
          plab_norm                pln      pn        Prog label #1 to show string #2
          print_screen             mc0      ps        Print contents of the screen
          prtr_non                 mc5p     pO        Turn on the printer for #1 bytes
          prtr_off                 mc4      pf        Turn off the printer
          prtr_on                  mc5      po        Turn on the printer
          pulse                    pulse    PU        Select pulse dialing
          quick_dial               qdial    QD        Dial phone number #1, without progress detection
          remove_clock             rmclk    RC        Remove time-of-day clock
          repeat_char              rep      rp        Repeat char #1 #2 times (G*)
          req_for_input            rfi      RF        Send next input char (for ptys)
          reset_1string            rs1      r1        Reset terminal completely to sane modes
          reset_2string            rs2      r2        Reset terminal completely to sane modes
          reset_3string            rs3      r3        Reset terminal completely to sane modes
          reset_file               rf       rf        Name of file containing reset string
          restore_cursor           rc       rc        Restore cursor to position of last sc
          row_address              vpa      cv        Vertical position absolute (G)
          save_cursor              sc       sc        Save cursor position
          scroll_forward           ind      sf        Scroll text up
          scroll_reverse           ri       sr        Scroll text down
          select_char_set          scs      Zj        Select character set†
          set_attributes           sgr      sa        Define the video attributes (G) #1-#9
          set_background           setb     Sb        Set current background color
          set_bottom_margin        smgb     Zk        Set bottom margin at current line
          set_bottom_margin_parm   smgbp    Zl        Set bottom margin at line #1†
          set_clock                sclk     SC        Set time-of-day clock
          set_color_pair           scp      sp        Set current color-pair
          set_foreground           setf     Sf        Set current foreground color1
          set_left_margin          smgl     ML        Set left margin at current line
          set_left_margin_parm     smglp    Zm        Set left margin at column #1†
          set_right_margin         smgr     MR        Set right margin at current column
          set_right_margin_parm    smgrp    Zn        Set right margin at column #1†





          Rev.                                                      Page 11





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



                 Variable          Cap-    Termcap                   Description
                                   name    Code
          set_tab                  hts     st        Set a tab in all rows, current column
          set_top_margin           smgt    Zo        Set top margin at current line
          set_top_margin_parm      smgtp   Zp        Set top margin at line #1†
          set_window               wind    wi        Current window is lines #1-#2 cols #3-#4 (G)
          start_bit_image          sbim    Zq        Start printing bit image graphics†
          start_char_set_def       scsd    Zr        Start definition of a character set†
          stop_bit_image           rbim    Zs        End printing bit image graphics
          stop_char_set_def        rcsd    Zt        End definition of a character set
          subscript_characters     subcs   Zu        List of ``subscript-able'' characters
          superscript_characters   supcs   Zv        List of ``superscript-able'' characters
          tab                      ht      ta        Tab to next 8-space hardware tab stop
          these_cause_cr           docr    Zw        Printing any of these chars causes cr
          to_status_line           tsl     ts        Go to status line, col #1 (G)
          tone                     tone    TO        Select touch tone dialing
          underline_char           uc      uc        Underscore one char and move past it
          up_half_line             hu      hu        Half-line up (reverse 1/2 linefeed)
          user0                    u0      u0        User string 0
          user1                    u1      u1        User string 1
          user2                    u2      u2        User string 4
          user3                    u3      u3        User string 3
          user4                    u4      u4        User string 4
          user5                    u5      u5        User string 5
          user6                    u6      u6        User string 6
          user7                    u7      u7        User string 7
          user8                    u8      u8        User string 8
          user9                    u9      u9        User string 9
          wait_tone                wait    WA        Wait for dial tone
          xoff_character           xoffc   XF        X-off character
          xon_character            xonc    XN        X-on character
          zero_motion              zerom   Zx        No motion for the subsequent character























          Rev.                                                      Page 12





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Booleans
          Cap-            Variable           Termcap                    Description
          name                               Code
          am      auto_right_margin          am        Terminal has automatic margins
          bw      auto_left_margin           bw        cub1 wraps from column 0 to last column
          ccc     can_change                 cc        Terminal can re-define existing color
          chts    hard_cursor                HC        Cursor is hard to see
          cpix    cpi_changes_res            YF        Changing character pitch changes resolution
          cps     print_rate                 Ym        Print rate in characters per second
          crxm    cr_cancels_micro_modem     YB        Using cr turns off micro mode
          cwin    create_window              CW        Define win #1 to go from #2,#3 to #4,#5
          da      memory_above               da        Display may be retained above the screen
          daisy   has_print_wheel            YC        Printer needs operator to change character set
          dclk    display_clock              DK        Display time-of-day clock
          db      memory_below               db        Display may be retained below the screen
          dial    dial_phone                 DI        Dial phone number #1
          eo      erase_overstrike           eo        Can erase overstrikes with a blank
          eslok   status_line_esc_ok         es        Escape can be used on the status line
          gn      generic_type               gn        Generic line type (e.g., dialup, switch)
          hc      hard_copy                  hc        Hardcopy terminal
          hls     hue_lightness_saturation   hl        Terminal uses only HLS color notation
                                                       (Tektronix)
          hs      has_status_line            hs        Has extra "status line"
          hz      tilde_glitch               hz        Hazeltine; can't print tilde (~)
          in      insert_null_glitch         in        Insert mode distinguishes nulls
          km      has_meta_key               km        Has a meta key (shift, sets parity bit)
          lpix    lpi_changes_res            YG        Changing line pitch changes resolution
          mc5i    prtr_silent                5i        Printer won't echo on screen
          mir     move_insert_mode           mi        Safe to move while in insert mode
          msgr    move_standout_mode         ms        Safe to move in standout modes
          npc     no_pad_char                NP        Pad character doesn't exist
          nrrmc   non_rev_rmcup              NR        smcup does not reverse rmcup
          nxon    needs_xon_xoff             nx        Padding won't work, xon/xoff required
          os      over_strike                os        Terminal overstrikes on hard-copy terminal
          sam     semi_auto_right_margin     YE        Printing in last column causes cr
          ul      transparent_underline      ul        Underline character overstrikes
          xenl    eat_newline_glitch         xn        Newline ignored after 80 columns (Concept)
          xhp     ceol_standout_glitch       xs        Standout not erased by overwriting (hp)
          xhpa    col_addr_glitch            YA        Only positive motion for hpa/mhpa caps
          xon     xon_xoff                   xo        Terminal uses xon/xoff handshaking
          xsb     no_esc_ctlc                xb        Beehive (f1=escape, f2=ctrl C)
          xt      dest_tabs_magic_smso       xt        Destructive tabs, magic smso char (t1061)
          xvpa    row_addr_glitch            YD        Only positive motion for vpa/mvpa caps












          Rev.                                                      Page 13





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Numbers
          Cap-           Variable         Termcap                     Description
          name                            Code
          bufsz    buffer_capacity        Ya        Number of bytes buffered before printing
          colors   max_colors             Co        Maximum number of colors on the screen
          cols     columns                co        Number of columns in a line
          cps      print_rate             Ym        Average print rate in characters per second
          it       init_tabs              it        Tabs initially every # spaces
          lh       label_height           lh        Number of rows in each label
          lines    lines                  li        Number of lines on a screen or a page
          lm       lines_of_memory        lm        Lines of memory if > lines; 0 means varies
          lw       label_width            lw        Number of columns in each label
          maddr    max_micro_address      Yd        Maximum value in micro_..._address
          mcs      micro_col_size         Yf        Character step size when in micro mode
          mjump    max_micro_jump         Ye        Maximum value in parm_..._micro
          mls      micro_line_size        Yg        Line step size when in micro mode
          ncv      no_color_video         NC        Video attributes that can't be used with colors
          nlab     num_labels             Nl        Number of labels on screen (start at 1)
          npins    number_of_pins         Yh        Number of pins in print-head
          orc      output_res_char        Yi        Horizontal resolution in units per character
          orhi     output_res_horz_inch   Yk        Horizontal resolution in units per inch
          orl      output_res_line        Yj        Vertical resolution in units per line
          orvi     output_res_vert_inch   Yl        Vertical resolution in units per inch
          pairs    max_pairs              pa        Maximum number of color-pairs on the screen
          pb       padding_baud_rate      pb        Lowest baud rate where padding needed
          spinh    dot_horz_spacing       Yc        Spacing of dots horizontally in dots per inch
          spinv    dot_vert_spacing       Yb        Spacing of pins vertically in pins per inch
          vt       virtual_terminal       vt        Virtual terminal number (UNIX system)
          widcs    wide_char_size         Yn        Character step size when in double wide mode
          wsl      width_status_line      ws        Number of columns in status line
          xmc      magic_cookie_glitch    sg        Number of blank characters left by smso or rmso
























          Rev.                                                      Page 14





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Strings
          Cap-          Variable         Termcap                     Description
          name                           Code
          acsc    acs_chars              ac        Graphic charset pairs aAbBcC - def=vt100
          bel     bell                   bl        Audible signal (bell)
          blink   enter_blink_mode       mb        Turn on blinking
          bold    enter_bold_mode        md        Turn on bold (extra bright) mode
          cbt     back_tab               bt        Back tab
          chr     change_res_horz        ZC        Change horizontal resolution†
          civis   cursor_invisible       vi        Make cursor invisible
          clear   clear_screen           cl        Clear screen and home cursor (*)
          cmdch   command_character      CC        Terminal settable cmd character in prototype
          cnorm   cursor_normal          ve        Make cursor appear normal (undo vs/vi)
          cpi     change_char_pitch      ZA        Change number of characters per inch†
          cr      carriage_return        cr        Carriage return (*)
          csnm    char_set_names         Zy        List of character set names
          csr     change_scroll_region   cs        Change to lines #1 through #2 (vt100) (G)
          cub     parm_left_cursor       LE        Move cursor left #1 spaces (G)
          cub1    cursor_left            le        Move left one space.
          cud     parm_down_cursor       DO        Move down #1 lines. (G*)
          cuf     parm_right_cursor      RI        Move right #1 spaces. (G*)
          cuf1    cursor_right           nd        Non-destructive space (cursor or carriage right)
          cup     cursor_address         cm        Move to row #1 col #2 (G)
          cuu     parm_up_cursor         UP        Move cursor up #1 lines. (G*)
          cvr     change_res_vert        ZD        Change vertical resolution†
          cvvis   cursor_visible         vs        Make cursor very visible
          dch     parm_dch               DC        Delete #1 chars (G*)
          dch1    delete_character       dc        Delete character (*)
          defc    define_char            ZE        Define a character in a character set
          dim     enter_dim_mode         mh        Turn on half-bright mode
          dl      delete_line            dl1       Delete line (*)
          dl      parm_delete_line       DL        Delete #1 lines (G*)
          do      cursor_down            do        Down one line
          docr    these_cause_cr         Zw        Printing any of these chars causes cr
          dsl     dis_status_line        ds        Disable status line
          ech     erase_chars            ec        Erase #1 characters (G)
          ed      clr_eos                cd        Clear to end of display (*)
          el      clr_eol                ce        Clear to end of line
          el1     clr_bol                cb        Clear to beginning of line, inclusive
          enacs   ena_acs                eA        Enable alternate character set
          ff      form_feed              ff        Hardcopy terminal page eject (*)
          flash   flash_screen           vb        Visible bell (may not move cursor)
          fln     label_format           Lf        Label format
          fsl     from_status_line       fs        Return from status line
          hd      down_half_line         hd        Half-line down (forward 1/2 linefeed)
          home    cursor_home            ho        Home cursor (if no cup)
          hook    flash_hook             fh        Flash the switch hook
          hpa     column_address         ch        Horizontal position absolute (G)
          ht      tab                    ta        Tab to next 8-space hardware tab stop
          hts     set_tab                st        Set a tab in all rows, current column





          Rev.                                                      Page 15





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Strings
          Cap-        Variable        Termcap                      Description
          name                        Code
          hu      up_half_line        hu        Half-line up (reverse 1/2 linefeed)
          hup     hangup              HU        Hang-up phone
          ich     parm_ich            IC        Insert #1 blank chars (G*)
          ich1    insert_character    ic        Insert character
          if      init_file           if        Name of initialization file
          il      parm_insert_line    AL        Add #1 new blank lines (G*)
          il1     insert_line         al        Add new blank line (*)
          ind     scroll_forward      sf        Scroll text up
          indn    parm_index          SF        Scroll forward #1 lines. (G)
          initc   initialize_color    Ic        Initialize the definition of color
          initp   initialize_pair     Ip        Initialize color-pair
          invis   enter_secure_mode   mk        Turn on blank mode (characters invisible)
          ip      insert_padding      ip        Insert pad after character inserted (*)
          iprog   init_prog           iP        Path name of program for initialization
          is1     init_1string        i1        Terminal or printer initialization string
          is2     init_2string        is        Terminal or printer initialization string
          is3     init_3string        i3        Terminal or printer initialization string
          kBEG    key_sbeg            &9        KEY_SBEG, 0572, sent by shifted beginning key
          kCAN    key_scancel         &0        KEY_SCANCEL, 0573, sent by shifted cancel key
          kCMD    key_scommand        *1        KEY_SCOMMAND, 0574, sent by shifted
                                                command key
          kCPY    key_scopy           *2        KEY_SCOPY, 0575, sent by shifted copy key
          kCRT    key_screate         *3        KEY_SCREATE, 0576, sent by shifted create key
          kDC     key_sdc             *4        KEY_SDC, 0577, sent by shifted delete-char key
          kDL     key_sdl             *5        KEY_SDL, 0600, sent by shifted delete-line key
          kEND    key_send            *7        KEY_SEND, 0602, sent by shifted end key
          kEOL    key_seol            *8        KEY_SEOL, 0603, sent by shifted clear-line key
          kEXT    key_sexit           *9        KEY_SEXIT, 0604, sent by shifted exit key
          kFND    key_sfind           *0        KEY_SFIND, 0605, sent by shifted find key
          kHLP    key_shelp           #1        KEY_SHELP, 0606, sent by shifted help key
          kHOM    key_shome           #2        KEY_SHOME, 0607, sent by shifted home key
          kIC     key_sic             #3        KEY_SIC, 0610, sent by shifted input key
          kLFT    key_sleft           #4        KEY_SLEFT, 0611, sent by shifted left-arrow key
          kMOV    key_smove           %b        KEY_SMOVE, 0613, sent by shifted move key
          kMSG    key_smessage        %a        KEY_SMESSAGE, 0612, sent by shifted message key
          kNXT    key_snext           %c        KEY_SNEXT, 0614, sent by shifted next key
          kOPT    key_soptions        %d        KEY_SOPTIONS, 0615, sent by shifted options key
          kPRT    key_sprint          %f        KEY_SPRINT, 0617, sent by shifted print key
          kPRV    key_sprevious       %e        KEY_SPREVIOUS, 0616, sent by shifted prev key
          kRDO    key_sredo           %g        KEY_SREDO, 0620, sent by shifted redo key
          kRES    key_srsume          %j        KEY_SRSUME, 0623, sent by shifted resume key
          kRIT    key_sright          %i        KEY_SRIGHT, 0622, sent by shifted right-arrow key
          kRPL    key_sreplace        %h        KEY_SREPLACE, 0621, sent by shifted replace key
          kSAV    key_ssave           !1        KEY_SSAVE, 0624, sent by shifted save key
          kSPD    key_ssuspend        !2        KEY_SSUSPEND, 0625, sent by shifted suspend key
          kUND    key_sundo           !3        KEY_SUNDO, 0626, sent by shifted undo key
          ka1     key_a1              K1        KEY_A1, 0534, upper left of keypad
          ka3     key_a3              K3        KEY_A3, 0535, upper right of keypad




          Rev.                                                      Page 16





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Strings
          Cap-      Variable      Termcap                      Description
          name                    Code
          kb2     key_b2          K2        KEY_B2, 0536, center of keypad
          kbeg    key_beg         @1        KEY_BEG, 0542, sent by beg(inning) key
          kbs     key_backspace   kb        KEY_BACKSPACE, 0407, sent by backspace key
          kc1     key_c1          K4        KEY_C1, 0537, lower left of keypad
          kc3     key_c3          K5        KEY_C3, 0540, lower right of keypad
          kcan    key_cancel      @2        KEY_CANCEL, 0543, sent by cancel key
          kcbt    key_btab        kB        KEY_BTAB, 0541, sent by back-tab key
          kclo    key_close       @3        KEY_CLOSE, 0544, sent by close key
          kclr    key_clear       kC        KEY_CLEAR, 0515, sent by clear-screen or erase key
          kcmd    key_command     @4        KEY_COMMAND, 0545, sent by cmd (command) key
          kcpy    key_copy        @5        KEY_COPY, 0546, sent by copy key
          kcrt    key_create      @6        KEY_CREATE, 0547, sent by create key
          kctab   key_ctab        kt        KEY_CTAB, 0525, sent by clear-tab key
          kcub1   key_left        kl        KEY_LEFT, 0404, sent by terminal left-arrow key
          kcud1   key_down        kd        KEY_DOWN, 0402, sent by terminal down-arrow key
          kcuf1   key_right       kr        KEY_RIGHT, 0405, sent by terminal right-arrow key
          kcuu1   key_up          ku        KEY_UP, 0403, sent by terminal up-arrow key
          kdch1   key_dc          kD        KEY_DC, 0512, sent by delete-character key
          kdl1    key_dl          kL        KEY_DL, 0510, sent by delete-line key
          ked     key_eos         ked        KEY_EOS, 0516, sent by clear-to-end-of-screen key
          kel     key_eol         kE        KEY_EOL, 0517, sent by clear-to-end-of-line key
          kend    key_end         @7        KEY_END, 0550, sent by end kee
          kent    key_enter       @8        KEY_ENTER, 0527, sent by enter/send key
          kext    key_exit        @9        KEY_EXIT, 0551, sent by exit key
          kf0     key_f0          k0        KEY_F(0), 0410, sent by function key f0
          kf1     key_f1          k1        KEY_F(1), 0411, sent by function key f1
          kf10    key_f10         k;        KEY_F(10), 0422, sent by function key f10
          kf11    key_f11         F1        KEY_F(11), 0423, sent by function key f11
          kf12    key_f12         F2        KEY_F(12), 0424, sent by function key f12
          kf13    key_f13         F3        KEY_F(13), 0425, sent by function key f13
          kf14    key_f14         F4        KEY_F(14), 0426, sent by function key f14
          kf15    key_f15         F5        KEY_F(15), 0427, sent by function key f15
          kf16    key_f16         F6        KEY_F(16), 0430, sent by function key f16
          kf17    key_f17         F7        KEY_F(17), 0431, sent by function key f17
          kf18    key_f18         F8        KEY_F(18), 0432, sent by function key f18
          kf19    key_f19         F9        KEY_F(19), 0433, sent by function key f19
          kf2     key_f2          k2        KEY_F(2), 0412, sent by function key f2
          kf20    key_f20         FA        KEY_F(20), 0434, sent by function key f20
          kf21    key_f21         FB        KEY_F(21), 0435, sent by function key f21
          kf22    key_f22         FC        KEY_F(22), 0436, sent by function key f22
          kf23    key_f23         FD        KEY_F(23), 0437, sent by function key f23
          kf24    key_f24         FE        KEY_F(24), 0440, sent by function key f24
          kf25    key_f25         FF        KEY_F(25), 0441, sent by function key f25
          kf26    key_f26         FG        KEY_F(26), 0442, sent by function key f26
          kf27    key_f27         FH        KEY_F(27), 0443, sent by function key f27
          kf28    key_f28         FI        KEY_F(28), 0444, sent by function key f28
          kf29    key_f29         FJ        KEY_F(29), 0445, sent by function key f29
          kf3     key_f3          k3        KEY_F(3), 0413, sent by function key f3




          Rev.                                                      Page 17





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Strings
          Cap-    Variable   Termcap                      Description
          name               Code
          kf30    key_f30    FK        KEY_F(30), 0446, sent by function key f30
          kf31    key_f31    FL        KEY_F(31), 0447, sent by function key f31
          kf32    key_f32    FM        KEY_F(32), 0450, sent by function key f32
          kf33    key_f33    FN        KEY_F(13), 0451, sent by function key f13
          kf34    key_f34    FO        KEY_F(34), 0452, sent by function key f34
          kf35    key_f35    FP        KEY_F(35), 0453, sent by function key f35
          kf36    key_f36    FQ        KEY_F(36), 0454, sent by function key f36
          kf37    key_f37    FR        KEY_F(37), 0455, sent by function key f37
          kf38    key_f38    FS        KEY_F(38), 0456, sent by function key f38
          kf39    key_f39    FT        KEY_F(39), 0457, sent by function key f39
          kf4     key_f4     k4        KEY_F(4), 0414, sent by function key f4
          kf40    key_f40    FU        KEY_F(40), 0460, sent by function key f40
          kf41    key_f41    FV        KEY_F(41), 0461, sent by function key f41
          kf42    key_f42    FW        KEY_F(42), 0462, sent by function key f42
          kf43    key_f43    FX        KEY_F(43), 0463, sent by function key f43
          kf44    key_f44    FY        KEY_F(44), 0464, sent by function key f44
          kf45    key_f45    FZ        KEY_F(45), 0465, sent by function key f45
          kf46    key_f46    Fa        KEY_F(46), 0466, sent by function key f46
          kf47    key_f47    Fb        KEY_F(47), 0467, sent by function key f47
          kf48    key_f48    Fc        KEY_F(48), 0470, sent by function key f48
          kf49    key_f49    Fd        KEY_F(49), 0471, sent by function key f49
          kf5     key_f5     k5        KEY_F(5), 0415, sent by function key f5
          kf50    key_f50    Fe        KEY_F(50), 0472, sent by function key f50
          kf51    key_f51    Ff        KEY_F(51), 0473, sent by function key f51
          kf52    key_f52    Fg        KEY_F(52), 0474, sent by function key f52
          kf53    key_f53    Fh        KEY_F(53), 0475, sent by function key f53
          kf54    key_f54    Fi        KEY_F(54), 0476, sent by function key f54
          kf55    key_f55    Fj        KEY_F(55), 0477, sent by function key f55
          kf56    key_f56    Fk        KEY_F(56), 0500, sent by function key f56
          kf57    key_f57    Fl        KEY_F(57), 0501, sent by function key f57
          kf58    key_f58    Fm        KEY_F(58), 0502, sent by function key f58
          kf59    key_f59    Fn        KEY_F(59), 0503, sent by function key f59
          kf6     key_f6     k6        KEY_F(6), 0416, sent by function key f6
          kf60    key_f60    Fo        KEY_F(60), 0504, sent by function key f60
          kf61    key_f61    Fp        KEY_F(61), 0505, sent by function key f61
          kf62    key_f62    Fq        KEY_F(62), 0506, sent by function key f62
          kf63    key_f63    Fr        KEY_F(63), 0507, sent by function key f63
          kf7     key_f7     k7        KEY_F(7), 0417, sent by function key f7
          kf8     key_f8     k8        KEY_F(8), 0420, sent by function key f8
          kf9     key_f9     k9        KEY_F(9), 0421, sent by function key f9
          kfnd    key_find   @0        KEY_FIND, 0552, sent by find key
          khlp    key_help   KM1       KEY_HELP, 0553, sent by help key
          khome   key_home   kh        KEY_HOME, 0406, sent by home key
          khts    key_stab   kT        KEY_STAB, 0524, sent by set-tab key
          kich1   key_ic     kI        KEY_IC, 0513, sent by ins-char/enter ins-mode key
          kil1    key_il     kA        KEY_IL, 0511, sent by insert-line key
          kind    key_sf     kF        KEY_SF, 0520, sent by scroll-forward/down key
          kll     key_ll     kH        KEY_LL, 0533, sent by home-down key




          Rev.                                                      Page 18





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Strings
          Cap-        Variable        Termcap                      Description
          name                        Code
          kmov    key_move            %4        KEY_MOVE, 0556, sent by move key
          kmrk    key_mark            %2        KEY_MARK, 0554, sent by mark key
          kmsg    key_message         %3        KEY_MESSAGE, 0555, sent by message key
          knp     key_npage           kN        KEY_NPAGE, 0522, sent by next-page key
          knxt    key_next            %5        KEY_NEXT, 0557, sent by next-object key
          kopn    key_open            %6        KEY_OPEN, 0560, sent by open key
          kopt    key_options         %7        KEY_OPTIONS, 0561, sent by options key
          kpp     key_ppage           kP        KEY_PPAGE, 0523, sent by previous-page key
          kprt    key_print           %9        KEY_PRINT, 0532, sent by print or copy key
          kprv    key_previous        %8        KEY_PREVIOUS, 0562, sent by previous-object key
          krdo    key_redo            %0        KEY_REDO, 0563, sent by redo key
          kref    key_reference       &1        KEY_REFERENCE, 0564, sent by ref(erence) key
          kres    key_resume          &5        KEY_RESUME, 0570, sent by resume key
          krfr    key_refresh         &2        KEY_REFRESH, 0565, sent by refresh key
          kri     key_sr              kR        KEY_SR, 0521, sent by scroll-backward/up key
          krmir   key_eic             kM        KEY_EIC, 0514, sent by rmir or smir in insert mode
          krpl    key_replace         &3        KEY_REPLACE, 0566, sent by replace key
          krst    key_restart         &4        KEY_RESTART, 0567, sent by restart key
          ksav    key_save            &6        KEY_SAVE, 0571, sent by save key
          kslt    key_select          *6        KEY_SELECT, 0601, sent by select key
          kspd    key_suspend         &7        KEY_SUSPEND, 0627, sent by suspend key
          ktbc    key_catab           ka        KEY_CATAB, 0526, sent by clear-all-tabs key
          kund    key_undo            &8        KEY_UNDO, 0630, sent by undo key
          lf0     lab_f0              l0        Labels on function key f0 if not f0
          lf1     lab_f1              l1        Labels on function key f1 if not f1
          lf10    lab_f10             la        Labels on function key f10 if not f10
          lf2     lab_f2              l2        Labels on function key f2 if not f2
          lf3     lab_f3              l3        Labels on function key f3 if not f3
          lf4     lab_f4              l4        Labels on function key f4 if not f4
          lf5     lab_f5              l5        Labels on function key f5 if not f5
          lf6     lab_f6              l6        Labels on function key f6 if not f6
          lf7     lab_f7              l7        Labels on function key f7 if not f7
          lf8     lab_f8              l8        Labels on function key f8 if not f8
          lf9     lab_f9              l9        Labels on function key f9 if not f9
          ll      cursor_to_ll        ll        Last line, first column (if no cup)
          lpi     change_line_pitch   ZB        Change number of lines per inch†
          ma      max_attributes      ma        Maximum combined video attributes terminal can
                                                display
          mc0     print_screen        ps        Print contents of the screen
          mc4     prtr_off            pf        Turn off the printer
          mc5     prtr_on             po        Turn on the printer
          mc5p    prtr_non            pO        Turn on the printer for #1 bytes
          mcub    parm_left_micro     Zg        Like parm_left_cursor for micro adjust.†
          mcub1   micro_left          Za        Like cursor_left for micro adjustment
          mcud    parm_down_micro     Zf        Like parm_down_cursor for micro adjust. (G*)
          mcud1   micro_down          ZZ        Like cursor_down for micro adjustment
          mcuf    parm_right_micro    Zh        Like parm_right_cursor for micro adjust.†
          mcuf1   micro_right         Zb        Like cursor_right for micro adjustment




          Rev.                                                      Page 19





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Strings
          Cap-            Variable          Termcap                     Description
          name                              Code
          mcuu     parm_up_micro            Zi        Like parm_up_cursor for micro adjust.†
          mcuu1    micro_up                 Zd        Like cursor_up for micro adjustment
          mgc      clear_margins            MC        Clear all margins (top, bottom, and sides)
          mhpa     micro_column_address     ZY        Like column_address for micro adjustment†
          mrcup    cursor_mem_address       CM        Memory relative cursor addressing (G)
          mvpa     micro_row_address        Zc        Like row_address for micro adjustment†
          ndscr    non_dest_scroll_region   ND        Scrolling region is non-destructive
          nel      newline                  nw        Newline (behaves like cr followed by lf)
          oc       orig_colors              oc        Set all color(-pair)s to the original ones
          op       orig_pair                op        Set default color-pair to the original one
          pad      pad_char                 pc        Pad character (rather than null)
          pause    fixed_pause              PA        Pause for 2-3 seconds
          pfkey    pkey_key                 pk        Prog funct key #1 to type string #2
          pfloc    pkey_local               pl        Prog funct key #1 to execute string #2
          pfx      pkey_xmit                px        Prog funct key #1 to xmit string #2
          pln      plab_norm                pn        Prog label #1 to show string #2
          porder   order_of_pins            Ze        Matches software bits to print-head pins
          prot     enter_protected_mode     mp        Turn on protected mode
          pulse    pulse                    PU        Select pulse dialing
          qdial    quick_dial               QD        Dial phone number #1, without progress detection
          rbim     stop_bit_image           Zs        End printing bit image graphics
          rc       restore_cursor           rc        Restore cursor to position of last sc
          rcsd     stop_char_set_def        Zt        End definition of a character set
          rep      repeat_char              rp        Repeat char #1 #2 times (G*)
          rev      enter_reverse_mode       mr        Turn on reverse video mode
          rf       reset_file               rf        Name of file containing reset string
          rfi      req_for_input            RF        Send next input char (for ptys)
          ri       scroll_reverse           sr        Scroll text down
          rin      parm_rindex              SR        Scroll backward #1 lines. (G)
          ritm     exit_italics_mode        ZR        Disable italics
          rlm      exit_leftward_mode       ZS        Enable rightward (normal) carriage motion
          rmacs    exit_alt_charset_mode    ae        End alternate character set
          rmam     exit_am_mode             RA        Turn off automatic margins
          rmclk    remove_clock             RC        Remove time-of-day clock
          rmcup    exit_ca_mode             te        String to end programs that use cup
          rmdc     exit_delete_mode         ed        End delete mode
          rmicm    exit_micro_mode          ZT        Disable micro motion capabilities
          rmir     exit_insert_mode         ei        End insert mode
          rmkx     keypad_local             ke        Out of ``keypad-transmit'' modey
          rmln     label_off                LF        Turn off soft labels
          rmm      meta_off                 mo        Turn off "meta mode"
          rmp      char_padding             rP        Like ip but when in replace mode
          rmso     exit_standout_mode       se        End standout mode
          rmul     exit_underline_mode      ue        End underscore mode
          rmxon    exit_xon_mode            RX        Turn off xon/xoff handshaking
          rs1      reset_1string            r1        Reset terminal completely to sane modes
          rs2      reset_2string            r2        Reset terminal completely to sane modes
          rs3      reset_3string            r3        Reset terminal completely to sane modes




          Rev.                                                      Page 20





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Strings
          Cap-            Variable            Termcap                 Description
          name                                Code
          rshm    exit_shadow_mode            ZU        Disable shadow printing
          rsubm   exit_subscript_mode         ZV        Disable subscript printing
          rsupm   exit_superscript_mode       ZW        Disable superscript printing
          rum     exit_upward_mode            ZX        Enable downward (normal) carriage motion
          rwidm   exit_doublewide_mode        ZQ        Disable double wide printing
          sbim    start_bit_image             Zq        Start printing bit image graphics†
          sc      save_cursor                 sc        Save cursor position
          sclk    set_clock                   SC        Set time-of-day clock
          scp     set_color_pair              sp        Set current color-pair
          scs     select_char_set             Zj        Select character set†
          scsd    start_char_set_def          Zr        Start definition of a character set†
          sdrfq   enter_draft_quality         ZG        Set draft quality print
          setb    set_background              Sb        Set current background color
          setf    set_foreground              Sf        Set current foreground color
          sgr     set_attributes              sa        Define the video attributes #1-#9 (G)
          sgr0    exit_attribute_mode         me        Turn off all attributes
          sitm    enter_italics_mode          ZH        Enable italics
          slm     enter_leftward_mode         ZI        Enable leftward carriage motion
          smacs   enter_alt_charset_mode      as        Start alternate character set
          smam    enter_am_mode               SA        Turn on automatic margins
          smcup   enter_ca_mode               ti        String to begin programs that use cup
          smdc    enter_delete_mode           dm        Delete mode (enter)
          smgb    set_bottom_margin           Zk        Set bottom margin at current line
          smgbp   set_bottom_margin_parm      Zl        Set bottom margin at line #1†
          smgl    set_left_margin             ML        Set left margin at current line
          smglp   set_left_margin_parm        Zm        Set left margin at column #1†
          smgr    set_right_margin            MR        Set right margin at current column
          smgrp   set_right_margin_parm       Zn        Set right margin at column #1†
          smgt    set_top_margin              Zo        Set top margin at current line
          smgtp   set_top_margin_parm         Zp        Set top margin at line #1†
          smicm   enter_micro_mode            ZJ        Enable micro motion capabilities
          smir    enter_insert_mode           im        Insert mode (enter)
          smkx    keypad_xmit                 ks        Put terminal in ``keypad-transmit'' mode
          smln    label_on                    LO        Turn on soft labels
          smm     meta_on                     mm        Turn on "meta mode" (8th bit)
          smso    enter_standout_mode         so        Begin standout mode
          smul    enter_underline_mode        us        Start underscore mode
          smxon   enter_xon_mode              SX        Turn on xon/xoff handshaking
          snlq    enter_near_letter_quality   ZK        Set near-letter quality print
          snrmq   enter_normal_quality        ZL        Set normal quality print
          sshm    enter_shadow_mode           ZM        Enable shadow printing
          ssubm   enter_subscript_mode        ZN        Enable subscript printing
          ssupm   enter_superscript_mode      ZO        Enable superscript printing
          subcs   subscript_characters        Zu        List of ``subscript-able'' characters
          sum     enter_upward_mode           ZP        Enable upward carriage motion
          supcs   superscript_characters      Zv        List of ``superscript-able'' characters
          swidm   enter_doublewide_mode       ZF        Enable double wide printing





          Rev.                                                      Page 21





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          Strings
          Cap-       Variable       Termcap                   Description
          name                      Code
          tbc     clear_all_tabs    ct        Clear all tab stops
          tone    tone              TO        Select touch tone dialing
          tsl     to_status_line    ts        Go to status line, col #1 (G)
          u0      user0             u0        User string 0
          u1      user1             u1        User string 1
          u2      user2             u2        User string 2
          u3      user3             u3        User string 3
          u4      user4             u4        User string 4
          u5      user5             u5        User string 5
          u6      user6             u6        User string 6
          u7      user7             u7        User string 7
          u8      user8             u8        User string 8
          u9      user9             u9        User string 9
          uc      underline_char    uc        Underscore one char and move past it
          up      cursor_up         cuu1      Upline (cursor up)
          vpa     row_address       cv        Vertical position absolute (G)
          wait    wait_tone         WA        Wait for dial tone
          wind    set_window        wi        Current window is lines #1-#2 cols #3-#4 (G)
          wingo   goto_window       WG        Go to window #1
          wnum    maximum_windows   MW        Maximum number of definable windows
          xoffc   xoff_character    XF        X-off character
          xonc    xon_character     XN        X-on character
          zerom   zero_motion       Zx        No motion for the subsequent character





























          Rev.                                                      Page 22





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



          SAMPLE ENTRY
               The following entry, which describes the AT&T 610 terminal,
               is among the more complex entries in the terminfo file as of
               this writing.

               610 | 610bct | ATT610 | att610 | AT&T 610; 80 column; 98key keyboard
                 am, eslok, hs, mir, msgr, xenl, xon,
                 cols#80, it#8, lh#2, lines#24, lw#8, nlab#8, wsl#80,
                 acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{ | | }}~~,
                 bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
                 civis=\E[?25l, clear=\E[H\E[J, cnorm=\E[?25h\E[?12l,
                 cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\b,
                 cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C,
                 cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
                 cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
                 dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
                 flash=\E[?5h$<200>\E[?5l, fsl=\E8, home=\E[H, ht=\t,
                 ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED,
                 invis=\E[8m,
                 is1=\E[8;0 | \E[?3;4;5;13;15l\E[13;20l\E[?7h\E[12h\E(B\E)0,
                 is2=\E[0m^O, is3=\E(B\E)0, kLFT=\E[\s@, kRIT=\E[\sA,
                 kbs=\b, kcbt=\E[Z, kclr=\E[2J, kcub1=\E[D, kcud1=\E[B,
                 kcuf1=\E[C, kcuu1=\E[A, kf1=\EOc, kf10=\ENp,
                 kf11=\ENq, kf12=\ENr, kf13=\ENs, kf14=\ENt, kf2=\EOd,
                 kf3=\EOe, kf4=\EOf, kf5=\EOg, kf6=\EOh, kf7=\EOi,
                 kf8=\EOj, kf9=\ENo, khome=\E[H, kind=\E[S, kri=\E[T,
                 ll=\E[24H, mc4=\E[?4i, mc5=\E[?5i, nel=\EE,
                 pfx=\E[%p1%d;%p2%l%02dq\s\s\sF%p1%1d\s\s\s\s\s
               \s\s\s\s\s\s%p2%s,
                 pln=\E[%p1%d;0;0;0q%p2%:-16.16s, rc=\E8, rev=\E[7m,
                 ri=\EM, rmacs=^O, rmir=\E[4l, rmln=\E[2p, rmso=\E[m,
                 rmul=\E[m, rs2=\Ec\E[?3l, sc=\E7,
                 sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;
               %?%p3%p1% | %t;7%;%?%p7%t;8%;m%?%p9%t^N%e^O%;,
                 sgr0=\E[m^O, smacs=^N, smir=\E[4h, smln=\E[p,
                 smso=\E[7m, smul=\E[4m, tsl=\E7\E[25;%i%p1%dx,

             Types of Capabilities in the Sample Entry
               The sample entry shows the formats for the three types of
               terminfo capabilities listed:  Boolean, Numeric, and String.
               The names of Boolean capabilities are often listed as abbre-
               viations or acronyms, such as am (short for "automatic mar-
               gins") in the sample entry.  ("Automatic margins" is a short
               description of an automatic return and linefeed when the end
               of a line is reached.)

               Numeric capabilities are followed by the character `#' and
               then the value.  Thus, in the sample, cols (which shows the
               number of columns available on a terminal) gives the value
               80 for the AT&T 610.  (Values for numeric capabilities may
               be specified in decimal, octal or hexadecimal, using normal
               C conventions.)



          Rev.                                                      Page 23





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               Finally, string-valued capabilities such as el (clear to end
               of line sequence) are listed by a two- to five-character
               capname, an `=', and a string ended by the next occurrence
               of a comma.  A delay in milliseconds may appear anywhere in
               such a capability, enclosed in $<..> brackets, as in
               el=\EK$<3>.  Padding characters are supplied by tputs().
               The delay can be any of the following:  a number (5), a
               number followed by a `*' (5*), a number followed by a `/'
               (5/), or a number followed by both (5*/).  A `*' shows that
               the padding required is proportional to the number of lines
               affected by the operation, and the amount given is the per-
               affected-unit padding required.  (In the case of insert
               characters, the factor is still the number of lines
               affected.  This is always 1 unless the terminal has in and
               the software uses it.)  When a `*' is specified, it is some-
               times useful to give a delay of the form 3.5 to specify a
               delay per unit to tenths of milliseconds.  (Only one decimal
               place is allowed.)

               A `/' indicates that the padding is mandatory.  Absence of a
               `/' is not shown, if the terminal has xon defined.  Padding
               information is advisory and will be used only for cost esti-
               mates or when the terminal is in raw mode.  Mandatory pad-
               ding will be transmitted regardless of the setting of xon.

               A number of escape sequences are provided in the string
               valued capabilities for easy encoding of characters there.
               Both \E and \e map to an ESCAPE character, x maps to a
               control-x for any appropriate x, and the sequences \n, \l,
               \r, \t, \b, \f, and \s give a newline, linefeed, return,
               tab, backspace, formfeed, and space, respectively.  Other
               escapes include: \ for caret (); \\ for backslash (\); \,
               for comma (,); \: for colon (:); and \0 for null.  (\0 will
               actually produce \200, which does not terminate a string but
               behaves as a null character on most terminals.)  Finally,
               characters may be given as three octal digits after a
               backslash (e.g., \123).

               Sometimes individual capabilities must be commented out.  To
               do this, put a period before the capability name.  For exam-
               ple, see the second ind in the example above.  Note that
               capabilities are defined in a left-to-right order and,
               therefore, a prior definition will override a later defini-
               tion.

             Preparing Descriptions
               The most effective way to prepare a terminal description is
               by imitating the description of a similar terminal in ter-
               minfo and to build up a description gradually, using partial
               descriptions with vi(1) to check that they are correct.  Be
               aware that a very unusual terminal may expose deficiencies
               in the ability of the terminfo file to describe it or the
               inability of vi(1) to work with that terminal.  To test a


          Rev.                                                      Page 24





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               new terminal description, set the environment variable TER-
               MINFO to a pathname of a directory containing the compiled
               description you are working on and programs will look there
               rather than in /usr/lib/terminfo.  To get the padding for
               insert-line correct (if the terminal manufacturer did not
               document it) a severe test is to comment out xon, edit a
               large file at 9600 baud with vi(1), delete 16 or so lines
               from the middle of the screen, then hit the u key several
               times quickly.  If the display is corrupted, more padding is
               usually needed.  A similar test can be used for insert-
               character.

             Section 1-1: Basic Capabilities
               The number of columns on each line for the terminal is given
               by the cols numeric capability.  If the terminal has a
               screen, then the number of lines on the screen is given by
               the lines capability.  If the terminal can clear its screen,
               leaving the cursor in the home position, then this is given
               by the clear string capability.  If the terminal overstrikes
               (rather than clearing a position when a character is struck
               over) then it should have the os capability.  If the termi-
               nal is a printing terminal, with no soft copy unit, give it
               both hc and os.  (os applies to storage scope terminals,
               such as the Tektronix 4010 series, as well as hard-copy and
               APL terminals.)  If there is a code to move the cursor to
               the left edge of the current row, give this as cr.  (Nor-
               mally this will be carriage return, control M.)  If there is
               a code to produce an audible signal (such as a bell or a
               beep), specify it as bel.  If the terminal uses the xon-xoff
               flow-control protocol, like most terminals, specify xon.

               If there is a code to move the cursor one position to the
               left (such as backspace), that capability should be given as
               cub1.  Similarly, codes to move to the right, up, and down
               should be given as cuf1, cuu1, and cud1.  These local cursor
               motions should not alter the text they pass over; for exam-
               ple, you would not normally use ``cuf1=\s'' because the
               space would erase the character moved over.

               A very important point here is that the local cursor motions
               encoded in terminfo are undefined at the left and top edges
               of a screen terminal.  Programs should never attempt to
               backspace around the left edge, unless bw is given, and
               should never attempt to go up locally off the top.  In order
               to scroll text up, a program will go to the bottom left
               corner of the screen and send the ind (index) string.

               To scroll text down, a program goes to the top left corner
               of the screen and sends the ri (reverse index) string.  The
               strings ind and ri are undefined when not on their respec-
               tive corners of the screen.

               Parameterized versions of the scrolling sequences are indn


          Rev.                                                      Page 25





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               and rin which have the same semantics as ind and ri except
               that they take one parameter, and scroll that many lines.
               They are also undefined except at the appropriate edge of
               the screen.

               If the terminal wraps around to the beginning of the next
               line when it reaches the right margin, then it should have
               the am capability.  The am capability tells whether the cur-
               sor sticks at the right edge of the screen when text is out-
               put, but this does not necessarily apply to a cuf1 from the
               last column.  The only local motion which is defined from
               the left edge is if bw is given, then a cub1 from the left
               edge will move to the right edge of the previous row.  If bw
               is not given, the effect is undefined.  This is useful for
               drawing a box around the edge of the screen, for example.
               If the terminal has switch selectable automatic margins, the
               terminfo file usually assumes that this is on; i.e., am.  If
               the terminal has a command which moves to the first column
               of the next line, that command can be given as nel (new-
               line).  It does not matter if the command clears the
               remainder of the current line, so if the terminal has no cr
               and lf it may still be possible to craft a working nel out
               of one or both of them.

               These capabilities suffice to describe hardcopy and screen
               terminals.  Thus the model 33 teleprinter is described as:

                  3hc, os, xon
                   cols#72,
                   bel=^G, cr=\r, cud1=\n, ind=\n,

               while the Lear Siegler ADM-3 is described as:

                  adm3|lsi adm3,
                  am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H,
                  cud1=^J, ind=^J, lines#24,

             Section 1-2: Parameterized Strings
               Cursor addressing and other strings requiring parameters in
               the terminal are described by a parameterized string capa-
               bility, with printf(3S)-like escapes (%x) in it.  For exam-
               ple, to address the cursor, the cup capability is given,
               using two parameters:  the row and column to address to.
               (Rows and columns are numbered from zero and refer to the
               physical screen visible to the user, not to any unseen
               memory.)  If the terminal has memory relative cursor
               addressing, that can be indicated by mrcup.

               The parameter mechanism uses a stack and special % codes to
               manipulate it in the manner of a Reverse Polish Notation
               (postfix) calculator.  Typically a sequence will push one of
               the parameters onto the stack and then print it in some for-
               mat.  Often more complex operations are necessary.  Binary


          Rev.                                                      Page 26





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               operations are in postfix form with the operands in the
               usual order.  That is, to get x-5 one would use %gx%{5}%-.

               The % encodings have the following meanings:

                 %%        outputs `%'
                 %[[:]flags][width[.precision]][doxXs]
                           as in printf, flags are [-+#] and space
                 %c        print pop() gives %c

                 %p[1-9]   push ith parm
                 %P[a-z]   set variable [a-z] to pop()
                 %g[a-z]   get variable [a-z] and push it
                 %'c'      push char constant c
                 %{nn}     push decimal constant nn
                 %l        push strlen(pop())

                 %+ %- %* %/ %m
                           arithmetic (%m is mod):  push(pop() op pop())
                 %& %| %^  bit operations:  push(pop() op pop())
                 %= %> %<  logical operations:  push(pop() op pop())
                 %A %O     logical operations:  and, or
                 %! %~     unary operations:  push(op pop())
                 %i        (for ANSI terminals)
                             add 1 to first parm, if one parm present,
                             or first two parms, if more than one parm present

                 %? expr %t thenpart %e elsepart %;
                      if-then-else, %e elsepart is optional;
                      else-if's are possible ala Algol 68:
                      %? c1 %t b1 %e c2 %t b2 %e c3 %t b3 %e c4 %t b4 %e b5%;
                      ci are conditions, bi are bodies.

               If the ``-'' flag is used with ``%[doxXs]'', then a colon
               (:) must be placed between the ``%'' and the ``-'' to dif-
               ferentiate the flag from the binary ``%-'' operator, .e.g.,
               ``%:-16.16s''.

               Consider the Hewlett-Packard 2645, which, to get to row 3
               and column 12, needs to be sent \E&a12c03Y padded for 6 mil-
               liseconds.  Note that the order of the rows and columns is
               inverted here, and that the row and column are zero-padded
               as two digits.  Thus its cup capability is
               ``cup=\E&a%p2%2.2dc%p1%2.2dY$<6>''.

               The Micro-Term ACT-IV needs the current row and column sent
               preceded by a T, with the row and column simply encoded in
               binary, ``cup=T%p1%c%p2%c''.  Terminals which use ``%c''
               need to be able to backspace the cursor (cub1), and to move
               the cursor up one line on the screen (cuu1).  This is neces-
               sary because it is not always safe to transmit \n, D, and
               \r, as the system may change or discard them.  (The library
               routines dealing with terminfo set tty modes so that tabs


          Rev.                                                      Page 27





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               are never expanded, so \t is safe to send.  This turns out
               to be essential for the Ann Arbor 4080.)

               A final example is the LSI ADM-3a, which uses row and column
               offset by a blank character, thus
               ``cup=\E=%p1%'\s'%+%c%p2%'\s'%+%c''.  After sending ``\E='',
               this pushes the first parameter, pushes the ASCII value for
               a space (32), adds them (pushing the sum on the stack in
               place of the two previous values), and outputs that value as
               a character.  Then the same is done for the second parame-
               ter.  More complex arithmetic is possible using the stack.

             Section 1-3: Cursor Motions
               If the terminal has a fast way to home the cursor (to very
               upper left corner of screen) then this can be given as home;
               similarly a fast way of getting to the lower left-hand
               corner can be given as ll; this may involve going up with
               cuu1 from the home position, but a program should never do
               this itself (unless ll does) because it can make no assump-
               tion about the effect of moving up from the home position.
               Note that the home position is the same as addressing to
               (0,0):  to the top left corner of the screen, not of memory.
               (Thus, the \EH sequence on Hewlett-Packard terminals cannot
               be used for home without losing some of the other features
               on the terminal.)

               If the terminal has row or column absolute-cursor address-
               ing, these can be given as single parameter capabilities hpa
               (horizontal position absolute) and vpa (vertical position
               absolute).  Sometimes these are shorter than the more gen-
               eral two-parameter sequence (as with the Hewlett-Packard
               2645) and can be used in preference to cup.  If there are
               parameterized local motions (e.g., move n spaces to the
               right) these can be given as cud, cub, cuf, and cuu with a
               single parameter indicating how many spaces to move.  These
               are primarily useful if the terminal does not have cup, such
               as the Tektronix 4025.

             Section 1-4: Area Clears
               If the terminal can clear from the current position to the
               end of the line, leaving the cursor where it is, this should
               be given as el.  If the terminal can clear from the begin-
               ning of the line to the current position inclusive, leaving
               the cursor where it is, this should be given as el1.  If the
               terminal can clear from the current position to the end of
               the display, then this should be given as ed.  ed is only
               defined from the first column of a line.  (Thus, it can be
               simulated by a request to delete a large number of lines, if
               a true ed is not available.)






          Rev.                                                      Page 28





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



             Section 1-5: Insert/Delete Line
               If the terminal can open a new blank line before the line
               where the cursor is, this should be given as il1; this is
               done only from the first position of a line.  The cursor
               must then appear on the newly blank line.  If the terminal
               can delete the line which the cursor is on, then this should
               be given as dl1; this is done only from the first position
               on the line to be deleted.  Versions of il1 and dl1 which
               take a single parameter and insert or delete that many lines
               can be given as il and dl.

               If the terminal has a settable destructive scrolling region
               (like the VT100) the command to set this can be described
               with the csr capability, which takes two parameters:  the
               top and bottom lines of the scrolling region.  The cursor
               position is, alas, undefined after using this command.  It
               is possible to get the effect of insert or delete line using
               this command -- the sc and rc (save and restore cursor) com-
               mands are also useful.  Inserting lines at the top or bottom
               of the screen can also be done using ri or ind on many ter-
               minals without a true insert/delete line, and is often fas-
               ter even on terminals with those features.

               To determine whether a terminal has destructive scrolling
               regions or non-destructive scrolling regions, create a
               scrolling region in the middle of the screen, place data on
               the bottom line of the scrolling region, move the cursor to
               the top line of the scrolling region, and do a reverse index
               (ri) followed by a delete line (dl1) or index (ind).  If the
               data that was originally on the bottom line of the scrolling
               region was restored into the scrolling region by the dl1 or
               ind, then the terminal has non-destructive scrolling
               regions.  Otherwise, it has destructive scrolling regions.
               Do not specify csr if the terminal has non-destructive
               scrolling regions, unless ind, ri, indn, rin, dl, and dl1
               all simulate destructive scrolling.

               If the terminal has the ability to define a window as part
               of memory, which all commands affect, it should be given as
               the parameterized string wind.  The four parameters are the
               starting and ending lines in memory and the starting and
               ending columns in memory, in that order.

               If the terminal can retain display memory above, then the da
               capability should be given; if display memory can be
               retained below, then db should be given.  These indicate
               that deleting a line or scrolling a full screen may bring
               non-blank lines up from below or that scrolling back with ri
               may bring down non-blank lines.

             Section 1-6: Insert/Delete Character
               There are two basic kinds of intelligent terminals with
               respect to insert/delete character operations which can be


          Rev.                                                      Page 29





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               described using terminfo. The most common insert/delete
               character operations affect only the characters on the
               current line and shift characters off the end of the line
               rigidly.  Other terminals, such as the Concept 100 and the
               Perkin Elmer Owl, make a distinction between typed and
               untyped blanks on the screen, shifting upon an insert or
               delete only to an untyped blank on the screen which is
               either eliminated, or expanded to two untyped blanks.  You
               can determine the kind of terminal you have by clearing the
               screen and then typing text separated by cursor motions.
               Type ``abc    def'' using local cursor motions (not spaces)
               between the abc and the def.  Then position the cursor
               before the abc and put the terminal in insert mode.  If typ-
               ing characters causes the rest of the line to shift rigidly
               and characters to fall off the end, then your terminal does
               not distinguish between blanks and untyped positions.  If
               the abc shifts over to the def which then move together
               around the end of the current line and onto the next as you
               insert, you have the second type of terminal, and should
               give the capability in, which stands for ``insert null''.
               While these are two logically separate attributes (one line
               versus multiline insert mode, and special treatment of
               untyped spaces) no terminals whose insert mode cannot be
               described with the single attribute have been seen.

               terminfo can describe both terminals which have an insert
               mode and terminals which send a simple sequence to open a
               blank position on the current line.  Give as smir the
               sequence to get into insert mode.  Give as rmir the sequence
               to leave insert mode.  Now give as ich1 any sequence needed
               to be sent just before sending the character to be inserted.
               Most terminals with a true insert mode will not give ich1;
               terminals which send a sequence to open a screen position
               should give it here.  (If your terminal has both, insert
               mode is usually preferable to ich1.  Do not give both unless
               the terminal actually requires both to be used in combina-
               tion.)  If post-insert padding is needed, give this as a
               number of milliseconds padding in ip (a string option).  Any
               other sequence which may need to be sent after an insert of
               a single character may also be given in ip.  If your termi-
               nal needs both to be placed into an `insert mode' and a spe-
               cial code to precede each inserted character, then both
               smir/rmir and ich1 can be given, and both will be used.  The
               ich capability, with one parameter, n, will insert n blanks.

               If padding is necessary between characters typed while not
               in insert mode, give this as a number of milliseconds pad-
               ding in rmp.

               It is occasionally necessary to move around while in insert
               mode to delete characters on the same line (e.g., if there
               is a tab after the insertion position).  If your terminal
               allows motion while in insert mode you can give the


          Rev.                                                      Page 30





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               capability mir to speed up inserting in this case.  Omitting
               mir will affect only speed.  Some terminals (notably
               Datamedia's) must not have mir because of the way their
               insert mode works.

               Finally, you can specify dch1 to delete a single character,
               dch with one parameter, n, to delete n characters, and
               delete mode by giving smdc and rmdc to enter and exit delete
               mode (any mode the terminal needs to be placed in for dch1
               to work).

               A command to erase n characters (equivalent to outputting n
               blanks without moving the cursor) can be given as ech with
               one parameter.

             Section 1-7: Highlighting, Underlining, and Visible Bells
               Your terminal may have one or more kinds of display attri-
               butes that allow you to highlight selected characters when
               they appear on the screen.  The following display modes
               (shown with the names by which they are set) may be avail-
               able:  a blinking screen (blink), bold or extra-bright char-
               acters (bold), dim or half-bright characters (dim), blanking
               or invisible text (invis), protected text (prot), a
               reverse-video screen (rev), and an alternate character set
               (smacs to enter this mode and rmacs to exit it).  (If a com-
               mand is necessary before you can enter alternate character
               set mode, give the sequence in enacs or "enable alternate-
               character-set" mode.)  Turning on any of these modes singly
               may or may not turn off other modes.

               If you set any display attributes for highlighting, you will
               also want to provide the capability for turning them off.
               To do so, set sgr0.

               You should choose one display method as standout mode [see
               curses(3X)] and use it to highlight error messages and other
               kinds of text to which you want to draw attention.  Choose a
               form of display that provides strong contrast but that is
               easy on the eyes.  (We recommend reverse-video plus half-
               bright or reverse-video alone.)  The sequences to enter and
               exit standout mode are given as smso and rmso, respectively.
               If the code to change into or out of standout mode leaves
               one or even two blank spaces on the screen, as the TVI 912
               and Teleray 1061 do, then xmc should be given to tell how
               many spaces are left.

               Codes to begin underlining and end underlining can be given
               as smul and rmul , respectively.  If the terminal has a code
               to underline the current character and move the cursor one
               space to the right, such as the Micro-Term MIME, this can be
               given as uc.

               For historical reasons, some programs interpret rmso, rmul


          Rev.                                                      Page 31





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               to mean "turn off all attributes," not just standout and
               underline, respectively.

               If there is a sequence to set arbitrary combinations of
               modes, this should be given as sgr (set attributes), taking
               nine parameters.  Each parameter is either 0 or non-zero, as
               the corresponding attribute is on or off.  The nine parame-
               ters are, in order:  standout, underline, reverse, blink,
               dim, bold, blank, protect, alternate character set.  Not all
               modes need to be supported by sgr; only those for which
               corresponding separate attribute commands exist should be
               supported.  (See the example at the end of this section.)

               Terminals with the ``magic cookie'' glitch (xmc) deposit
               special ``cookies'' when they receive mode-setting
               sequences, which affect the display algorithm rather than
               having extra bits for each character.  Some terminals, such
               as the Hewlett-Packard 2621, automatically leave standout
               mode when they move to a new line or the cursor is
               addressed.  Programs using standout mode should exit stan-
               dout mode before moving the cursor or sending a newline,
               unless the msgr capability, asserting that it is safe to
               move in standout mode, is present.

               If the terminal has a way of flashing the screen to indicate
               an error quietly (a bell replacement), then this can be
               given as flash; it must not move the cursor.  A good flash
               can be done by changing the screen into reverse video, pad
               for 200 ms, then return the screen to normal video.

               If the cursor needs to be made more visible than normal when
               it is not on the bottom line (to make, for example, a non-
               blinking underline into an easier to find block or blinking
               underline) give this sequence as cvvis.  The boolean chts
               should also be given.  If there is a way to make the cursor
               completely invisible, give that as civis.  The capability
               cnorm should be given which undoes the effects of either of
               these modes.

               If the terminal needs to be in a special mode when running a
               program that uses these capabilities, the codes to enter and
               exit this mode can be given as smcup and rmcup.  This
               arises, for example, from terminals, such as the Concept,
               with more than one page of memory.  If the terminal has only
               memory relative cursor addressing and not screen relative
               cursor addressing, a one screen-sized window must be fixed
               into the terminal for cursor addressing to work properly.
               This is also used for the Tektronix 4025, where smcup sets
               the command character to be the one used by terminfo.  If
               the smcup sequence will not restore the screen after a rmcup
               sequence is output (to the state prior to outputting rmcup),
               specify nrrmc.



          Rev.                                                      Page 32





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               If your terminal generates underlined characters by using
               the underline character (with no special codes needed) even
               though it does not otherwise overstrike characters, then you
               should give the capability ul.  For terminals where a char-
               acter overstriking another leaves both characters on the
               screen, give the capability os.  If overstrikes are erasable
               with a blank, then this should be indicated by giving eo.

               Example of highlighting:  assume that the terminal under
               question needs the following escape sequences to turn on
               various modes.

                         tparm
                       parameter     attribute      escape sequence
                                     none           \E[0m
                          p1         standout       \E[0;4;7m
                          p2         underline      \E[0;3m
                          p3         reverse        \E[0;4m
                          p4         blink          \E[0;5m
                          p5         dim            \E[0;7m
                          p6         bold           \E[0;3;4m
                          p7         invis          \E[0;8m
                          p8         protect        not available
                          p9         altcharset     O (off) N(on)

               Note that each escape sequence requires a 0 to turn off
               other modes before turning on its own mode.  Also note that,
               as suggested above, standout is set up to be the combination
               of reverse and dim.  Also, because this terminal has no bold
               mode, bold is set up as the combination of reverse and
               underline.  In addition, to allow combinations, such as
               underline+blink, the sequence to use would be \E[0;3;5m.
               The terminal doesn't have protect mode, either, but that
               cannot be simulated in any way, so p8 is ignored.  The
               altcharset mode is different in that it is either O or N,
               depending on whether it is off or on.  If all modes were to
               be turned on, the sequence would be \E[0;3;4;5;7;8mN.

               Now look at when different sequences are output.  For exam-
               ple, ;3 is output when either p2 or p6 is true, that is, if
               either underline or bold modes are turned on.  Writing out
               the above sequences, along with their dependencies, gives
               the following:

                 sequence      when to output       terminfo translation
                 \E[0         always                \E[0
                 ;3           if p2 or p6           %?%p2%p6%|%t;3%;
                 ;4           if p1 or p3 or p6     %?%p1%p3%|%p6%|%t;4%;
                 ;5           if p4                 %?%p4%t;5%;
                 ;7           if p1 or p5           %?%p1%p5%|%t;7%;
                 ;8           if p7                 %?%p7%t;8%;




          Rev.                                                      Page 33





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



                 m            always                m
                 N or O       if p9 N, else O       %?%p9%tN%eO%;

               Putting this all together into the sgr sequence gives:

               sgr=\E[0%?%p2%p6%|%t;3%;%?%p1%p3%|%p6%|%t;4%;%?%p5%t;5%;
                    %?%p1%p5%|%t;7%;%?%p7%t;8%;m%?%p9%tN%eO%;,

             Section 1-8: Keypad
               If the terminal has a keypad that transmits codes when the
               keys are pressed, this information can be given.  Note that
               it is not possible to handle terminals where the keypad only
               works in local (this applies, for example, to the unshifted
               Hewlett-Packard 2621 keys).  If the keypad can be set to
               transmit or not transmit, give these codes as smkx and rmkx.
               Otherwise the keypad is assumed to transmit.

               The codes sent by the left arrow, right arrow, up arrow,
               down arrow, and home keys can be given as kcub1, kcuf1,
               kcuu1, kcud1, and khome respectively.  If there are function
               keys such as f0, f1, ..., f63, the codes they send can be
               given as kf0, kf1, ..., kf63.  If the first 11 keys have
               labels other than the default f0 through f10, the labels can
               be given as lf0, lf1, ..., lf10.  The codes transmitted by
               certain other special keys can be given:  kll (home down),
               kbs (backspace), ktbc (clear all tabs), kctab (clear the tab
               stop in this column), kclr (clear screen or erase key),
               kdch1 (delete character), kdl1 (delete line), krmir (exit
               insert mode), kel (clear to end of line), ked (clear to end
               of screen), kich1 (insert character or enter insert mode),
               kil1 (insert line), knp (next page), kpp (previous page),
               kind (scroll forward/down), kri (scroll backward/up), khts
               (set a tab stop in this column).  In addition, if the keypad
               has a 3 by 3 array of keys including the four arrow keys,
               the other five keys can be given as ka1, ka3, kb2, kc1, and
               kc3.  These keys are useful when the effects of a 3 by 3
               directional pad are needed.  Further keys are defined above
               in the capabilities list.

               Strings to program function keys can be given as pfkey,
               pfloc, and pfx.  A string to program their soft-screen
               labels can be given as pln.  Each of these strings takes two
               parameters: the function key number to program (from 0 to
               10) and the string to program it with.  Function key numbers
               out of this range may program undefined keys in a terminal-
               dependent manner.  The difference between the capabilities
               is that pfkey causes pressing the given key to be the same
               as the user typing the given string; pfloc causes the string
               to be executed by the terminal in local mode; and pfx causes
               the string to be transmitted to the computer.  The capabili-
               ties nlab, lw, and lh define how many soft labels there are
               and their width and height.  If there are commands to turn
               the labels on and off, give them in smln and rmln.  smln is


          Rev.                                                      Page 34





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               normally output after one or more pln sequences to make sure
               that the change becomes visible.

             Section 1-9: Tabs and Initialization
               If the terminal has hardware tabs, the command to advance to
               the next tab stop can be given as ht (usually control I).  A
               ``backtab'' command which moves leftward to the next tab
               stop can be given as cbt.  By convention, if the teletype
               modes indicate that tabs are being expanded by the computer
               rather than being sent to the terminal, programs should not
               use ht or cbt even if they are present, since the user may
               not have the tab stops properly set.  If the terminal has
               hardware tabs which are initially set every n spaces when
               the terminal is powered up, the numeric parameter it is
               given, showing the number of spaces the tabs are set to.
               This is normally used by tput init [see tput(1)] to deter-
               mine whether to set the mode for hardware tab expansion and
               whether to set the tab stops.  If the terminal has tab stops
               that can be saved in nonvolatile memory, the terminfo
               description can assume that they are properly set.  If there
               are commands to set and clear tab stops, they can be given
               as tbc (clear all tab stops) and hts (set a tab stop in the
               current column of every row).

               Other capabilities include:  is1, is2, and is3, initializa-
               tion strings for the terminal; iprog, the path name of a
               program to be run to initialize the terminal; and if, the
               name of a file containing long initialization strings.
               These strings are expected to set the terminal into modes
               consistent with the rest of the terminfo description.  They
               must be sent to the terminal each time the user logs in and
               be output in the following order:  run the program iprog;
               output is1; output is2; set the margins using mgc, smgl, and
               smgr; set the tabs using tbc and hts; print the file if; and
               finally output is3.  This is usually done using the init
               option of tput(1); see profile(4).

               Most initialization is done with is2.  Special terminal
               modes can be set up without duplicating strings by putting
               the common sequences in is2 and special cases in is1 and
               is3.  Sequences that do a harder reset from a totally
               unknown state can be given as rs1, rs2, rf, and rs3, analo-
               gous to is1, is2, is3, and if.  (The method using files, if
               and rf, is used for a few terminals, from /usr/lib/tabset/*;
               however, the recommended method is to use the initialization
               and reset strings.)  These strings are output by tput reset,
               which is used when the terminal gets into a wedged state.
               Commands are normally placed in rs1, rs2, rs3, and rf only
               if they produce annoying effects on the screen and are not
               necessary when logging in.  For example, the command to set
               a terminal into 80-column mode would normally be part of
               is2, but on some terminals it causes an annoying glitch on
               the screen and is not normally needed since the terminal is


          Rev.                                                      Page 35





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               usually already in 80-column mode.

               If a more complex sequence is needed to set the tabs than
               can be described by using tbc and hts, the sequence can be
               placed in is2 or if.

               Any margin can be cleared with mgc.  (For instructions on
               how to specify commands to set and clear margins, see "Mar-
               gins" below under "PRINTER CAPABILITIES.")

             Section 1-10: Delays
               Certain capabilities control padding in the tty(7) driver.
               These are primarily needed by hard-copy terminals, and are
               used by tput init to set tty modes appropriately.  Delays
               embedded in the capabilities cr, ind, cub1, ff, and tab can
               be used to set the appropriate delay bits to be set in the
               tty driver.  If pb (padding baud rate) is given, these
               values can be ignored at baud rates below the value of pb.

             Section 1-11: Status Lines
               If the terminal has an extra ``status line'' that is not
               normally used by software, this fact can be indicated.  If
               the status line is viewed as an extra line below the bottom
               line, into which one can cursor address normally (such as
               the Heathkit h19's 25th line, or the 24th line of a VT100
               which is set to a 23-line scrolling region), the capability
               hs should be given.  Special strings that go to a given
               column of the status line and return from the status line
               can be given as tsl and fsl.  (fsl must leave the cursor
               position in the same place it was before tsl.  If necessary,
               the sc and rc strings can be included in tsl and fsl to get
               this effect.)  The capability tsl takes one parameter, which
               is the column number of the status line the cursor is to be
               moved to.

               If escape sequences and other special commands, such as tab,
               work while in the status line, the flag eslok can be given.
               A string which turns off the status line (or otherwise
               erases its contents) should be given as dsl.  If the termi-
               nal has commands to save and restore the position of the
               cursor, give them as sc and rc.  The status line is normally
               assumed to be the same width as the rest of the screen,
               e.g., cols.  If the status line is a different width (possi-
               bly because the terminal does not allow an entire line to be
               loaded) the width, in columns, can be indicated with the
               numeric parameter wsl.

             Section 1-12: Line Graphics
               If the terminal has a line drawing alternate character set,
               the mapping of glyph to character would be given in acsc.
               The definition of this string is based on the alternate
               character set used in the DEC VT100 terminal, extended
               slightly with some characters from the AT&T 4410v1 terminal.


          Rev.                                                      Page 36





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



                                                      vt100+
                                 glyph name          character
                           arrow pointing right          +
                           arrow pointing left           ,
                           arrow pointing down           .
                           solid square block            0
                           lantern symbol                I
                           arrow pointing up             -
                           diamond                       `
                           checker board (stipple)       a
                           degree symbol                 f
                           plus/minus                    g
                           board of squares              h
                           lower right corner            j
                           upper right corner            k
                           upper left corner             l
                           lower left corner             m
                           plus                          n
                           scan line 1                   o
                           horizontal line               q
                           scan line 9                   s
                           left tee (†)                  t
                           right tee (-|)                u
                           bottom tee (|)                v
|)                   w     top tee (
                           vertical line                 x
                           bullet                        ~

               The best way to describe a new terminal's line graphics set
               is to add a third column to the above table with the charac-
               ters for the new terminal that produce the appropriate glyph
               when the terminal is in the alternate character set mode.
               For example,

                                              vt100+      new tty
                            glyph name       character   character
                        upper left corner        l           R
                        lower left corner        m           F
                        upper right corner       k           T
                        lower right corner       j           G
                        horizontal line          q           ,
                        vertical line            x           .

               Now write down the characters left to right, as in
               ``acsc=lRmFkTjGq\,x.''.

               In addition, terminfo allows you to define multiple charac-
               ter sets.  See Section 2-5 for details.

             Section 1-13: Color Manipulation
               There are two methods of color manipulation:  the HP method
               and the Tektronix method.  Most existing color terminals
               belong to one of these two classes.


          Rev.                                                      Page 37





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               The Tektronix method uses a set of N predefined colors (usu-
               ally 8) from which a user can select "current" foreground
               and background colors.  Thus the terminal can support up to
               N colors mixed into N*N color-pairs to be displayed on the
               screen at the same time.

               The HP method restricts the user from defining the fore-
               ground independently of the background, or vice-versa.
               Instead, the user must define an entire color-pair at once.
               Up to M color-pairs, made from 2*M different colors, can be
               defined this way.

               The numeric variables colors and pairs define the number of
               colors and color-pairs that can be displayed on the screen
               at the same time.  If a terminal can change the definition
               of a color (as can, for example, the Tektronix 4100 and 4200
               series terminals), this should be specified with ccc (can
               change color).  To change the definition of a color (Tek-
               tronix method), use initc (initialize color).  It requires
               four arguments:  color number (ranging from 0 to colors-1)
               and three RGB (red, green, and blue) values (ranging from 0
               to 1,000).

               Tektronix 4100 series terminals use a type of color notation
               called HLS (Hue Lightness Saturation) instead of RGB color
               notation.  For such terminals one must define a boolean
               variable hls.  The last three arguments to the initc string
               would then be HLS values:  H, ranging from 0 to 360; and L
               and S, ranging from 0 to 100.

               If a terminal can change the definitions of colors, but uses
               a color notation different from RGB and HLS, a mapping to
               either RGB or HLS must be developed.

               To set current foreground or background to a given color,
               use setff (set foreground) and setb (set background).  They
               require one parameter:  the number of the color.  To ini-
               tialize a color-pair (HP method), use initp (initialize
               pair).  It requires seven parameters:  the number of a
               color-pair (range = 0 to pairs-1), and six RGB values:
               three for the foreground followed by three for the back-
               ground.  (Each of these groups of three should be in the
               order RGB.)  When initc or initp are used, RGB or HLS argu-
               ments should be in the order "red, green, blue" or "hue,
               lightness, saturation"), respectively.  To make a color-pair
               current, use scp (set color-pair).  It takes one parameter,
               the number of a color-pair.

               Some terminals (for example, most color terminal emulators
               for PCs) erase areas of the screen with current background
               color.  In such cases, bce (background color erase) should
               be defined.  The variable op (original pair) contains a
               sequence for setting the foreground and the background


          Rev.                                                      Page 38





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               colors to what they were at the terminal start-up time.
               Similarly, oc (original colors) contains a control sequence
               for setting all colors (for the Tektronix method) or color-
               pairs (for the HP method) to the values they had at the ter-
               minal start-up time.

               Some color terminals substitute color for video attributes.
               Such video attributes should not be combined with colors.
               Information about these video attributes should be packed
               into the ncv (no color video) variable.  There is a one-to-
               one correspondence between the nine least significant bits
               of that variable and the video attributes.  The following
               table depicts this correspondence.

                                                 NCV Bit
                                   Attribute     Number
                                  ______________________
                                  A_STANDOUT        0
                                  A_UNDERLINE       1
                                  A_REVERSE         2
                                  A_BLINK           3
                                  A_DIM             4
                                  A_BOLD            5
                                  A_INVIS           6
                                  A_PROTECT         7
                                  A_ALTCHARSET      8

               When a particular video attribute should not be used with
               colors, the corresponding ncv bit should be set to 1; other-
               wise it should be set to zero.  For example, if the terminal
               uses colors to simulate reverse video and bold, bits 2 and 5
               should be set to 1.  The resulting values for ncv will be
               22.

             Section 1-14: Miscellaneous
               If the terminal requires other than a null (zero) character
               as a pad, then this can be given as pad.  Only the first
               character of the pad string is used.  If the terminal does
               not have a pad character, specify npc.

               If the terminal can move up or down half a line, this can be
               indicated with hu (half-line up) and hd (half-line down).
               This is primarily useful for superscripts and subscripts on
               hardcopy terminals.  If a hardcopy terminal can eject to the
               next page (form feed), give this as ff (usually control L).

               If there is a command to repeat a given character a given
               number of times (to save time transmitting a large number of
               identical characters) this can be indicated with the
               parameterized string rep.  The first parameter is the char-
               acter to be repeated and the second is the number of times
               to repeat it.  Thus, tparm(repeat_char, 'x', 10) is the same
               as xxxxxxxxxx.


          Rev.                                                      Page 39





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               If the terminal has a settable command character, such as
               the Tektronix 4025, this can be indicated with cmdch.  A
               prototype command character is chosen which is used in all
               capabilities.  This character is given in the cmdch capabil-
               ity to identify it.  The following convention is supported
               on some UNIX systems:  If the environment variable CC
               exists, all occurrences of the prototype character are
               replaced with the character in CC.

               Terminal descriptions that do not represent a specific kind
               of known terminal, such as switch, dialup, patch, and net-
               work, should include the gn (generic) capability so that
               programs can complain that they do not know how to talk to
               the terminal.  (This capability does not apply to virtual
               terminal descriptions for which the escape sequences are
               known.)  If the terminal is one of those supported by the
               UNIX system virtual terminal protocol, the terminal number
               can be given as vt.  A line-turn-around sequence to be
               transmitted before doing reads should be specified in rfi.

               If the terminal uses xon/xoff handshaking for flow control,
               give xon.  Padding information should still be included so
               that routines can make better decisions about costs, but
               actual pad characters will not be transmitted.  Sequences to
               turn on and off xon/xoff handshaking may be given in smxon
               and rmxon.  If the characters used for handshaking are not S
               and Q, they may be specified with xonc and xoffc.

               If the terminal has a ``meta key'' which acts as a shift
               key, setting the 8th bit of any character transmitted, this
               fact can be indicated with km.  Otherwise, software will
               assume that the 8th bit is parity and it will usually be
               cleared.  If strings exist to turn this ``meta mode'' on and
               off, they can be given as smm and rmm.

               If the terminal has more lines of memory than will fit on
               the screen at once, the number of lines of memory can be
               indicated with lm.  A value of lm#0 indicates that the
               number of lines is not fixed, but that there is still more
               memory than fits on the screen.

               Media copy strings which control an auxiliary printer con-
               nected to the terminal can be given as mc0:  print the con-
               tents of the screen, mc4:  turn off the printer, and mc5:
               turn on the printer.  When the printer is on, all text sent
               to the terminal will be sent to the printer.  A variation,
               mc5p, takes one parameter, and leaves the printer on for as
               many characters as the value of the parameter, then turns
               the printer off.  The parameter should not exceed 255.  If
               the text is not displayed on the terminal screen when the
               printer is on, specify mc5i (silent printer).  All text,
               including mc4, is transparently passed to the printer while
               an mc5p is in effect.


          Rev.                                                      Page 40





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



             Section 1-15: Special Cases
               The working model used by terminfo fits most terminals rea-
               sonably well.  However, some terminals do not completely
               match that model, requiring special support by terminfo.
               These are not to be construed as deficiencies in the termi-
               nals; they are just differences between the working model
               and the actual hardware.  They may be unusual devices or,
               for some reason, do not have all the features of the ter-
               minfo model implemented.

               Terminals which can not display tilde (~) characters, such
               as certain Hazeltine terminals, should indicate hz.

               Terminals which ignore a linefeed immediately after an am
               wrap, such as the Concept 100, should indicate xenl.  Those
               terminals whose cursor remains on the right-most column
               until another character has been received, rather than wrap-
               ping immediately upon receiving the right-most character,
               such as the VT100, should also indicate xenl.

               If el is required to get rid of standout (instead of writing
               normal text on top of it), xhp should be given.

               Those Teleray terminals whose tabs turn all characters moved
               over to blanks, should indicate xt (destructive tabs).  This
               capability is also taken to mean that it is not possible to
               position the cursor on top of a ``magic cookie'' therefore,
               to erase standout mode, it is instead necessary to use
               delete and insert line.

               Those Beehive Superbee terminals which do not transmit the
               escape or control-C characters, should specify xsb, indicat-
               ing that the f1 key is to be used for escape and the f2 key
               for control-C.

             Section 1-16: Similar Terminals
               If there are two very similar terminals, one can be defined
               as being just like the other with certain exceptions.  The
               string capability use can be given with the name of the
               similar terminal.  The capabilities given before use over-
               ride those in the terminal type invoked by use.  A capabil-
               ity can be canceled by placing xx@ to the left of the capa-
               bility definition, where xx is the capability.  For example,
               the entry
                 att4424-2|Teletype 4424 in display function group ii,
                 rev@, sgr@, smul@, use=att4424,

               defines an AT&T 4424 terminal that does not  have  the  rev,
               sgr,  and  smul capabilities, and hence cannot do highlight-
               ing.  This is useful for different modes for a terminal,  or
               for  different user preferences.  More than one use capabil-
               ity may be given.



          Rev.                                                      Page 41





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



             PART 2: PRINTER CAPABILITIES
               The terminfo database allows you to define  capabilities  of
               printers  as  well as terminals.  To find out what capabili-
               ties are available for printers as well  as  for  terminals,
               see  the  two  lists under "TERMINAL CAPABILITIES" that list
               capabilities by variable and by capability name.

             Section 2-1: Rounding Values
               Because parameterized string  capabilities  work  only  with
               integer  values, we recommend that terminfo designers create
               strings that expect numeric values that have  been  rounded.
               Application  designers  should  note  this and should always
               round values to the nearest integer before using them with a
               parameterized string capability.

             Section 2-2: Printer Resolution
               A printer's resolution is defined to be the smallest spacing
               of  characters  it  can  achieve.   In general printers have
               independent resolution horizontally  and  vertically.   Thus
               the  vertical  resolution  of a printer can be determined by
               measuring the smallest achievable distance between  consecu-
               tive printing baselines, while the horizontal resolution can
               be determined by measuring the smallest achievable  distance
               between  the left-most edges of consecutive printed, identi-
               cal, characters.

               All printers are assumed to be capable of  printing  with  a
               uniform  horizontal  and  vertical  resolution.  The view of
               printing that the terminfo  currently  presents  is  one  of
               printing  inside  a  uniform  matrix:   All  characters  are
               printed at fixed positions relative to each ``cell'' in  the
               matrix;  furthermore,  each  cell has the same size given by
               the smallest horizontal and vertical step sizes dictated  by
               the  resolution.   (The  cell size can be changed as will be
               seen later.)

               Many printers  are  capable  of  ``proportional  printing,''
               where  the  horizontal  spacing  depends  on the size of the
               character last printed.  The terminfo does not make  use  of
               this  capability, although it does provide enough capability
               definitions to allow an application to simulate proportional
               printing.

               A printer must not only be able to print characters as close
               together as the horizontal and vertical resolutions suggest,
               but also of ``moving'' to a position an integral multiple of
               the  smallest  distance away from a previous position.  Thus
               printed characters can be spaced apart a distance that is an
               integral multiple of the smallest distance, up to the length
               or width of a single page.

               Some printers can have different  resolutions  depending  on
               different  ``modes.''   In  ``normal  mode,''  the  existing


          Rev.                                                      Page 42





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               terminfo capabilities are assumed to  work  on  columns  and
               lines, just like a video terminal.  Thus the old lines capa-
               bility would give the length of a page  in  lines,  and  the
               cols  capability  would give the width of a page in columns.
               In ``micro mode,'' many terminfo capabilities work on incre-
               ments  of  lines  and columns.  With some printers the micro
               mode may be concomitant with normal mode, so  that  all  the
               capabilities work at the same time.

             Section 2-3: Specifying Printer Resolution
               The printing resolution of a printer  is  given  in  several
               ways.   Each specifies the resolution as the number of smal-
               lest steps per distance:

                           Specification of Printer Resolution
                         Characteristic Number of Smallest Steps
                        __________________________________________
                        orhi       Steps per inch horizontally
                        orvi       Steps per inch vertically
                        orc        Steps per column
                        orl        Steps per line

               When printing in normal mode, each character printed  causes
               movement  to  the  next  column,  except  in  special  cases
               described later; the distance moved is the same as the  per-
               column  resolution.   Some printers cause an automatic move-
               ment to the next line when a character  is  printed  in  the
               rightmost  position;  the  distance  moved vertically is the
               same as the per-line resolution.   When  printing  in  micro
               mode,  these distances can be different, and may be zero for
               some printers.

                           Specification of Printer Resolution
                             Automatic Motion after Printing
                         ________________________________________
                         Normal Mode:
                         orc        Steps moved horizontally
                         orl        Steps moved vertically
                         Micro Mode:
                         mcs        Steps moved horizontally
                         mls        Steps moved vertically

               Some printers are capable of printing wide characters.   The
               distance  moved  when  a wide character is printed in normal
               mode may be different from when a regular width character is
               printed.   The  distance  moved  when  a  wide  character is
               printed in micro mode may also be different from when a reg-
               ular character is printed in micro mode, but the differences
               are assumed to be related:  If the distance moved for a reg-
               ular  character  is the same whether in normal mode or micro
               mode (mcs=orc), then the distance moved for a wide character
               is also the same whether in normal mode or micro mode.  This
               doesn't mean the normal character  distance  is  necessarily


          Rev.                                                      Page 43





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               the  same as the wide character distance, just that the dis-
               tances don't change with a change in normal to  micro  mode.
               However,  if  the  distance moved for a regular character is
               different in micro mode from the distance  moved  in  normal
               mode (mcs<orc), the micro mode distance is assumed to be the
               same for a wide character printed  in  micro  mode,  as  the
               table below shows.

                           Specification of Printer Resolution
                      Automatic Motion after Printing Wide Character
                  ______________________________________________________
                  Normal Mode or Micro Mode (mcs = orc):
                  widcs              Steps moved horizontally
                  Micro Mode (mcs < orc):
                  mcs                Steps moved horizontally

               There may be control  sequences  to  change  the  number  of
               columns  per  inch  (the  character pitch) and to change the
               number of lines per inch (the line  pitch).   If  these  are
               used, the resolution of the printer changes, but the type of
               change depends on the printer:

                           Specification of Printer Resolution
                           Changing the Character/Line Pitches
                  ______________________________________________________
                  cpi    Change character pitch
                  cpix   If set, cpi changes orhi, otherwise changes orc
                  lpi    Change line pitch
                  lpix   If set, lpi changes orvi, otherwise changes orl
                  chr    Change steps per column
                  cvr    Change steps per line

               The cpi and lpi string capabilities are  each  used  with  a
               single  argument,  the  pitch in columns (or characters) and
               lines per inch, respectively.  The chr and cvr string  capa-
               bilities are each used with a single argument, the number of
               steps per column and line, respectively.

               Using any of the control sequences  in  these  strings  will
               imply  a change in some of the values of orc, orhi, orl, and
               orvi.  Also, the distance moved when  a  wide  character  is
               printed,  widcs,  changes  in relation to orc.  The distance
               moved when a  character  is  printed  in  micro  mode,  mcs,
               changes similarly, with one exception:  if the distance is 0
               or 1, then no change is assumed (see item marked with  †  in
               the following table).

               Programs that use cpi, lpi, chr, or cvr  should  recalculate
               the  printer resolution (and should recalculate other values
               - see "Section 2-7:  Effect  of  Changing  Printing  Resolu-
               tion").  delim $$ define pr 'sup bold prime'




          Rev.                                                      Page 44





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



                               Specification of Printer Resolution
                         Effects of Changing the Character/Line Pitches
          _____________________________________________________________________________
              Before                                  After
          _____________________________________________________________________________
          Using cpi with cpix clear:
          orhi '           orhi
          orc '            $bold orc = bold orhi over V sub italic cpi$

          Using cpi with cpix set:
          orhi '           $bold orhi = bold orc cdot V sub italic cpi$
          orc '            $bold orc$

          Using lpi with lpix clear:
          orvi '           $bold orvi$
          orl '            $bold orl = bold orvi over V sub italic lpi$

          Using lpi with lpix set:
          orvi '           $bold orvi = bold orl cdot V sub italic lpi$
          orl '            $bold orl$

          Using chr:
          orhi '           $bold orhi$
          orc '            $V sub italic chr$

          Using cvr:
          orvi '           $bold orvi$
          orl '            $V sub italic cvr$

          Using cpi or chr:
          widcs '          $bold widcs = bold {widcs '} bold orc over { bold {orc '} }$
          mcs '†           $bold mcs = bold {mcs '} bold orc over { bold {orc '} }$

               $V sub italic cpi$, $V sub italic lpi$, $V sub italic  chr$,
               and $V sub italic cvr$ are the arguments used with cpi, lpi,
               chr, and cvr respectively.  The †  mark  indicates  the  old
               value.  delim off

             Section 2-4: Capabilities that Cause Movement
               In the following descriptions, ``movement''  refers  to  the
               motion  of  the  ``current position.''  With video terminals
               this would be the cursor; with some  printers  this  is  the
               carriage    position.    Other   printers   have   different
               equivalents.  In general, the current position  is  where  a
               character would be displayed if printed.

               terminfo has string capabilities for control sequences  that
               cause  movement  a number of full columns or lines.  It also
               has equivalent string  capabilities  for  control  sequences
               that cause movement a number of smallest steps.

                              String Capabilities for Motion
                            __________________________________


          Rev.                                                      Page 45





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



                            mcub1   Move 1 step left
                            mcuf1   Move 1 step right
                            mcuu1   Move 1 step up
                            mcud1   Move 1 step down
                            mcub    Move N steps left
                            mcuf    Move N steps right
                            mcuu    Move N steps up
                            mcud    Move N steps down
                            mhpa    Move N steps from the left
                            mvpa    Move N steps from the top

               The latter six strings are each used with a single argument,
               N.

               Sometimes the motion is limited to less than  the  width  or
               length of a page.  Also, some printers don't accept absolute
               motion to the left of the current  position.   terminfo  has
               capabilities for specifying these limits.

                                     Limits to Motion
                    __________________________________________________
                    mjump   Limit on use of mcub1, mcuf1, mcuu1, mcud1
                    maddr   Limit on use of mhpa, mvpa
                    xhpa    If set, hpa and mhpa can't move left
                    xvpa    If set, vpa and mvpa can't move up

               If a printer needs to be in a ``micro mode'' for the  motion
               capabilities described above to work, there are string capa-
               bilities defined to contain the control  sequence  to  enter
               and  exit  this  mode.   A  boolean  is  available for those
               printers where using a carriage return causes  an  automatic
               return to normal mode.
                               Entering/Exiting Micro Mode
                            _________________________________
                            smicm   Enter micro mode
                            rmicm   Exit micro mode
                            crxm    Using cr exits micro mode

               The movement made when a character is printed in the  right-
               most position varies among printers.  Some make no movement,
               some move to the beginning of the next line, others move  to
               the  beginning of the same line.  terminfo has boolean capa-
               bilities for describing all three cases.

                               What Happens After Character
                              Printed in Rightmost Position
                      ______________________________________________
                      sam   Automatic move to beginning of same line

               Some printers can be put in a mode where the  normal  direc-
               tion  of  motion  is  reversed.  This mode can be especially
               useful when there exists no  capabilities  for  leftward  or
               upward  motion, because those capabilities can be built from


          Rev.                                                      Page 46





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               the motion reversal capability and the rightward or downward
               motion capabilities.  It is best to leave it up to an appli-
               cation to build the leftward or upward capabilities, though,
               and  not  enter  them in the terminfo database.  This allows
               several reverse motions to be strung together without inter-
               vening wasted steps that leave and reenter reverse mode.

                             Entering/Exiting Reverse Modes
                       ___________________________________________
                       slm     Reverse sense of horizontal motions
                       rlm     Restore sense of horizontal motions
                       sum     Reverse sense of vertical motions
                       rum     Restore sense of vertical motions
                       While sense of horizontal motions reversed:
                       mcub1   Move 1 step right
                       mcuf1   Move 1 step left
                       mcub    Move N steps right
                       mcuf    Move N steps left
                       cub1    Move 1 column right
                       cuf1    Move 1 column left
                       cub     Move N columns right
                       cuf     Move N columns left
                       While sense of vertical motions reversed:
                       mcuu1   Move 1 step down
                       mcud1   Move 1 step up
                       mcuu    Move N steps down
                       mcud    Move N steps up
                       cuu1    Move 1 line down
                       cud1    Move 1 line up
                       cuu     Move N lines down
                       cud     Move N lines up

               The reverse motion modes should not affect the mvpa and mhpa
               absolute  motion  capabilities.  The reverse vertical motion
               mode should, however, also reverse the action  of  the  line
               ``wrapping''  that occurs when a character is printed in the
               right-most position.  Thus printers that have  the  standard
               terminfo  capability  am defined should experience motion to
               the beginning of the  previous  line  when  a  character  is
               printed  in  the  right-most position under reverse vertical
               motion mode.

               The action when any other motion capabilities  are  used  in
               reverse  motion  modes  is  not defined; thus, programs must
               exit reverse motion modes before using other motion capabil-
               ities.

               Two miscellaneous capabilities  complete  the  list  of  new
               motion  capabilities.   One  of these is needed for printers
               that move the current position to the beginning  of  a  line
               when  certain  control  characters,  like  ``line-feed''  or
               ``form-feed,'' are used.  The other is used for the capabil-
               ity  of  suspending  the  motion  that normally occurs after


          Rev.                                                      Page 47





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               printing a character.

                               Miscellaneous Motion Strings
             ________________________________________________________________
             docr    List of control characters causing cr
             zerom   Prevent auto motion after printing next single character

             Margins
               terminfo provides two strings for setting margins on  termi-
               nals:   one  for  the  left  and  one  for the right margin.
               Printers, however, have two additional margins, for the  top
               and bottom margins of each page.  Furthermore, some printers
               do not require using motion  strings  to  move  the  current
               position  to  a  margin and fixing the margin there, as with
               the existing capabilities, but require the specification  of
               where a margin should be regardless of the current position.
               Therefore terminfo offers six additional strings for  defin-
               ing margins with printers.

                                     Setting Margins
                      ______________________________________________
                      smgl    Set left margin at current column
                      smgr    Set right margin at current column
                      smgb    Set soft bottom margin at current line
                      smgt    Set soft top margin at current line
                      smgbp   Set soft bottom margin at line N
                      smglp   Set soft left margin at column N
                      smgrp   Set soft right margin at column N
                      smgtp   Set soft top margin at line N

               The last four strings are used with a  single  argument,  N,
               that  gives  the  line or column number, where line 0 is the
               top line and column 0 is the left-most  column.   Note:  Not
               all printers use 0 for the top line or the left-most column.

               All margins can be cleared with mgc.

             Shadows, Italics, Wide Characters, Superscripts, Subscripts
               Five new sets of strings are used to describe the  capabili-
               ties printers have of enhancing printed text.

                                    Enhanced Printing
                   ____________________________________________________
                   sshm    Enter shadow-printing mode
                   rshm    Exit shadow-printing mode
                   sitm    Enter italicizing mode
                   ritm    Exit italicizing mode
                   swidm   Enter wide character mode
                   rwidm   Exit wide character mode
                   ssupm   Enter superscript mode
                   rsupm   Exit superscript mode




          Rev.                                                      Page 48





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



                   supcs   List of characters available as superscripts
                   ssubm   Enter subscript mode
                   rsubm   Exit subscript mode
                   subcs   List of characters available as subscripts

               If a printer requires the sshm control sequence before every
               character  to  be  shadow-printed,  the  rshm string is left
               blank.  Thus programs that find a control sequence  in  sshm
               but none in rshm should use the sshm control sequence before
               every character to be shadow-printed;  otherwise,  the  sshm
               control sequence should be used once before the set of char-
               acters to be shadow-printed, followed by rshm.  The same  is
               also   true   of   each   of   the  sitm/ritm,  swidm/rwidm,
               ssupm/rsupm, and ssubm/rsubm pairs.

               Note that terminfo also has a capability for printing embol-
               dened  text  (bold).   While  shadow printing and emboldened
               printing are similar in that they ``darken'' the text,  many
               printers  produce  these two types of print in slightly dif-
               ferent ways.  Generally,  emboldened  printing  is  done  by
               overstriking  the  same character one or more times.  Shadow
               printing likewise usually involves overstriking, but with  a
               slight  movement up and/or to the side so that the character
               is ``fatter.''

               It is assumed that enhanced printing modes  are  independent
               modes, so that it would be possible, for instance, to shadow
               print italicized subscripts.

               As mentioned earlier, the  amount  of  motion  automatically
               made  after  printing  a  wide  character should be given in
               widcs.

               If only a subset of the printable ASCII  characters  can  be
               printed as superscripts or subscripts, they should be listed
               in supcs or subcs strings, respectively.  If  the  ssupm  or
               ssubm strings contain control sequences, but the correspond-
               ing supcs or subcs strings are empty, it is assumed that all
               printable  ASCII characters are available as superscripts or
               subscripts.

               Automatic motion made after printing a superscript  or  sub-
               script  is assumed to be the same as for regular characters.
               Thus, for example, printing any of the following three exam-
               ples will result in equivalent motion:
                                         Bi Bi Bi

               Note that the existing  msgr  boolean  capability  describes
               whether  motion  control  sequences  can  be  used  while in
               ``standout mode.''  This capability is extended to cover the
               enhanced  printing modes added here.  msgr should be set for
               those printers that  accept  any  motion  control  sequences
               without  affecting shadow, italicized, widened, superscript,


          Rev.                                                      Page 49





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               or subscript printing.  Conversely, if msgr is  not  set,  a
               program should end these modes before attempting any motion.

             Section 2-5: Alternate Character Sets
               In  addition  to  allowing  you  to  define  line   graphics
               (described  in  Section 1-12), terminfo also lets you define
               alternate character sets.  The following capabilities  cover
               printers and terminals with multiple selectable or definable
               character sets.
                                Alternate Character Sets
                _________________________________________________________
                scs     Select character set N
                scsd    Start definition of character set N, M characters
                defc    Define character A, B dots wide, descender D
                rcsd    End definition of character set N
                csnm    List of character set names
                daisy   Printer has manually changed print-wheels

               The scs, rcsd, and csnm strings are used with a single argu-
               ment, N, a number from 0 to 63 that identifies the character
               set.  The scsd string is also used with the argument  N  and
               another,  M, that gives the number of characters in the set.
               The defc string is used with three arguments:  A  gives  the
               ASCII  code  representation  for  the character, B gives the
               width of the character in dots, and D is zero or one depend-
               ing on whether the character is a ``descender'' or not.  The
               defc string is also followed by a string  of  ``image-data''
               bytes that describe how the character looks (see below).

               Character set 0 is the default character set  present  after
               the  printer has been initialized.  Not every printer has 64
               character sets, of course; using scs with an  argument  that
               doesn't  select  an  available  character set should cause a
               null result from tparm().

               If a character set has to be defined before it can be  used,
               the  scsd control sequence is to be used before defining the
               character set, and the rcsd  is  to  be  used  after.   They
               should  also cause a null result from tparm() when used with
               an argument N that doesn't apply.  If a character set  still
               has  to  be  selected  after  being defined, the scs control
               sequence should follow the rcsd control sequence.   By  exa-
               mining  the results of using each of the scs, scsd, and rcsd
               strings with a character set number in a call to tparm(),  a
               program can determine which of the three are needed.

               Between use of the scsd and rcsd strings,  the  defc  string
               should be used to define each character.  To print any char-
               acter on printers covered by terminfo,  the  ASCII  code  is
               sent  to  the  printer.   This  is true for characters in an
               alternate set as well as ``normal''  characters.   Thus  the
               definition  of  a  character  includes  the  ASCII code that
               represents it.  In addition, the width of the  character  in


          Rev.                                                      Page 50





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               dots is given, along with an indication of whether the char-
               acter should descend below the print line  (like  the  lower
               case letter ``g'' in most character sets).  The width of the
               character in dots also indicates the  number  of  image-data
               bytes  that  will  follow the defc string.  These image-data
               bytes indicate where in a dot-matrix pattern ink  should  be
               applied to ``draw'' the character; the number of these bytes
               and their form are defined below  under  "Dot-Mapped  Graph-
               ics".

               It's easiest for the creator of terminfo entries to refer to
               each character set by number; however, these numbers will be
               meaningless to the application developer.  The  csnm  string
               alleviates this problem by providing names for each number.

               When used with a character set number in a call to  tparm(),
               the  csnm  string  will  produce the equivalent name.  These
               names should be used as a reference only.  No naming conven-
               tion  is  implied,  although  anyone  who creates a terminfo
               entry for a printer should use  names  consistent  with  the
               names  found in user documents for the printer.  Application
               developers should allow a user to specify a character set by
               number (leaving it up to the user to examine the csnm string
               to determine the correct number),  or  by  name,  where  the
               application  examines  the  csnm  string  to  determine  the
               corresponding character set number.

               These capabilities are likely to  be  used  only  with  dot-
               matrix  printers.   If  they  are not available, the strings
               should not be defined.   For  printers  that  have  manually
               changed  print-wheels  or font cartridges, the boolean daisy
               is set.

             Section 2-6: Dot-Matrix Graphics
               Dot-matrix printers typically have the capability of  repro-
               ducing  ``raster-graphics'' images.  Three new numeric capa-
               bilities and three new string capabilities can help  a  pro-
               gram  draw raster-graphics images independent of the type of
               dot-matrix printer or the number of pins or dots the printer
               can handle at one time.

                                   Dot-Matrix Graphics
                 _______________________________________________________
                 npins    Number of pins, N, in print-head
                 spinv    Spacing of pins vertically in pins per inch
                 spinh    Spacing of dots horizontally in dots per inch
                 porder   Matches software bits to print-head pins
                 sbim     Start printing bit image graphics, B bits wide
                 rbim     End printing bit image graphics

               The sbim sring is used with a single argument, B, the  width
               of the image in dots.



          Rev.                                                      Page 51





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               The model of dot-matrix or raster-graphics that the terminfo
               presents  is  similar  to  the  technique used for most dot-
               matrix printers:  Each pass of the printer's  print-head  is
               assumed  to  produce  a dot-matrix that is N dots high and B
               dots wide.  This is typically a wide,  squat,  rectangle  of
               dots.   The  height of this rectangle in dots will vary from
               one printer to the next; this is given in the npins  numeric
               capability.   The  size  of the rectangle in fractions of an
               inch will also vary; it can be deduced from  the  spinv  and
               spinh  numeric  capabilities.   With  these  three values an
               application can divide a complete raster-graphics image into
               several  horizontal strips, perhaps interpolating to account
               for different dot spacing vertically and horizontally.

               The sbim and rbim strings are used to start and end  a  dot-
               matrix  image, respectively.  The sbim string is used with a
               single argument that gives the width of  the  dot-matrix  in
               dots.   A  sequence  of ``image-data bytes'' are sent to the
               printer after the sbim string and before  the  rbim  string.
               The  number of bytes is an integral multiple of the width of
               the dot-matrix; the multiple and the form of  each  byte  is
               determined by the porder string as described below.

               The porder string is a comma separated list of pin  numbers;
               the position of each pin number in the list corresponds to a
               bit in a data byte.  The  pins  are  numbered  consecutively
               from  1  to  npins, with 1 being the top pin.  Note that the
               term ``pin'' is used loosely  here;  ``ink-jet''  dot-matrix
               printers  don't  have pins, but can be considered to have an
               equivalent method of applying a single dot of ink to  paper.
               The  bit  positions  in  porder are in groups of 8, with the
               first position in each group the most  significant  bit  and
               the last position the least significant bit.

               The ``image-data bytes'' are to be computed  from  the  dot-
               matrix  image, mapping vertical dot positions in each print-
               head pass into eight-bit bytes, using  a  1  bit  where  ink
               should  be applied and 0 where no ink should be applied.  If
               a position is skipped in porder, a 0  bit  is  used.   There
               must  be  a  multiple  of 8 bit positions used or skipped in
               porder; if not, 0 bits are used to fill the last byte in the
               least significant bits.

             Section 2-7: Effect of Changing Printing Resolution
               If the control sequences to change the  character  pitch  or
               the line pitch are used, the pin or dot spacing may change:

                                   Dot-Matrix Graphics
                           Changing the Character/Line Pitches
                          ______________________________________
                          cpi       Change character pitch




          Rev.                                                      Page 52





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



                          cpix      If set, cpi changes spinh
                          lpi       Change line pitch
                          lpix      If set, lpi changes spinv

               Programs that use cpi or  lpi  should  recalculate  the  dot
               spacing:  delim $$ define pr 'sup bold prime'

                                          Dot-Matrix Graphics
                            Effects of Changing the Character/Line Pitches
          ___________________________________________________________________________________
              Before                                     After
          ___________________________________________________________________________________
          Using cpi with cpix clear:
          spinh '          $bold spinh$

          Using cpi with cpix set:
          spinh '          $bold spinh = bold spinh ' cdot bold orhi over { bold {orhi '} }$

          Using lpi with lpix clear:
          spinv '          $bold spinv$

          Using lpi with lpix set:
          spinv '          $bold spinv = bold {spinv '} cdot bold orhi over { bold {orhi '}}$

          Using chr:
          spinh '          $bold spinh$

          Using cvr:
          spinv '          $bold spinv$

               orhi' and orhi are the values of the  horizontal  resolution
               in  steps  per  inch,  before using cpi and after using cpi,
               respectively.  Likewise, orvi' and orvi are  the  values  of
               the  vertical resolution in steps per inch, before using lpi
               and after using lpi, respectively.  Thus, the changes in the
               dots  per inch for dot-matrix graphics follow the changes in
               steps per inch for printer resolution.  delim off

             Section 2-8: Print Quality
               Many dot-matrix  printers  can  alter  the  dot  spacing  of
               printed  text to produce near ``letter quality'' printing or
               ``draft quality'' printing.  Usually it is important  to  be
               able to choose one or the other because the rate of printing
               generally falls off as  the  quality  improves.   There  are
               three new strings used to describe these capabilities.

                                      Print Quality
                          _____________________________________
                          snlq    Set near-letter quality print
                          snrmq   Set normal quality print
                          sdrfq   Set draft quality print




          Rev.                                                      Page 53





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               The capabilities are listed in decreasing levels of quality.
               If  a  printer  doesn't have all three levels, one or two of
               the strings should be left blank as appropriate.

             Section 2-9: Printing Rate and Buffer Size
               Because there is no standard protocol that can  be  used  to
               keep  a  program  synchronized  with  a printer, and because
               modern printers can buffer data before printing it,  a  pro-
               gram  generally  cannot  determine at any time what has been
               printed.  Two new numeric capabilities can  help  a  program
               estimate what has been printed.

                                 Print Rate/Buffer Size
                   ___________________________________________________
                   cps     Nominal print rate in characters per second
                   bufsz   Buffer capacity in characters

               cps is the nominal or average  rate  at  which  the  printer
               prints  characters;  if  this  value  is not given, the rate
               should be estimated at one-tenth the prevailing  baud  rate.
               bufsz  is  the  maximum number of subsequent characters buf-
               fered before the guaranteed printing of an  earlier  charac-
               ter,  assuming  proper  flow control has been used.  If this
               value is not given it is assumed that the printer  does  not
               buffer characters, but prints them as they are received.

               As an example, if a printer  has  a  1000-character  buffer,
               then  sending  the  letter ``a'' followed by 1000 additional
               characters is guaranteed to cause the letter ``a'' to print.
               If the same printer prints at the rate of 100 characters per
               second, then it should take 10  seconds  to  print  all  the
               characters  in  the  buffer, less if the buffer is not full.
               By keeping track of the characters sent to  a  printer,  and
               knowing  the  print rate and buffer size, a program can syn-
               chronize itself with the printer.

               Note that most printer manufacturers advertise  the  maximum
               print rate, not the nominal print rate.  A good way to get a
               value to put in for cps is to generate a few pages of  text,
               count  the number of printable characters, then see how long
               it takes to print the text.

               Applications that use  these  values  should  recognize  the
               variability  in  the  print  rate.   Straight text, in short
               lines, with no  embedded  control  sequences  will  probably
               print  at  close  to  the advertised print rate and probably
               faster than the rate in cps.  Graphics data with  a  lot  of
               control sequences, or very long lines of text, will print at
               well below the advertised rate and below the  rate  in  cps.
               If the application is using cps to decide how long it should
               take a printer to print a block  of  text,  the  application
               should pad the estimate.  If the application is using cps to
               decide how much text has already  been  printed,  it  should


          Rev.                                                      Page 54





          TERMINFO(4)          INTERACTIVE UNIX System          TERMINFO(4)



               shrink the estimate.  The application will thus err in favor
               of the user, who wants, above all, to see all the output  in
               its correct place.

          FILES
               /usr/lib/terminfo/?/*    compiled terminal description data-
                                        base
               /usr/lib/.COREterm/?/*   subset   of    compiled    terminal
                                        description database
               /usr/lib/tabset/*        tab settings for some terminals, in
                                        a  format  appropriate to be output
                                        to the terminal  (escape  sequences
                                        that set margins and tabs)

          SEE ALSO
               curses(3X), printf(3S), profile(4).
               tput(1),   vi(1),   captoinfo(1M),   infocmp(1M),   tic(1M),
               term(5),  tty(7)  in the INTERACTIVE UNIX System User/System
               Administrator's Reference Manual.
               Chapter 10 of the Programmer's Guide.

          WARNING
               As described in the "Tabs and Initialization" section above,
               a  terminal's  initialization strings, is1, is2, and is3, if
               defined, must be output before a curses(3X) program is  run.
               An  available  mechanism for outputting such strings is tput
               init [see tput(1) and profile(4)].

               If a null character (\0) is encountered  in  a  string,  the
               null  and all characters after it are lost.  Therefore it is
               not possible to code a null character (\0) and send it to  a
               device  (either  terminal  or  printer).   The suggestion of
               sending a \0200, where a \0 (null)  is  needed  can  succeed
               only  if the device (terminal or printer) ignores the eighth
               bit.  For example, because all eight bits are  used  in  the
               standard  international  ASCII  character  set, devices that
               adhere to this standard will treat  \0200  differently  from
               \0.

               Tampering  with   entries   in   /usr/lib/.COREterm/?/*   or
               /usr/lib/terminfo/?/*  (for example, changing or removing an
               entry) can affect programs such as  vi(1)  that  expect  the
               entry  to  be  present and correct.  In particular, removing
               the description for the "dumb"  terminal  will  cause  unex-
               pected problems.

          NOTE
               The  termcap  database  (from  earlier  releases   of   UNIX
               System V) may not be supplied in future releases.






          Rev.                                                      Page 55



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026