Annotation of 43BSDReno/share/termcap/termcap.5, revision 1.1

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