Annotation of 43BSDTahoe/man/man5/termcap.5, revision 1.1

1.1     ! root        1: .\" Copyright (c) 1980 Regents of the University of California.
        !             2: .\" All rights reserved.  The Berkeley software License Agreement
        !             3: .\" specifies the terms and conditions for redistribution.
        !             4: .\"
        !             5: .\"    @(#)termcap.5   6.5 (Berkeley) 9/30/87
        !             6: .\"
        !             7: .ie n \{\
        !             8: .      ds lq \&"\"
        !             9: .      ds rq \&"\"
        !            10: .\}
        !            11: .el \{\
        !            12: .      ds rq ''
        !            13: .      ds lq ``
        !            14: .\}
        !            15: .tr ||
        !            16: .tr *\(**
        !            17: .hw trans-parently
        !            18: .TH TERMCAP 5 "1 November 1985"
        !            19: .UC
        !            20: .SH NAME
        !            21: termcap \- terminal capability data base
        !            22: .SH SYNOPSIS
        !            23: /etc/termcap
        !            24: .SH DESCRIPTION
        !            25: .I Termcap\^
        !            26: is a data base describing terminals,
        !            27: used,
        !            28: .IR e.g. ,
        !            29: by
        !            30: .IR vi\^ (1)
        !            31: and
        !            32: .IR curses\^ (3X).
        !            33: Terminals are described in
        !            34: .I termcap\^
        !            35: by giving a set of capabilities that they have and by describing
        !            36: how operations are performed.
        !            37: Padding requirements and initialization sequences
        !            38: are included in
        !            39: .IR termcap\^ .
        !            40: .PP
        !            41: Entries in
        !            42: .I termcap\^
        !            43: consist of a number of `:'-separated fields.
        !            44: The first entry for each terminal gives the names that are known for the
        !            45: terminal, separated by `|' characters.
        !            46: The first name is always two characters
        !            47: long and is used by older systems which store the terminal type
        !            48: in a 16-bit word in a system-wide data base.
        !            49: The second name given is the most common abbreviation for the terminal,
        !            50: the last name given should be a long name fully identifying the terminal,
        !            51: and all others are understood as synonyms for the terminal name.
        !            52: All names but the first and last
        !            53: should be in lower case and contain no blanks;
        !            54: the last name may well contain
        !            55: upper case and blanks for readability.
        !            56: .PP
        !            57: Terminal names (except for the last, verbose entry)
        !            58: should be chosen using the following conventions.
        !            59: The particular piece of hardware making up the terminal
        !            60: should have a root name chosen, thus \*(lqhp2621\*(rq.
        !            61: This name should not contain hyphens.
        !            62: Modes that the hardware can be in
        !            63: or user preferences
        !            64: should be indicated by appending a hyphen and an indicator of the mode.
        !            65: Therefore, a \*(lqvt100\*(rq in 132-column mode would be \*(lqvt100-w\*(rq.
        !            66: The following suffixes should be used where possible:
        !            67: .sp
        !            68: .ev
        !            69: .ta
        !            70: .ta \w'\fBSuffix\fP\ \ \ 'u +\w'With automatic margins (usually default)\ \ 'u
        !            71: .nf
        !            72: .if t \{\
        !            73: .nr Xx \n(.lu-\n(.i-\w'\fBSuffix\fP\ \ \ With automatic margins (usually default)\ \ vt100-am'u
        !            74: .in +\n(Xxu/2u
        !            75: .\}
        !            76: \fBSuffix      Meaning Example\fP
        !            77: -w     Wide mode (more than 80 columns)        vt100-w
        !            78: -am    With automatic margins (usually default)        vt100-am
        !            79: -nam   Without automatic margins       vt100-nam
        !            80: -\fIn\fP       Number of lines on the screen   aaa-60
        !            81: -na    No arrow keys (leave them in local)     concept100-na
        !            82: -\fIn\^\fPp    Number of pages of memory       concept100-4p
        !            83: -rv    Reverse video   concept100-rv
        !            84: .fi
        !            85: .ev
        !            86: .SH CAPABILITIES
        !            87: .PP
        !            88: The characters in the
        !            89: .I Notes
        !            90: field in the table have the following meanings
        !            91: (more than one may apply to a capability):
        !            92: .PP
        !            93: .ev
        !            94: .ta
        !            95: .ta \w'N\ \ \ 'u
        !            96: .nf
        !            97: N      indicates numeric parameter(s)
        !            98: P      indicates that padding may be specified
        !            99: *      indicates that padding may be based on the number of lines affected
        !           100: o      indicates capability is obsolete
        !           101: .fi
        !           102: .ev
        !           103: .PP
        !           104: \*(lqObsolete\*(rq capabilities have no
        !           105: .I terminfo\^
        !           106: equivalents,
        !           107: since they were considered useless,
        !           108: or are subsumed by other capabilities.
        !           109: New software should not rely on them at all.
        !           110: .PP
        !           111: .nf
        !           112: .ta \w'\fBName  \fP'u +\w'\fBType  \fP'u +\w'\fBNotes  \fP'u
        !           113: \fBName        Type    Notes   Description\fP
        !           114: ae     str     (P)     End alternate character set
        !           115: AL     str     (NP*)   Add \fIn\^\fP new blank lines
        !           116: al     str     (P*)    Add new blank line
        !           117: am     bool            Terminal has automatic margins
        !           118: as     str     (P)     Start alternate character set
        !           119: bc     str     (o)     Backspace if not \fB^H\fP
        !           120: bl     str     (P)     Audible signal (bell)
        !           121: bs     bool    (o)     Terminal can backspace with \fB^H\fP
        !           122: bt     str     (P)     Back tab
        !           123: bw     bool            \fBle\fP (backspace) wraps from column 0 to last column
        !           124: CC     str             Terminal settable command character in prototype
        !           125: cd     str     (P*)    Clear to end of display
        !           126: ce     str     (P)     Clear to end of line
        !           127: ch     str     (NP)    Set cursor column (horizontal position)
        !           128: cl     str     (P*)    Clear screen and home cursor
        !           129: CM     str     (NP)    Memory-relative cursor addressing
        !           130: cm     str     (NP)    Screen-relative cursor motion
        !           131: co     num             Number of columns in a line (See BUGS section below)
        !           132: cr     str     (P)     Carriage return
        !           133: cs     str     (NP)    Change scrolling region (VT100)
        !           134: ct     str     (P)     Clear all tab stops
        !           135: cv     str     (NP)    Set cursor row (vertical position)
        !           136: da     bool            Display may be retained above the screen
        !           137: dB     num     (o)     Milliseconds of \fBbs\fP delay needed (default 0)
        !           138: db     bool            Display may be retained below the screen
        !           139: DC     str     (NP*)   Delete \fIn\^\fP characters
        !           140: dC     num     (o)     Milliseconds of \fBcr\fP delay needed (default 0)
        !           141: dc     str     (P*)    Delete character
        !           142: dF     num     (o)     Milliseconds of \fBff\fP delay needed (default 0)
        !           143: DL     str     (NP*)   Delete \fIn\^\fP lines
        !           144: dl     str     (P*)    Delete line
        !           145: dm     str             Enter delete mode
        !           146: dN     num     (o)     Milliseconds of \fBnl\fP delay needed (default 0)
        !           147: DO     str     (NP*)   Move cursor down \fIn\^\fP lines
        !           148: do     str             Down one line
        !           149: ds     str             Disable status line
        !           150: dT     num     (o)     Milliseconds of horizontal tab delay needed (default 0)
        !           151: dV     num     (o)     Milliseconds of vertical tab delay needed (default 0)
        !           152: ec     str     (NP)    Erase \fIn\^\fP characters
        !           153: ed     str             End delete mode
        !           154: ei     str             End insert mode
        !           155: eo     bool            Can erase overstrikes with a blank
        !           156: EP     bool    (o)     Even parity
        !           157: es     bool            Escape can be used on the status line
        !           158: ff     str     (P*)    Hardcopy terminal page eject
        !           159: fs     str             Return from status line
        !           160: gn     bool            Generic line type (\fIe.g.\fP dialup, switch)
        !           161: hc     bool            Hardcopy terminal
        !           162: HD     bool    (o)     Half-duplex
        !           163: hd     str             Half-line down (forward 1/2 linefeed)
        !           164: ho     str     (P)     Home cursor
        !           165: hs     bool            Has extra \*(lqstatus line\*(rq
        !           166: hu     str             Half-line up (reverse 1/2 linefeed)
        !           167: hz     bool            Cannot print ~s (Hazeltine)
        !           168: i1-i3  str             Terminal initialization strings (\fIterminfo\^\fP only)
        !           169: IC     str     (NP*)   Insert \fIn\^\fP blank characters
        !           170: ic     str     (P*)    Insert character
        !           171: if     str             Name of file containing initialization string
        !           172: im     str             Enter insert mode
        !           173: in     bool            Insert mode distinguishes nulls
        !           174: iP     str             Pathname of program for initialization (\fIterminfo\^\fP only)
        !           175: ip     str     (P*)    Insert pad after character inserted
        !           176: is     str             Terminal initialization string (\fItermcap\^\fP only)
        !           177: it     num             Tabs initially every \fIn\^\fP positions
        !           178: K1     str             Sent by keypad upper left
        !           179: K2     str             Sent by keypad upper right
        !           180: K3     str             Sent by keypad center
        !           181: K4     str             Sent by keypad lower left
        !           182: K5     str             Sent by keypad lower right
        !           183: k0-k9  str             Sent by function keys 0-9
        !           184: kA     str             Sent by insert-line key
        !           185: ka     str             Sent by clear-all-tabs key
        !           186: kb     str             Sent by backspace key
        !           187: kC     str             Sent by clear-screen or erase key
        !           188: kD     str             Sent by delete-character key
        !           189: kd     str             Sent by down-arrow key
        !           190: kE     str             Sent by clear-to-end-of-line key
        !           191: ke     str             Out of \*(lqkeypad transmit\*(rq mode
        !           192: kF     str             Sent by scroll-forward/down key
        !           193: kH     str             Sent by home-down key
        !           194: kh     str             Sent by home key
        !           195: kI     str             Sent by insert-character or enter-insert-mode key
        !           196: kL     str             Sent by delete-line key
        !           197: kl     str             Sent by left-arrow key
        !           198: kM     str             Sent by insert key while in insert mode
        !           199: km     bool            Has a \*(lqmeta\*(rq key (shift, sets parity bit)
        !           200: kN     str             Sent by next-page key
        !           201: kn     num     (o)     Number of function (\fBk0\fP\-\fBk9\fP) keys (default 0)
        !           202: ko     str     (o)     Termcap entries for other non-function keys
        !           203: kP     str             Sent by previous-page key
        !           204: kR     str             Sent by scroll-backward/up key
        !           205: kr     str             Sent by right-arrow key
        !           206: kS     str             Sent by clear-to-end-of-screen key
        !           207: ks     str             Put terminal in \*(lqkeypad transmit\*(rq mode
        !           208: kT     str             Sent by set-tab key
        !           209: kt     str             Sent by clear-tab key
        !           210: ku     str             Sent by up-arrow key
        !           211: l0-l9  str             Labels on function keys if not \*(lqf\fIn\^\fP\*(rq
        !           212: LC     bool    (o)     Lower-case only
        !           213: LE     str     (NP)    Move cursor left \fIn\^\fP positions
        !           214: le     str     (P)     Move cursor left one position
        !           215: li     num             Number of lines on screen or page (See BUGS section below)
        !           216: ll     str             Last line, first column
        !           217: lm     num             Lines of memory if > \fBli\fP (0 means varies)
        !           218: ma     str     (o)     Arrow key map (used by \fIvi\^\fP version 2 only)
        !           219: mb     str             Turn on blinking attribute
        !           220: md     str             Turn on bold (extra bright) attribute
        !           221: me     str             Turn off all attributes
        !           222: mh     str             Turn on half-bright attribute
        !           223: mi     bool            Safe to move while in insert mode
        !           224: mk     str             Turn on blank attribute (characters invisible)
        !           225: ml     str     (o)     Memory lock on above cursor
        !           226: mm     str             Turn on \*(lqmeta mode\*(rq (8th bit)
        !           227: mo     str             Turn off \*(lqmeta mode\*(rq
        !           228: mp     str             Turn on protected attribute
        !           229: mr     str             Turn on reverse-video attibute
        !           230: ms     bool            Safe to move in standout modes
        !           231: mu     str     (o)     Memory unlock (turn off memory lock)
        !           232: nc     bool    (o)     No correctly-working \fBcr\fP (Datamedia 2500, Hazeltine 2000)
        !           233: nd     str             Non-destructive space (cursor right)
        !           234: NL     bool    (o)     \fB\\n\fP is newline, not line feed
        !           235: nl     str     (o)     Newline character if not \fB\\n\fP
        !           236: ns     bool    (o)     Terminal is a \s-1CRT\s0 but doesn't scroll
        !           237: nw     str     (P)     Newline (behaves like \fBcr\fP followed by \fBdo\fP)
        !           238: OP     bool    (o)     Odd parity
        !           239: os     bool            Terminal overstrikes
        !           240: pb     num             Lowest baud where delays are required
        !           241: pc     str             Pad character (default \s-2NUL\s0)
        !           242: pf     str             Turn off the printer
        !           243: pk     str             Program function key \fIn\^\fP to type string \fIs\fP (\fIterminfo\^\fP only)
        !           244: pl     str             Program function key \fIn\^\fP to execute string \fIs\fP (\fIterminfo\^\fP only)
        !           245: pO     str     (N)     Turn on the printer for \fIn\^\fP bytes
        !           246: po     str             Turn on the printer
        !           247: ps     str             Print contents of the screen
        !           248: pt     bool    (o)     Has hardware tabs (may need to be set with \fBis\fP)
        !           249: px     str             Program function key \fIn\^\fP to transmit string \fIs\fP (\fIterminfo\^\fP only)
        !           250: r1-r3  str             Reset terminal completely to sane modes (\fIterminfo\^\fP only)
        !           251: rc     str     (P)     Restore cursor to position of last \fBsc\fP
        !           252: rf     str             Name of file containing reset codes
        !           253: RI     str     (NP)    Move cursor right \fIn\^\fP positions
        !           254: rp     str     (NP*)   Repeat character \fIc n\^\fP times
        !           255: rs     str             Reset terminal completely to sane modes (\fItermcap\^\fP only)
        !           256: sa     str     (NP)    Define the video attributes
        !           257: sc     str     (P)     Save cursor position
        !           258: se     str             End standout mode
        !           259: SF     str     (NP*)   Scroll forward \fIn\^\fP lines
        !           260: sf     str     (P)     Scroll text up
        !           261: sg     num             Number of garbage chars left by \fBso\fP or \fBse\fP (default 0)
        !           262: so     str             Begin standout mode
        !           263: SR     str     (NP*)   Scroll backward \fIn\^\fP lines
        !           264: sr     str     (P)     Scroll text down
        !           265: st     str             Set a tab in all rows, current column
        !           266: ta     str     (P)     Tab to next 8-position hardware tab stop
        !           267: tc     str             Entry of similar terminal \- must be last
        !           268: te     str             String to end programs that use \fItermcap\fP
        !           269: ti     str             String to begin programs that use \fItermcap\fP
        !           270: ts     str     (N)     Go to status line, column \fIn\^\fP
        !           271: UC     bool    (o)     Upper-case only
        !           272: uc     str             Underscore one character and move past it
        !           273: ue     str             End underscore mode
        !           274: ug     num             Number of garbage chars left by \fBus\fP or \fBue\fP (default 0)
        !           275: ul     bool            Underline character overstrikes
        !           276: UP     str     (NP*)   Move cursor up \fIn\^\fP lines
        !           277: up     str             Upline (cursor up)
        !           278: us     str             Start underscore mode
        !           279: vb     str             Visible bell (must not move cursor)
        !           280: ve     str             Make cursor appear normal (undo \fBvs\fP/\fBvi\fP)
        !           281: vi     str             Make cursor invisible
        !           282: vs     str             Make cursor very visible
        !           283: vt     num             Virtual terminal number (not supported on all systems)
        !           284: wi     str     (N)     Set current window
        !           285: ws     num             Number of columns in status line
        !           286: xb     bool            Beehive (f1=\s-2ESC\s0, f2=^C)
        !           287: xn     bool            Newline ignored after 80 cols (Concept)
        !           288: xo     bool            Terminal uses xoff/xon (\s-2DC3\s0/\s-2DC1\s0) handshaking
        !           289: xr     bool    (o)     Return acts like \fBce cr nl\fP (Delta Data)
        !           290: xs     bool            Standout not erased by overwriting (Hewlett-Packard)
        !           291: xt     bool            Tabs ruin, magic \fBso\fP char (Teleray 1061)
        !           292: xx     bool    (o)     Tektronix 4025 insert-line
        !           293: .fi
        !           294: .ta 8n +8n
        !           295: .PP
        !           296: .B A Sample Entry
        !           297: .PP
        !           298: The following entry, which describes the Concept\-100, is among the more
        !           299: complex entries in the
        !           300: .I termcap\^
        !           301: file as of this writing.
        !           302: .PP
        !           303: .nf
        !           304: ca\||\|concept100\||\|c100\||\|concept\||\|c104\||\|concept100-4p\||\|HDS Concept\-100:\e
        !           305:        :al=3*\eE^R:am:bl=^G:cd=16*\eE^C:ce=16\eE^U:cl=2*^L:cm=\eEa%+ %+ :\e
        !           306:        :co#80:.cr=9^M:db:dc=16\eE^A:dl=3*\eE^B:do=^J:ei=\eE\e200:eo:im=\eE^P:in:\e
        !           307:        :ip=16*:is=\eEU\eEf\eE7\eE5\eE8\eEl\eENH\eEK\eE\e200\eEo&\e200\eEo\e47\eE:k1=\eE5:\e
        !           308:        :k2=\eE6:k3=\eE7:kb=^h:kd=\eE<:ke=\eEx:kh=\eE?:kl=\eE>:kr=\eE=:ks=\eEX:\e
        !           309:        :ku=\eE;:le=^H:li#24:mb=\eEC:me=\eEN\e200:mh=\eEE:mi:mk=\eEH:mp=\eEI:\e
        !           310:        :mr=\eED:nd=\eE=:pb#9600:rp=0.2*\eEr%.%+ :se=\eEd\eEe:sf=^J:so=\eEE\eED:\e
        !           311:        :.ta=8\et:te=\eEv    \e200\e200\e200\e200\e200\e200\eEp\er\en:\e
        !           312:        :ti=\eEU\eEv  8p\eEp\er:ue=\eEg:ul:up=\eE;:us=\eEG:\e
        !           313:        :vb=\eEk\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\eEK:\e
        !           314:        :ve=\eEw:vs=\eEW:vt#8:xn:\e
        !           315:        :bs:cr=^M:dC#9:dT#8:nl=^J:ta=^I:pt:
        !           316: .fi
        !           317: .PP
        !           318: Entries may continue onto multiple lines by giving a \e as the last
        !           319: character of a line, and empty fields
        !           320: may be included for readability (here between the last field on a line
        !           321: and the first field on the next).
        !           322: Comments may be included on lines beginning with \*(lq#\*(rq.
        !           323: .br
        !           324: .ne 5
        !           325: .PP
        !           326: .B Types of Capabilities
        !           327: .PP
        !           328: Capabilities in
        !           329: .I termcap\^
        !           330: are of three types: Boolean capabilities,
        !           331: which indicate particular features that the terminal has;
        !           332: numeric capabilities,
        !           333: giving the size of the display or the size of other attributes;
        !           334: and string capabilities,
        !           335: which give character sequences that can be used to perform particular
        !           336: terminal operations.
        !           337: All capabilities have two-letter codes.
        !           338: For instance, the fact that
        !           339: the Concept has
        !           340: .I automatic margins
        !           341: .RI ( i.e. ,
        !           342: an automatic return and linefeed
        !           343: when the end of a line is reached) is indicated by the Boolean capability
        !           344: .BR am .
        !           345: Hence the description of the Concept includes
        !           346: .BR am .
        !           347: .PP
        !           348: Numeric capabilities are followed by the character `#' then the value.
        !           349: In the example above
        !           350: .BR co ,
        !           351: which indicates the number of columns the display has,
        !           352: gives the value `80' for the Concept.
        !           353: .PP
        !           354: Finally, string-valued capabilities, such as
        !           355: .B ce
        !           356: (clear-to-end-of-line
        !           357: sequence) are given by the two-letter code, an `=', then a string
        !           358: ending at the next following `:'.
        !           359: A delay in milliseconds may appear after
        !           360: the `=' in such a capability,
        !           361: which causes padding characters to be supplied by
        !           362: .I tputs\^
        !           363: after the remainder of the string is sent to provide this delay.
        !           364: The delay can be either a number,
        !           365: .I e.g.
        !           366: `20', or a number followed by
        !           367: an `*',
        !           368: .IR i.e. ,
        !           369: `3*'.
        !           370: An `*' indicates that the padding required is proportional
        !           371: to the number of lines affected by the operation, and the amount given is
        !           372: the per-affected-line padding required.
        !           373: (In the case of insert-character,
        !           374: the factor is still the number of
        !           375: .I lines\^
        !           376: affected;
        !           377: this is always 1 unless the terminal has
        !           378: .B in
        !           379: and the software uses it.)
        !           380: When an `*' is specified, it is sometimes useful to give a delay of the form
        !           381: `3.5' to specify a delay per line to tenths of milliseconds.
        !           382: (Only one decimal place is allowed.)
        !           383: .PP
        !           384: A number of escape sequences are provided in the string-valued capabilities
        !           385: for easy encoding of control characters there.
        !           386: .B \eE
        !           387: maps to an \s-2ESC\s0
        !           388: character,
        !           389: .B ^X
        !           390: maps to a control-X for any appropriate X,
        !           391: and the sequences
        !           392: .B \en
        !           393: .B \er
        !           394: .B \et
        !           395: .B \eb
        !           396: .B \ef
        !           397: map to linefeed, return, tab, backspace, and formfeed, respectively.
        !           398: Finally, characters may be given as three octal digits after a
        !           399: .BR \e ,
        !           400: and the characters
        !           401: .B ^
        !           402: and
        !           403: .B \e
        !           404: may be given as
        !           405: .B \e^
        !           406: and
        !           407: .BR \e\e .
        !           408: If it is necessary to place a
        !           409: .B :
        !           410: in a capability it must be escaped in
        !           411: octal as
        !           412: .BR \e072 .
        !           413: If it is necessary to place a \s-2NUL\s0
        !           414: character in a string capability it
        !           415: must be encoded as
        !           416: .BR \e200 .
        !           417: (The routines that deal with
        !           418: .I termcap\^
        !           419: use C strings and strip the high bits of the output very late, so that
        !           420: a
        !           421: .B \e200
        !           422: comes out as a
        !           423: .B \e000
        !           424: would.)
        !           425: .PP
        !           426: Sometimes individual capabilities must be commented out.
        !           427: To do this, put a period before the capability name.
        !           428: For example, see the first
        !           429: .B cr
        !           430: and
        !           431: .B ta
        !           432: in the example above.
        !           433: .br
        !           434: .ne 5
        !           435: .PP
        !           436: .B Preparing Descriptions
        !           437: .PP
        !           438: We now outline how to prepare descriptions of terminals.
        !           439: The most effective way to prepare a terminal description is by imitating
        !           440: the description of a similar terminal in
        !           441: .I termcap\^
        !           442: and to build up a description gradually, using partial descriptions
        !           443: with
        !           444: .I vi\^
        !           445: to check that they are correct.
        !           446: Be aware that a very unusual terminal may expose deficiencies in
        !           447: the ability of the
        !           448: .I termcap\^
        !           449: file to describe it
        !           450: or bugs in
        !           451: .IR vi\^ .
        !           452: To easily test a new terminal description you are working on
        !           453: you can put it in your home directory in a file called
        !           454: .I .termcap\^
        !           455: and programs will look there before looking in
        !           456: .IR /etc/termcap\^ .
        !           457: You can also set the environment variable
        !           458: .B
        !           459: .SM TERMPATH
        !           460: to a list of absolute file pathnames (separated by spaces or colons),
        !           461: one of which contains the description you are working on,
        !           462: and programs will search them in the order listed, and nowhere else.
        !           463: See
        !           464: .IR termcap\^ (3X).
        !           465: The
        !           466: .B
        !           467: .SM TERMCAP
        !           468: environment variable is usually set to the
        !           469: .I termcap\^
        !           470: entry itself
        !           471: to avoid reading files when starting up a program.
        !           472: .PP
        !           473: To get the padding for insert-line right
        !           474: (if the terminal manufacturer did not document it),
        !           475: a severe test is to use
        !           476: .I vi\^
        !           477: to edit
        !           478: .I /etc/passwd\^
        !           479: at 9600 baud, delete roughly 16 lines from the middle of the screen,
        !           480: then hit the `u' key several times quickly.
        !           481: If the display messes up, more padding is usually needed.
        !           482: A similar test can be used for insert-character.
        !           483: .br
        !           484: .ne 5
        !           485: .PP
        !           486: .B Basic Capabilities
        !           487: .PP
        !           488: The number of columns on each line of the display is given by the
        !           489: .B co
        !           490: numeric capability.
        !           491: If the display is a \s-1CRT\s0, then the
        !           492: number of lines on the screen is given by the
        !           493: .B li
        !           494: capability.
        !           495: If the display wraps around to the beginning of the next line when
        !           496: the cursor reaches the right margin, then it should have the
        !           497: .B am
        !           498: capability.
        !           499: If the terminal can clear its screen,
        !           500: the code to do this is given by the
        !           501: .B cl
        !           502: string capability.
        !           503: If the terminal overstrikes
        !           504: (rather than clearing the position when a character is overwritten),
        !           505: it should have the
        !           506: .B os
        !           507: capability.
        !           508: If the terminal is a printing terminal,
        !           509: with no soft copy unit,
        !           510: give it both
        !           511: .B hc
        !           512: and
        !           513: .BR os .
        !           514: .RB ( os
        !           515: applies to storage scope terminals,
        !           516: such as the Tektronix 4010 series,
        !           517: as well as to hard copy and
        !           518: .SM APL
        !           519: terminals.)
        !           520: If there is a code to move the cursor to the left edge of the current row,
        !           521: give this as
        !           522: .BR cr .
        !           523: (Normally this will be carriage-return,
        !           524: .BR ^M .)
        !           525: If there is a code to produce an audible signal (bell, beep,
        !           526: .IR etc.\^ ),
        !           527: give this as
        !           528: .BR bl .
        !           529: .PP
        !           530: If there is a code (such as backspace)
        !           531: to move the cursor one position to the left,
        !           532: that capability should be given as
        !           533: .BR le .
        !           534: Similarly,
        !           535: codes to move to the right, up, and down
        !           536: should be given as
        !           537: .BR nd ,
        !           538: .BR up ,
        !           539: and
        !           540: .BR do ,
        !           541: respectively.
        !           542: These
        !           543: .I local cursor motions\^
        !           544: should not alter the text they pass over;
        !           545: for example, you would not normally use
        !           546: \*(lqnd=\ \*(rq
        !           547: unless the terminal has the
        !           548: .B os
        !           549: capability,
        !           550: because the space would erase the character moved over.
        !           551: .PP
        !           552: A very important point here is that the local cursor motions encoded
        !           553: in
        !           554: .I termcap\^
        !           555: have undefined behavior at the left and top edges of a
        !           556: .SM CRT
        !           557: display.
        !           558: Programs should never attempt to backspace around the left edge,
        !           559: unless
        !           560: .B bw
        !           561: is given, and never attempt to go up off the top
        !           562: using local cursor motions.
        !           563: .PP
        !           564: In order to scroll text up,
        !           565: a program goes to the bottom left corner of the screen and sends the
        !           566: .B sf
        !           567: (index) string.
        !           568: To scroll text down,
        !           569: a program goes to the top left corner of the screen and sends the
        !           570: .B sr
        !           571: (reverse index) string.
        !           572: The strings
        !           573: .B sf
        !           574: and
        !           575: .B sr
        !           576: have undefined behavior
        !           577: when not on their respective corners of the screen.
        !           578: Parameterized versions of the scrolling sequences are
        !           579: .B SF
        !           580: and
        !           581: .BR SR ,
        !           582: which have the same semantics as
        !           583: .B sf
        !           584: and
        !           585: .B sr
        !           586: except that they take one parameter
        !           587: and scroll that many lines.
        !           588: They also have undefined behavior
        !           589: except at the appropriate corner of the screen.
        !           590: .PP
        !           591: The
        !           592: .B am
        !           593: capability tells whether the cursor sticks at the right
        !           594: edge of the screen when text is output there,
        !           595: but this does not necessarily apply to
        !           596: .B nd
        !           597: from the last column.
        !           598: Leftward local motion is defined from the left edge only when
        !           599: .B bw
        !           600: is given; then an
        !           601: .B le
        !           602: from the left edge will move to the right edge of the previous row.
        !           603: This is useful for drawing a box around the edge of the screen,
        !           604: for example.
        !           605: If the terminal has switch-selectable automatic margins,
        !           606: the
        !           607: .I termcap\^
        !           608: description usually assumes that this feature is on,
        !           609: .IR i.e. ,
        !           610: .BR am .
        !           611: If the terminal has a command
        !           612: that moves to the first column of the next line,
        !           613: that command can be given as
        !           614: .B nw
        !           615: (newline).
        !           616: It is permissible for this to clear the remainder of the current line,
        !           617: so if the terminal has no correctly-working \s-2CR\s0 and \s-2LF\s0
        !           618: it may still be possible to craft a working
        !           619: .B nw
        !           620: out of one or both of them.
        !           621: .PP
        !           622: These capabilities suffice to describe hardcopy and \*(lqglass-tty\*(rq terminals.
        !           623: Thus the Teletype model 33 is described as
        !           624: .PP
        !           625: .nf
        !           626:        T3\||\|tty33\||\|33\||\|tty\||\|Teletype model 33:\e
        !           627:                :bl=^G:co#72:cr=^M:do=^J:hc:os:
        !           628: .fi
        !           629: .PP
        !           630: and the Lear Siegler \s-1ADM\s0\-3 is described as
        !           631: .PP
        !           632: .nf
        !           633:        l3\||\|adm3\||\|3\||\|LSI \s-1ADM\s0-3:\e
        !           634:                :am:bl=^G:cl=^Z:co#80:cr=^M:do=^J:le=^H:li#24:sf=^J:
        !           635: .fi
        !           636: .br
        !           637: .ne 5
        !           638: .PP
        !           639: .B Parameterized Strings
        !           640: .PP
        !           641: Cursor addressing and other strings requiring parameters
        !           642: are described by a
        !           643: parameterized string capability, with 
        !           644: .IR printf\^ (3S)-like
        !           645: escapes
        !           646: .B %x
        !           647: in it,
        !           648: while other characters are passed through unchanged.
        !           649: For example, to address the cursor the
        !           650: .B cm
        !           651: capability is given, using two parameters: the row and column to move to.
        !           652: (Rows and columns are numbered from zero and refer to the physical screen
        !           653: visible to the user, not to any unseen memory.
        !           654: If the terminal has memory-relative cursor addressing,
        !           655: that can be indicated by an analogous
        !           656: .B CM
        !           657: capability.)
        !           658: .PP
        !           659: The
        !           660: .B %
        !           661: encodings have the following meanings:
        !           662: .PP
        !           663: .DT
        !           664: .nf
        !           665:        %%      output `%'
        !           666:        %d      output value as in \fIprintf\^\fP %d
        !           667:        %2      output value as in \fIprintf\^\fP %2d
        !           668:        %3      output value as in \fIprintf\^\fP %3d
        !           669:        %.      output value as in \fIprintf\^\fP %c
        !           670:        %+\fIx\fP       add \fIx\^\fP to value, then do %.
        !           671:        %>\fIxy\fP      if value > \fIx\^\fP then add \fIy\^\fP, no output
        !           672:        %r      reverse order of two parameters, no output
        !           673:        %i      increment by one, no output
        !           674:        %n      exclusive-or all parameters with 0140 (Datamedia 2500)
        !           675:        %B      BCD (16*(value/10)) + (value%10), no output
        !           676:        %D      Reverse coding (value \- 2*(value%16)), no output (Delta Data)
        !           677: .fi
        !           678: .PP
        !           679: Consider the Hewlett-Packard 2645, which, to get to row 3 and column 12, needs
        !           680: to be sent \*(lq\eE&a12c03Y\*(rq padded for 6 milliseconds.
        !           681: Note that the order
        !           682: of the row and column coordinates is reversed here
        !           683: and that the row and column
        !           684: are sent as two-digit integers.
        !           685: Thus its
        !           686: .B cm
        !           687: capability is \*(lqcm=6\eE&%r%2c%2Y\*(rq.
        !           688: .PP
        !           689: The Microterm
        !           690: .SM ACT-IV
        !           691: needs the current row and column sent
        !           692: simply encoded in binary
        !           693: preceded by a
        !           694: .BR ^T ,
        !           695: \*(lqcm=^T%.%.\*(rq.
        !           696: Terminals that use \*(lq%.\*(rq need to be able to
        !           697: backspace the cursor
        !           698: .RB ( le )
        !           699: and to move the cursor up one line on the screen
        !           700: .RB ( up ).
        !           701: This is necessary because it is not always safe to transmit
        !           702: .BR \en ,
        !           703: .BR ^D ,
        !           704: and
        !           705: .BR \er ,
        !           706: as the system may change or discard them.
        !           707: (Programs using
        !           708: .I termcap\^
        !           709: must set terminal modes so that tabs are not expanded, so
        !           710: .B \et
        !           711: is safe to send.
        !           712: This turns out to be essential for the Ann Arbor 4080.)
        !           713: .PP
        !           714: A final example is the Lear Siegler \s-1ADM\s0\-3a,
        !           715: which offsets row and column
        !           716: by a blank character, thus \*(lqcm=\eE=%+ %+ \*(rq.
        !           717: .PP
        !           718: Row or column absolute cursor addressing
        !           719: can be given as single parameter capabilities
        !           720: .B ch
        !           721: (horizontal position absolute) and
        !           722: .B cv
        !           723: (vertical position absolute).
        !           724: Sometimes these are shorter than the more general two-parameter sequence
        !           725: (as with the Hewlett-Packard 2645) and can be used in preference to
        !           726: .BR cm .
        !           727: If there are parameterized local motions
        !           728: .RI ( e.g. ,
        !           729: move
        !           730: .I n\^
        !           731: positions to the right)
        !           732: these can be given as
        !           733: .BR DO ,
        !           734: .BR LE ,
        !           735: .BR RI ,
        !           736: and
        !           737: .B UP
        !           738: with a single parameter indicating how many positions to move.
        !           739: These are primarily useful if the terminal does not have
        !           740: .BR cm ,
        !           741: such as the Tektronix 4025.
        !           742: .br
        !           743: .ne 5
        !           744: .PP
        !           745: .B Cursor Motions
        !           746: .PP
        !           747: If the terminal has a fast way to home the cursor
        !           748: (to the very upper left corner of the screen), this can be given as
        !           749: .BR ho .
        !           750: Similarly, a fast way of getting to the lower left-hand corner
        !           751: can be given as
        !           752: .BR ll ;
        !           753: this may involve going up with
        !           754: .B up
        !           755: from the home position,
        !           756: but a program should never do this itself (unless
        !           757: .B ll
        !           758: does), because it can
        !           759: make no assumption about the effect of moving up from the home position.
        !           760: Note that the home position is the same as
        !           761: cursor address (0,0): to the top left corner of the screen, not of memory.
        !           762: (Therefore, the \*(lq\eEH\*(rq sequence on Hewlett-Packard terminals
        !           763: cannot be used for
        !           764: .BR ho .)
        !           765: .br
        !           766: .ne 5
        !           767: .PP
        !           768: .B Area Clears
        !           769: .PP
        !           770: If the terminal can clear from the current position to the end of the
        !           771: line, leaving the cursor where it is, this should be given as
        !           772: .BR ce .
        !           773: If the terminal can clear from the current position to the end of the
        !           774: display, this should be given as
        !           775: .BR cd .
        !           776: .B cd
        !           777: must only be invoked from the first column of a line.
        !           778: (Therefore,
        !           779: it can be simulated by a request to delete a large number of lines,
        !           780: if a true
        !           781: .B cd
        !           782: is not available.)
        !           783: .br
        !           784: .ne 5
        !           785: .PP
        !           786: .B Insert/Delete Line
        !           787: .PP
        !           788: If the terminal can open a new blank line
        !           789: before the line containing the cursor,
        !           790: this should be given as
        !           791: .BR al ;
        !           792: this must be invoked only from the first
        !           793: position of a line.
        !           794: The cursor must then appear at the left of the newly blank line.
        !           795: If the terminal can delete the line that the cursor is on, this
        !           796: should be given as
        !           797: .BR dl ;
        !           798: this must only be used from the first position on
        !           799: the line to be deleted.
        !           800: Versions of
        !           801: .B al
        !           802: and
        !           803: .B dl
        !           804: which take a single parameter
        !           805: and insert or delete that many lines
        !           806: can be given as
        !           807: .B AL
        !           808: and
        !           809: .BR DL .
        !           810: If the terminal has a settable scrolling region
        !           811: (like the VT100),
        !           812: the command to set this can be described with the
        !           813: .B cs
        !           814: capability,
        !           815: which takes two parameters: the top and bottom lines of the scrolling region.
        !           816: The cursor position is, alas, undefined after using this command.
        !           817: It is possible to get the effect of insert or delete line
        !           818: using this command \(em the
        !           819: .B sc
        !           820: and
        !           821: .B rc
        !           822: (save and restore cursor) commands are also useful.
        !           823: Inserting lines at the top or bottom of the screen can also be done using
        !           824: .B sr
        !           825: or
        !           826: .B sf
        !           827: on many terminals without a true insert/delete line,
        !           828: and is often faster even on terminals with those features.
        !           829: .PP
        !           830: If the terminal has the ability to define a window as part of memory
        !           831: which all commands affect, it should be given as the parameterized string
        !           832: .BR wi .
        !           833: The four parameters are the starting and ending lines in memory
        !           834: and the starting and ending columns in memory, in that order.
        !           835: (This
        !           836: .I terminfo\^
        !           837: capability is described for completeness.
        !           838: It is unlikely that any
        !           839: .IR termcap\^ -using
        !           840: program will support it.)
        !           841: .PP
        !           842: If the terminal can retain display memory above the screen, then the
        !           843: .B da
        !           844: capability should be given;
        !           845: if display memory can be retained
        !           846: below, then
        !           847: .B db
        !           848: should be given.
        !           849: These indicate
        !           850: that deleting a line or scrolling may bring non-blank lines up from below
        !           851: or that scrolling back with
        !           852: .B sr
        !           853: may bring down non-blank lines.
        !           854: .br
        !           855: .ne 5
        !           856: .PP
        !           857: .B Insert/Delete Character
        !           858: .PP
        !           859: There are two basic kinds of intelligent terminals with respect to
        !           860: insert/delete character that can be described using
        !           861: .IR termcap\^ .
        !           862: The most common insert/delete character operations affect only the characters
        !           863: on the current line and shift characters off the end of the line rigidly.
        !           864: Other terminals, such as the Concept\-100 and the Perkin Elmer Owl, make
        !           865: a distinction between typed and untyped blanks on the screen, shifting
        !           866: upon an insert or delete only to an untyped blank on the screen which is
        !           867: either eliminated or expanded to two untyped blanks.
        !           868: You can determine
        !           869: the kind of terminal you have by clearing the screen then typing
        !           870: text separated by cursor motions.
        !           871: Type \*(lqabc\ \ \ \ def\*(rq using local
        !           872: cursor motions (not spaces) between the \*(lqabc\*(rq and the \*(lqdef\*(rq.
        !           873: Then position the cursor before the \*(lqabc\*(rq and put the terminal in insert
        !           874: mode.
        !           875: If typing characters causes the rest of the line to shift
        !           876: rigidly and characters to fall off the end, then your terminal does
        !           877: not distinguish between blanks and untyped positions.
        !           878: If the \*(lqabc\*(rq
        !           879: shifts over to the \*(lqdef\*(rq which then move together around the end of the
        !           880: current line and onto the next as you insert, then you have the second type of
        !           881: terminal and should give the capability \fBin\fP, which stands for
        !           882: \*(lqinsert null\*(rq.
        !           883: While these are two logically separate attributes
        !           884: (one line
        !           885: .I vs.
        !           886: multi-line insert mode,
        !           887: and special treatment of untyped spaces),
        !           888: we have seen no terminals whose insert
        !           889: mode cannot be described with the single attribute.
        !           890: .PP
        !           891: .I Termcap\^
        !           892: can describe both terminals that have an insert mode and terminals
        !           893: that send a simple sequence to open a blank position on the current line.
        !           894: Give as
        !           895: .B im
        !           896: the sequence to get into insert mode.
        !           897: Give as
        !           898: .B ei
        !           899: the sequence to leave insert mode.
        !           900: Now give as
        !           901: .B ic
        !           902: any sequence that needs to be sent just before
        !           903: each character to be inserted.
        !           904: Most terminals with a true insert mode
        !           905: will not give
        !           906: .BR ic ;
        !           907: terminals that use a sequence to open a screen
        !           908: position should give it here.
        !           909: (If your terminal has both,
        !           910: insert mode is usually preferable to
        !           911: .BR ic .
        !           912: Do not give both unless the terminal actually requires both to be used
        !           913: in combination.)
        !           914: If post-insert padding is needed, give this as a number of milliseconds
        !           915: in
        !           916: .B ip
        !           917: (a string option).
        !           918: Any other sequence that may need to be
        !           919: sent after insertion of a single character can also be given in
        !           920: .BR ip .
        !           921: If your terminal needs to be placed into an `insert mode'
        !           922: and needs a special code preceding each inserted character,
        !           923: then both
        !           924: .BR im / ei
        !           925: and
        !           926: .B ic
        !           927: can be given, and both will be used.
        !           928: The
        !           929: .B IC
        !           930: capability, with one parameter
        !           931: .IR n\^ ,
        !           932: will repeat the effects of
        !           933: .B ic
        !           934: .I n\^
        !           935: times.
        !           936: .PP
        !           937: It is occasionally necessary to move around while in insert mode
        !           938: to delete characters on the same line
        !           939: .RI ( e.g. ,
        !           940: if there is a tab after
        !           941: the insertion position).
        !           942: If your terminal allows motion while in
        !           943: insert mode, you can give the capability
        !           944: .B mi
        !           945: to speed up inserting
        !           946: in this case.
        !           947: Omitting
        !           948: .B mi
        !           949: will affect only speed.
        !           950: Some terminals
        !           951: (notably Datamedia's) must not have
        !           952: .B mi
        !           953: because of the way their
        !           954: insert mode works.
        !           955: .PP
        !           956: Finally, you can specify
        !           957: .B dc
        !           958: to delete a single character,
        !           959: .B DC
        !           960: with one parameter
        !           961: .I n\^
        !           962: to delete
        !           963: .I n\^
        !           964: characters,
        !           965: and delete mode by giving
        !           966: .B dm
        !           967: and
        !           968: .B ed
        !           969: to enter and exit delete mode
        !           970: (which is any mode the terminal needs to be placed in for
        !           971: .B dc
        !           972: to work).
        !           973: .br
        !           974: .ne 5
        !           975: .PP
        !           976: .B Highlighting, Underlining, and Visible Bells
        !           977: .PP
        !           978: If your terminal has one or more kinds of display attributes,
        !           979: these can be represented in a number of different ways.
        !           980: You should choose one display form as
        !           981: .IR "standout mode" ,
        !           982: representing a good high-contrast, easy-on-the-eyes format
        !           983: for highlighting error messages and other attention getters.
        !           984: (If you have a choice, reverse video plus half-bright is good,
        !           985: or reverse video alone.)
        !           986: The sequences to enter and exit standout mode
        !           987: are given as
        !           988: .B so
        !           989: and
        !           990: .BR se ,
        !           991: respectively.
        !           992: If the code to change into or out of standout
        !           993: mode leaves one or even two blank spaces or garbage characters on the screen,
        !           994: as the TVI 912 and Teleray 1061 do,
        !           995: then
        !           996: .B sg
        !           997: should be given to tell how many characters are left.
        !           998: .PP
        !           999: Codes to begin underlining and end underlining can be given as
        !          1000: .B us
        !          1001: and
        !          1002: .BR ue ,
        !          1003: respectively.
        !          1004: Underline mode change garbage is specified by
        !          1005: .BR ug ,
        !          1006: similar to
        !          1007: .BR sg .
        !          1008: If the terminal has a code to underline the current character and move
        !          1009: the cursor one position to the right, 
        !          1010: such as the Microterm Mime,
        !          1011: this can be given as
        !          1012: .BR uc .
        !          1013: .PP
        !          1014: Other capabilities to enter various highlighting modes include
        !          1015: .B mb
        !          1016: (blinking),
        !          1017: .B md
        !          1018: (bold or extra bright),
        !          1019: .B mh
        !          1020: (dim or half-bright),
        !          1021: .B mk
        !          1022: (blanking or invisible text),
        !          1023: .B mp
        !          1024: (protected),
        !          1025: .B mr
        !          1026: (reverse video),
        !          1027: .B me
        !          1028: (turn off
        !          1029: .I all
        !          1030: attribute modes),
        !          1031: .B as
        !          1032: (enter alternate character set mode), and
        !          1033: .B ae
        !          1034: (exit alternate character set mode).
        !          1035: Turning on any of these modes singly may or may not turn off other modes.
        !          1036: .PP
        !          1037: If there is a sequence to set arbitrary combinations of mode,
        !          1038: this should be given as
        !          1039: .B sa
        !          1040: (set attributes), taking 9 parameters.
        !          1041: Each parameter is either 0 or 1,
        !          1042: as the corresponding attributes is on or off.
        !          1043: The 9 parameters are, in order: standout, underline, reverse, blink,
        !          1044: dim, bold, blank, protect, and alternate character set.
        !          1045: Not all modes need be supported by
        !          1046: .BR sa ,
        !          1047: only those for which corresponding attribute commands exist.
        !          1048: (It is unlikely that a
        !          1049: .IR termcap\^ -using
        !          1050: program will support this capability, which is defined for compatibility
        !          1051: with
        !          1052: .IR terminfo\^ .)
        !          1053: .PP
        !          1054: Terminals with the \*(lqmagic cookie\*(rq glitches
        !          1055: .RB ( sg
        !          1056: and
        !          1057: .BR ug ),
        !          1058: rather than maintaining extra attribute bits for each character cell,
        !          1059: instead deposit special \*(lqcookies\*(rq,
        !          1060: or \*(lqgarbage characters\*(rq,
        !          1061: when they receive mode-setting sequences,
        !          1062: which affect the display algorithm.
        !          1063: .PP
        !          1064: Some terminals,
        !          1065: such as the Hewlett-Packard 2621,
        !          1066: automatically leave standout
        !          1067: mode when they move to a new line or when the cursor is addressed.
        !          1068: Programs using standout mode
        !          1069: should exit standout mode on such terminals
        !          1070: before moving the cursor or sending a newline.
        !          1071: On terminals where this is not a problem,
        !          1072: the
        !          1073: .B ms
        !          1074: capability should be present
        !          1075: to say that this overhead is unnecessary.
        !          1076: .PP
        !          1077: If the terminal has
        !          1078: a way of flashing the screen to indicate an error quietly
        !          1079: (a bell replacement),
        !          1080: this can be given as
        !          1081: .BR vb ;
        !          1082: it must not move the cursor.
        !          1083: .PP
        !          1084: If the cursor needs to be made more visible than normal
        !          1085: when it is not on the bottom line
        !          1086: (to change, for example, a non-blinking underline into an easier-to-find
        !          1087: block or blinking underline),
        !          1088: give this sequence as
        !          1089: .BR vs .
        !          1090: If there is a way to make the cursor completely invisible, give that as
        !          1091: .BR vi .
        !          1092: The capability
        !          1093: .BR ve ,
        !          1094: which undoes the effects of both of these modes,
        !          1095: should also be given.
        !          1096: .PP
        !          1097: If your terminal correctly displays underlined characters
        !          1098: (with no special codes needed)
        !          1099: even though it does not overstrike,
        !          1100: then you should give the capability
        !          1101: .BR ul .
        !          1102: If overstrikes are erasable with a blank,
        !          1103: this should be indicated by giving
        !          1104: .BR eo .
        !          1105: .br
        !          1106: .ne 5
        !          1107: .PP
        !          1108: .B Keypad
        !          1109: .PP
        !          1110: If the terminal has a keypad that transmits codes when the keys are pressed,
        !          1111: this information can be given.
        !          1112: Note that it is not possible to handle
        !          1113: terminals where the keypad only works in local mode
        !          1114: (this applies, for example, to the unshifted Hewlett-Packard 2621 keys).
        !          1115: If the keypad can be set to transmit or not transmit,
        !          1116: give these codes as
        !          1117: .B ks
        !          1118: and
        !          1119: .BR ke .
        !          1120: Otherwise the keypad is assumed to always transmit.
        !          1121: The codes sent by the left-arrow, right-arrow, up-arrow, down-arrow,
        !          1122: and home keys can be given as
        !          1123: .BR kl ,
        !          1124: .BR kr ,
        !          1125: .BR ku ,
        !          1126: .BR kd ,
        !          1127: and
        !          1128: .BR kh ,
        !          1129: respectively.
        !          1130: If there are function keys such as f0, f1, ..., f9, the codes they send
        !          1131: can be given as
        !          1132: .BR k0 ,
        !          1133: .BR k1 , "" ...,
        !          1134: .BR k9 .
        !          1135: If these keys have labels other than the default f0 through f9, the labels
        !          1136: can be given as
        !          1137: .BR l0 ,
        !          1138: .BR l1 , "" ...,
        !          1139: .BR l9 .
        !          1140: The codes transmitted by certain other special keys can be given:
        !          1141: .B kH
        !          1142: (home down),
        !          1143: .B kb
        !          1144: (backspace),
        !          1145: .B ka
        !          1146: (clear all tabs),
        !          1147: .B kt
        !          1148: (clear the tab stop in this column),
        !          1149: .B kC
        !          1150: (clear screen or erase),
        !          1151: .B kD
        !          1152: (delete character),
        !          1153: .B kL
        !          1154: (delete line),
        !          1155: .B kM
        !          1156: (exit insert mode),
        !          1157: .B kE
        !          1158: (clear to end of line),
        !          1159: .B kS
        !          1160: (clear to end of screen),
        !          1161: .B kI
        !          1162: (insert character or enter insert mode),
        !          1163: .B kA
        !          1164: (insert line),
        !          1165: .B kN
        !          1166: (next page),
        !          1167: .B kP
        !          1168: (previous page),
        !          1169: .B kF
        !          1170: (scroll forward/down),
        !          1171: .B kR
        !          1172: (scroll backward/up), and
        !          1173: .B kT
        !          1174: (set a tab stop in this column).
        !          1175: In addition, if the keypad has a 3 by 3 array of keys
        !          1176: including the four arrow keys, then the other five keys can be given as
        !          1177: .BR K1 ,
        !          1178: .BR K2 ,
        !          1179: .BR K3 ,
        !          1180: .BR K4 ,
        !          1181: and
        !          1182: .BR K5 .
        !          1183: These keys are useful when the effects of a 3 by 3 directional pad are needed.
        !          1184: The obsolete
        !          1185: .B ko
        !          1186: capability formerly used to describe \*(lqother\*(rq function keys has been
        !          1187: completely supplanted by the above capabilities.
        !          1188: .PP
        !          1189: The
        !          1190: .B ma
        !          1191: entry is also used to indicate arrow keys on terminals that have
        !          1192: single-character arrow keys.
        !          1193: It is obsolete but still in use in
        !          1194: version 2 of
        !          1195: .I vi\^
        !          1196: which must be run on some minicomputers due to
        !          1197: memory limitations.
        !          1198: This field is redundant with
        !          1199: .BR kl ,
        !          1200: .BR kr ,
        !          1201: .BR ku ,
        !          1202: .BR kd ,
        !          1203: and
        !          1204: .BR kh .
        !          1205: It consists of groups of two characters.
        !          1206: In each group, the first character is what an arrow key sends, and the
        !          1207: second character is the corresponding
        !          1208: .I vi\^
        !          1209: command.
        !          1210: These commands are
        !          1211: .B h
        !          1212: for
        !          1213: .BR kl ,
        !          1214: .B j
        !          1215: for
        !          1216: .BR kd ,
        !          1217: .B k
        !          1218: for
        !          1219: .BR ku ,
        !          1220: .B l
        !          1221: for
        !          1222: .BR kr ,
        !          1223: and
        !          1224: .B H
        !          1225: for
        !          1226: .BR kh .
        !          1227: For example, the Mime would have \*(lqma=^Hh^Kj^Zk^Xl\*(rq
        !          1228: indicating arrow keys left (^H), down (^K), up (^Z), and right (^X).
        !          1229: (There is no home key on the Mime.)
        !          1230: .br
        !          1231: .ne 5
        !          1232: .PP
        !          1233: .B Tabs and Initialization
        !          1234: .PP
        !          1235: If the terminal needs to be in a special mode when running
        !          1236: a program that uses these capabilities,
        !          1237: the codes to enter and exit this mode can be given as
        !          1238: .B ti
        !          1239: and
        !          1240: .BR te .
        !          1241: This arises, for example, from terminals like the Concept with more than
        !          1242: one page of memory.
        !          1243: If the terminal has only memory-relative cursor addressing and not
        !          1244: screen-relative cursor addressing,
        !          1245: a screen-sized window must be fixed into
        !          1246: the display for cursor addressing to work properly.
        !          1247: This is also used for the Tektronix 4025, where
        !          1248: .B ti
        !          1249: sets the command character to be the one used by
        !          1250: .IR termcap\^ .
        !          1251: .PP
        !          1252: Other capabilities
        !          1253: include
        !          1254: .BR is ,
        !          1255: an initialization string for the terminal,
        !          1256: and
        !          1257: .BR if ,
        !          1258: the name of a file containing long initialization strings.
        !          1259: These strings are expected to set the terminal into modes
        !          1260: consistent with the rest of the
        !          1261: .I termcap\^
        !          1262: description.
        !          1263: They are normally sent to the terminal by the
        !          1264: .I tset\^
        !          1265: program each time the user logs in.
        !          1266: They will be printed in the following order:
        !          1267: .BR is ;
        !          1268: setting tabs using
        !          1269: .B ct
        !          1270: and
        !          1271: .BR st ;
        !          1272: and finally
        !          1273: .BR if .
        !          1274: .RI ( Terminfo\^
        !          1275: uses
        !          1276: .B i1-i2
        !          1277: instead of
        !          1278: .B is
        !          1279: and runs the program
        !          1280: .B iP
        !          1281: and prints
        !          1282: .B i3
        !          1283: after the other initializations.)
        !          1284: A pair of sequences that does a harder reset from a totally unknown state
        !          1285: can be analogously given as
        !          1286: .B rs
        !          1287: and
        !          1288: .BR if .
        !          1289: These strings are output by the
        !          1290: .I reset\^
        !          1291: program, which is used when the terminal gets into a wedged state.
        !          1292: .RI ( Terminfo\^
        !          1293: uses
        !          1294: .B r1-r3
        !          1295: instead of
        !          1296: .BR rs .)
        !          1297: Commands are normally placed in
        !          1298: .B rs
        !          1299: and
        !          1300: .B rf
        !          1301: only if they produce annoying effects on the screen and are not necessary
        !          1302: when logging in.
        !          1303: For example, the command to set the VT100 into 80-column mode
        !          1304: would normally be part of
        !          1305: .BR is ,
        !          1306: but it causes an annoying glitch of the screen and is not normally needed
        !          1307: since the terminal is usually already in 80-column mode.
        !          1308: .PP
        !          1309: If the terminal has hardware tabs,
        !          1310: the command to advance to the next tab stop can be given as
        !          1311: .B ta
        !          1312: (usually
        !          1313: .BR ^I ).
        !          1314: A \*(lqbacktab\*(rq command which moves leftward to the previous tab stop
        !          1315: can be given as
        !          1316: .BR bt .
        !          1317: By convention,
        !          1318: if the terminal driver modes indicate that tab stops are being expanded
        !          1319: by the computer rather than being sent to the terminal,
        !          1320: programs should not use
        !          1321: .B ta
        !          1322: or
        !          1323: .B bt
        !          1324: even if they are present,
        !          1325: since the user may not have the tab stops properly set.
        !          1326: If the terminal has hardware tabs that are initially set every
        !          1327: .I n\^
        !          1328: positions when the terminal is powered up, then the numeric parameter
        !          1329: .B it
        !          1330: is given, showing the number of positions between tab stops.
        !          1331: This is normally used by the
        !          1332: .I tset\^
        !          1333: command to determine whether to set the driver mode for hardware tab
        !          1334: expansion, and whether to set the tab stops.
        !          1335: If the terminal has tab stops that can be saved in nonvolatile memory, the
        !          1336: .I termcap\^
        !          1337: description can assume that they are properly set.
        !          1338: .PP
        !          1339: If there are commands to set and clear tab stops, they can be given as
        !          1340: .B ct
        !          1341: (clear all tab stops) and
        !          1342: .B st
        !          1343: (set a tab stop in the current column of every row).
        !          1344: If a more complex sequence is needed to set the tabs than can be
        !          1345: described by this, the sequence can be placed in
        !          1346: .B is
        !          1347: or
        !          1348: .BR if .
        !          1349: .br
        !          1350: .ne 5
        !          1351: .PP
        !          1352: .B Delays
        !          1353: .PP
        !          1354: Certain capabilities control padding in the terminal driver.
        !          1355: These are primarily needed by hardcopy terminals and are used by the
        !          1356: .I tset\^
        !          1357: program to set terminal driver modes appropriately.
        !          1358: Delays embedded in the capabilities
        !          1359: .BR cr ,
        !          1360: .BR sf ,
        !          1361: .BR le ,
        !          1362: .BR ff ,
        !          1363: and
        !          1364: .B ta
        !          1365: will cause the appropriate delay bits to be set in the terminal driver.
        !          1366: If
        !          1367: .B pb
        !          1368: (padding baud rate) is given, these values can be ignored at baud rates
        !          1369: below the value of
        !          1370: .BR pb .
        !          1371: For 4.2BSD
        !          1372: .IR tset\^ ,
        !          1373: the delays are given as numeric capabilities
        !          1374: .BR dC ,
        !          1375: .BR dN ,
        !          1376: .BR dB ,
        !          1377: .BR dF ,
        !          1378: and
        !          1379: .BR dT
        !          1380: instead.
        !          1381: .br
        !          1382: .ne 5
        !          1383: .PP
        !          1384: .B Miscellaneous
        !          1385: .PP
        !          1386: If the terminal requires other than a \s-2NUL\s0 (zero) character as a pad,
        !          1387: this can be given as
        !          1388: .BR pc .
        !          1389: Only the first character of the
        !          1390: .B pc
        !          1391: string is used.
        !          1392: .PP
        !          1393: If the terminal has commands to save and restore the position of the
        !          1394: cursor, give them as
        !          1395: .B sc
        !          1396: and
        !          1397: .BR rc .
        !          1398: .PP
        !          1399: If the terminal has an extra \*(lqstatus line\*(rq that is not normally used by
        !          1400: software, this fact can be indicated.
        !          1401: If the status line is viewed as an extra line below the bottom line,
        !          1402: then the capability
        !          1403: .B hs
        !          1404: should be given.
        !          1405: Special strings to go to a position in the status line and to return
        !          1406: from the status line can be given as
        !          1407: .B ts
        !          1408: and
        !          1409: .BR fs .
        !          1410: .RB ( fs
        !          1411: must leave the cursor position in the same place that it was before
        !          1412: .BR ts .
        !          1413: If necessary, the
        !          1414: .B sc
        !          1415: and
        !          1416: .B rc
        !          1417: strings can be included in
        !          1418: .B ts
        !          1419: and
        !          1420: .B fs
        !          1421: to get this effect.)
        !          1422: The capability
        !          1423: .B ts
        !          1424: takes one parameter, which is the column number of the status line
        !          1425: to which the cursor is to be moved.
        !          1426: If escape sequences and other special commands such as tab work while in
        !          1427: the status line, the flag
        !          1428: .B es
        !          1429: can be given.
        !          1430: A string that turns off the status line (or otherwise erases its contents)
        !          1431: should be given as
        !          1432: .BR ds .
        !          1433: The status line is normally assumed to be the same width as the
        !          1434: rest of the screen,
        !          1435: .IR i.e. ,
        !          1436: .BR co .
        !          1437: If the status line is a different width (possibly because the terminal
        !          1438: does not allow an entire line to be loaded), then its width in columns
        !          1439: can be indicated with the numeric parameter
        !          1440: .BR ws .
        !          1441: .PP
        !          1442: If the terminal can move up or down half a line, this can be
        !          1443: indicated with
        !          1444: .B hu
        !          1445: (half-line up) and
        !          1446: .B hd
        !          1447: (half-line down).
        !          1448: This is primarily useful for superscripts and subscripts on hardcopy
        !          1449: terminals.
        !          1450: If a hardcopy terminal can eject to the next page (form feed),
        !          1451: give this as
        !          1452: .B ff
        !          1453: (usually
        !          1454: .BR ^L ).
        !          1455: .PP
        !          1456: If there is a command to repeat a given character a given number of times
        !          1457: (to save time transmitting a large number of identical characters),
        !          1458: this can be indicated with the parameterized string
        !          1459: .BR rp .
        !          1460: The first parameter is the character to be repeated and the second is
        !          1461: the number of times to repeat it.
        !          1462: (This is a
        !          1463: .I terminfo\^
        !          1464: feature that is unlikely to be supported by a program that uses
        !          1465: .IR termcap\^ .)
        !          1466: .PP
        !          1467: If the terminal has a settable command character, such as the
        !          1468: Tektronix 4025, this can be indicated with
        !          1469: .BR CC .
        !          1470: A prototype command character is chosen which is used in all capabilities.
        !          1471: This character is given in the
        !          1472: .B CC
        !          1473: capability to identify it.
        !          1474: The following convention is supported on some UNIX systems:
        !          1475: The environment is to be searched for a
        !          1476: .B
        !          1477: .SM CC
        !          1478: variable,
        !          1479: and if found,
        !          1480: all occurrences of the prototype character are replaced by the character
        !          1481: in the environment variable.
        !          1482: This use of the
        !          1483: .B
        !          1484: .SM CC
        !          1485: environment variable
        !          1486: is a very bad idea, as it conflicts with
        !          1487: .IR make\^ (1).
        !          1488: .PP
        !          1489: Terminal descriptions that do not represent a specific kind of known
        !          1490: terminal, such as
        !          1491: .IR switch\^ ,
        !          1492: .IR dialup\^ ,
        !          1493: .IR patch\^ ,
        !          1494: and
        !          1495: .IR network\^ ,
        !          1496: should include the
        !          1497: .B gn
        !          1498: (generic) capability so that programs can complain that they do not know
        !          1499: how to talk to the terminal.
        !          1500: (This capability does not apply to
        !          1501: .I virtual\^
        !          1502: terminal descriptions for which the escape sequences are known.)
        !          1503: .PP
        !          1504: If the terminal uses xoff/xon (\s-2DC3\s0/\s-2DC1\s0)
        !          1505: handshaking for flow control, give
        !          1506: .BR xo .
        !          1507: Padding information should still be included so that routines can make
        !          1508: better decisions about costs, but actual pad characters will not be
        !          1509: transmitted.
        !          1510: .PP
        !          1511: If the terminal has a \*(lqmeta key\*(rq which acts as a shift key, setting the
        !          1512: 8th bit of any character transmitted, then this fact can be indicated with
        !          1513: .BR km .
        !          1514: Otherwise, software will assume that the 8th bit is parity and it will
        !          1515: usually be cleared.
        !          1516: If strings exist to turn this \*(lqmeta mode\*(rq on and off, they can be given as
        !          1517: .B mm
        !          1518: and
        !          1519: .BR mo .
        !          1520: .PP
        !          1521: If the terminal has more lines of memory than will fit on the screen at once,
        !          1522: the number of lines of memory can be indicated with
        !          1523: .BR lm .
        !          1524: An explicit value of 0 indicates that the number of lines is not fixed,
        !          1525: but that there is still more memory than fits on the screen.
        !          1526: .PP
        !          1527: If the terminal is one of those supported by the UNIX system virtual
        !          1528: terminal protocol, the terminal number can be given as
        !          1529: .BR vt .
        !          1530: .PP
        !          1531: Media copy strings which control an auxiliary printer
        !          1532: connected to the terminal can be given as
        !          1533: .BR ps :
        !          1534: print the contents of the screen;
        !          1535: .BR pf :
        !          1536: turn off the printer; and
        !          1537: .BR po :
        !          1538: turn on the printer.
        !          1539: When the printer is on, all text sent to the terminal will be sent to the
        !          1540: printer.
        !          1541: It is undefined whether the text is also displayed on the terminal screen
        !          1542: when the printer is on.
        !          1543: A variation
        !          1544: .B pO
        !          1545: takes one parameter and leaves the printer on for as many characters as the
        !          1546: value of the parameter, then turns the printer off.
        !          1547: The parameter should not exceed 255.
        !          1548: All text, including
        !          1549: .BR pf ,
        !          1550: is transparently passed to the printer while
        !          1551: .B pO
        !          1552: is in effect.
        !          1553: .PP
        !          1554: Strings to program function keys can be given as
        !          1555: .BR pk ,
        !          1556: .BR pl ,
        !          1557: and
        !          1558: .BR px .
        !          1559: Each of these strings takes two parameters: the function key number
        !          1560: to program (from 0 to 9) and the string to program it with.
        !          1561: Function key numbers out of this range may program undefined keys
        !          1562: in a terminal-dependent manner.
        !          1563: The differences among the capabilities are that
        !          1564: .B pk
        !          1565: causes pressing the given key to be the same as the user typing the given
        !          1566: string;
        !          1567: .B pl
        !          1568: causes the string to be executed by the terminal in local mode;
        !          1569: and
        !          1570: .B px
        !          1571: causes the string to be transmitted to the computer.
        !          1572: Unfortunately, due to lack of a definition for string parameters in
        !          1573: .IR termcap\^ ,
        !          1574: only
        !          1575: .I terminfo\^
        !          1576: supports these capabilities.
        !          1577: .br
        !          1578: .ne 5
        !          1579: .PP
        !          1580: .B Glitches and Braindamage
        !          1581: .PP
        !          1582: Hazeltine terminals, which do not allow `~' characters to be displayed,
        !          1583: should indicate
        !          1584: .BR hz .
        !          1585: .PP
        !          1586: The
        !          1587: .B nc
        !          1588: capability, now obsolete, formerly indicated Datamedia terminals,
        !          1589: which echo
        !          1590: .B \er \en
        !          1591: for
        !          1592: carriage return then ignore a following linefeed.
        !          1593: .PP
        !          1594: Terminals that ignore a linefeed immediately after an
        !          1595: .B am
        !          1596: wrap, such as the Concept, should indicate
        !          1597: .BR xn .
        !          1598: .PP
        !          1599: If
        !          1600: .B ce
        !          1601: is required to get rid of standout
        !          1602: (instead of merely writing normal text on top of it),
        !          1603: .B xs
        !          1604: should be given.
        !          1605: .PP
        !          1606: Teleray terminals, where tabs turn all characters moved over to blanks,
        !          1607: should indicate
        !          1608: .B xt
        !          1609: (destructive tabs).
        !          1610: This glitch is also taken to mean that it is not possible
        !          1611: to position the cursor on top of a \*(lqmagic cookie\*(rq, and that
        !          1612: to erase standout mode it is necessary to use delete and insert line.
        !          1613: .PP
        !          1614: The Beehive Superbee, which is unable to correctly transmit the
        !          1615: \s-2ESC\s0 or ^C characters, has
        !          1616: .BR xb ,
        !          1617: indicating that the \*(lqf1\*(rq key is used for \s-2ESC\s0 and \*(lqf2\*(rq for ^C.
        !          1618: (Only certain Superbees have this problem, depending on the ROM.)
        !          1619: .PP
        !          1620: Other specific terminal problems may be corrected by adding more
        !          1621: capabilities of the form \fBx\fIx\^\fP.
        !          1622: .br
        !          1623: .ne 5
        !          1624: .PP
        !          1625: .B Similar Terminals
        !          1626: .PP
        !          1627: If there are two very similar terminals,
        !          1628: one can be defined as being just like the other with certain exceptions.
        !          1629: The string capability
        !          1630: .B tc
        !          1631: can be given
        !          1632: with the name of the similar terminal.
        !          1633: This capability must be
        !          1634: .IR last\^ ,
        !          1635: and the combined length of the entries
        !          1636: must not exceed 1024.
        !          1637: The capabilities given before
        !          1638: .B tc
        !          1639: override those in the terminal type invoked by
        !          1640: .BR tc .
        !          1641: A capability can be canceled by placing
        !          1642: .B xx@
        !          1643: to the left of the
        !          1644: .B tc
        !          1645: invocation, where
        !          1646: .I xx\^
        !          1647: is the capability.
        !          1648: For example, the entry
        !          1649: .PP
        !          1650:        hn\||\|2621\-nl:ks@:ke@:tc=2621:
        !          1651: .PP
        !          1652: defines a \*(lq2621\-nl\*(rq that does not have the
        !          1653: .B ks
        !          1654: or
        !          1655: .B ke
        !          1656: capabilities,
        !          1657: hence does not turn on the function key labels when in visual mode.
        !          1658: This is useful for different modes for a terminal, or for different
        !          1659: user preferences.
        !          1660: .SH AUTHOR
        !          1661: William Joy
        !          1662: .br
        !          1663: Mark Horton added underlining and keypad support
        !          1664: .SH FILES
        !          1665: .DT
        !          1666: /etc/termcap   file containing terminal descriptions
        !          1667: .SH SEE ALSO
        !          1668: ex(1), more(1), tset(1), ul(1), vi(1), curses(3X), printf(3S),
        !          1669: termcap(3X), term(7)
        !          1670: .SH "CAVEATS AND BUGS"
        !          1671: .B Note:
        !          1672: .I termcap\^
        !          1673: was replaced by
        !          1674: .I terminfo\^
        !          1675: in UNIX System V Release 2.0.
        !          1676: The transition will be relatively painless if capabilities flagged as
        !          1677: \*(lqobsolete\*(rq are avoided.
        !          1678: .PP
        !          1679: Lines and columns are now stored by the kernel as well as in the termcap
        !          1680: entry.
        !          1681: Most programs now use the kernel information primarily; the information
        !          1682: in this file is used only if the kernel does not have any information.
        !          1683: .PP
        !          1684: .I Vi\^
        !          1685: allows only 256 characters for string capabilities, and the routines
        !          1686: in 
        !          1687: .IR termlib\^ (3)
        !          1688: do not check for overflow of this buffer.
        !          1689: The total length of a single entry (excluding only escaped newlines)
        !          1690: may not exceed 1024.
        !          1691: .PP
        !          1692: Not all programs support all entries.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.