Annotation of cci/usr/src/man/man5/termcap.5, revision 1.1

1.1     ! root        1: .tr ||
        !             2: .TH TERMCAP 5 "10 May 1980"
        !             3: .UC
        !             4: .SH NAME
        !             5: termcap \- terminal capability data base
        !             6: .SH SYNOPSIS
        !             7: /etc/termcap
        !             8: .SH DESCRIPTION
        !             9: .I Termcap
        !            10: is a data base describing terminals,
        !            11: used,
        !            12: .IR e.g. ,
        !            13: by
        !            14: .IR vi (1)
        !            15: and
        !            16: .IR curses (3X).
        !            17: Terminals are described in
        !            18: .I termcap
        !            19: by giving a set of capabilities which they have, and by describing
        !            20: how operations are performed.
        !            21: Padding requirements and initialization sequences
        !            22: are included in
        !            23: .I termcap.
        !            24: .PP
        !            25: Entries in
        !            26: .I termcap
        !            27: consist of a number of `:' separated fields.
        !            28: The first entry for each terminal gives the names which are known for the
        !            29: terminal, separated by `|' characters.  The first name is always 2 characters
        !            30: long and is used by older version 6 systems which store the terminal type
        !            31: in a 16 bit word in a systemwide data base.
        !            32: The second name given is the most common abbreviation for the terminal, and the
        !            33: last name given should be a long name fully identifying the terminal.
        !            34: The second name should contain no blanks; the last name may well contain
        !            35: blanks for readability.
        !            36: .SH CAPABILITIES
        !            37: .nf
        !            38: (P) indicates padding may be specified
        !            39: (P*) indicates that padding may be based on no. lines affected
        !            40: 
        !            41: .ta \w'k0-k9  'u +\w'Type  'u +\w'Pad?  'u
        !            42: \fBName        Type    Pad?    Description\fR
        !            43: ae     str     (P)     End alternate character set
        !            44: al     str     (P*)    Add new blank line
        !            45: am     bool            Terminal has automatic margins
        !            46: as     str     (P)     Start alternate character set
        !            47: bc     str             Backspace if not \fB^H\fR
        !            48: bs     bool            Terminal can backspace with \fB^H\fR
        !            49: bt     str     (P)     Back tab
        !            50: bw     bool            Backspace wraps from column 0 to last column
        !            51: CC     str             Command character in prototype if terminal settable
        !            52: cd     str     (P*)    Clear to end of display
        !            53: ce     str     (P)     Clear to end of line
        !            54: ch     str     (P)     Like cm but horizontal motion only, line stays same
        !            55: cl     str     (P*)    Clear screen
        !            56: cm     str     (P)     Cursor motion
        !            57: co     num             Number of columns in a line
        !            58: cr     str     (P*)    Carriage return, (default \fB^M\fR)
        !            59: cs     str     (P)     Change scrolling region (vt100), like cm
        !            60: cv     str     (P)     Like ch but vertical only.
        !            61: da     bool            Display may be retained above
        !            62: dB     num             Number of millisec of bs delay needed
        !            63: db     bool            Display may be retained below
        !            64: dC     num             Number of millisec of cr delay needed
        !            65: dc     str     (P*)    Delete character
        !            66: dF     num             Number of millisec of ff delay needed
        !            67: dl     str     (P*)    Delete line
        !            68: dm     str             Delete mode (enter)
        !            69: dN     num             Number of millisec of nl delay needed
        !            70: do     str             Down one line
        !            71: dT     num             Number of millisec of tab delay needed
        !            72: ed     str             End delete mode
        !            73: ei     str             End insert mode; give \*(lq:ei=:\*(rq if \fBic\fR
        !            74: eo     str             Can erase overstrikes with a blank
        !            75: ff     str     (P*)    Hardcopy terminal page eject (default \fB^L\fR)
        !            76: hc     bool            Hardcopy terminal
        !            77: hd     str             Half-line down (forward 1/2 linefeed)
        !            78: ho     str             Home cursor (if no \fBcm\fR)
        !            79: hu     str             Half-line up (reverse 1/2 linefeed)
        !            80: hz     str             Hazeltine; can't print ~'s
        !            81: ic     str     (P)     Insert character
        !            82: if     str             Name of file containing \fBis\fR
        !            83: im     bool            Insert mode (enter); give \*(lq:im=:\*(rq if \fBic\fR
        !            84: in     bool            Insert mode distinguishes nulls on display
        !            85: ip     str     (P*)    Insert pad after character inserted
        !            86: is     str             Terminal initialization string
        !            87: k0-k9  str             Sent by \*(lqother\*(rq function keys 0-9
        !            88: kb     str             Sent by backspace key
        !            89: kd     str             Sent by terminal down arrow key
        !            90: ke     str             Out of \*(lqkeypad transmit\*(rq mode
        !            91: kh     str             Sent by home key
        !            92: kl     str             Sent by terminal left arrow key
        !            93: kn     num             Number of \*(lqother\*(rq keys
        !            94: ko     str             Termcap entries for other non-function keys
        !            95: kr     str             Sent by terminal right arrow key
        !            96: ks     str             Put terminal in \*(lqkeypad transmit\*(rq mode
        !            97: ku     str             Sent by terminal up arrow key
        !            98: l0-l9  str             Labels on \*(lqother\*(rq function keys
        !            99: li     num             Number of lines on screen or page
        !           100: ll     str             Last line, first column (if no \fBcm\fR)
        !           101: ma     str             Arrow key map, used by vi version 2 only
        !           102: mi     bool            Safe to move while in insert mode
        !           103: ml     str             Memory lock on above cursor.
        !           104: ms     bool            Safe to move while in standout and underline mode
        !           105: mu     str             Memory unlock (turn off memory lock).
        !           106: nc     bool            No correctly working carriage return (DM2500,H2000)
        !           107: nd     str             Non-destructive space (cursor right)
        !           108: nl     str     (P*)    Newline character (default \fB\en\fR)
        !           109: ns     bool            Terminal is a \s-2CRT\s+2 but doesn't scroll.
        !           110: os     bool            Terminal overstrikes
        !           111: pc     str             Pad character (rather than null)
        !           112: pt     bool            Has hardware tabs (may need to be set with \fBis\fR)
        !           113: se     str             End stand out mode
        !           114: sf     str     (P)     Scroll forwards
        !           115: sg     num             Number of blank chars left by so or se
        !           116: so     str             Begin stand out mode
        !           117: sr     str     (P)     Scroll reverse (backwards)
        !           118: ta     str     (P)     Tab (other than \fB^I\fR or with padding)
        !           119: tc     str             Entry of similar terminal - must be last
        !           120: te     str             String to end programs that use \fBcm\fP
        !           121: ti     str             String to begin programs that use \fBcm\fR
        !           122: uc     str             Underscore one char and move past it
        !           123: ue     str             End underscore mode
        !           124: ug     num             Number of blank chars left by us or ue
        !           125: ul     bool            Terminal underlines even though it doesn't overstrike
        !           126: up     str             Upline (cursor up)
        !           127: us     str             Start underscore mode
        !           128: vb     str             Visible bell (may not move cursor)
        !           129: ve     str             Sequence to end open/visual mode
        !           130: vs     str             Sequence to start open/visual mode
        !           131: xb     bool            Beehive (f1=escape, f2=ctrl C)
        !           132: xn     bool            A newline is ignored after a wrap (Concept)
        !           133: xr     bool            Return acts like \fBce\fP \er \en (Delta Data)
        !           134: xs     bool            Standout not erased by writing over it (HP 264?)
        !           135: xt     bool            Tabs are destructive, magic so char (Teleray 1061)
        !           136: .fi
        !           137: .PP
        !           138: .B A Sample Entry
        !           139: .PP
        !           140: The following entry, which describes the Concept\-100, is among the more
        !           141: complex entries in the
        !           142: .I termcap
        !           143: file as of this writing.
        !           144: (This particular concept entry is outdated,
        !           145: and is used as an example only.)
        !           146: .PP
        !           147: .nf
        !           148: c1\||\|c100\||\|concept100:is=\eEU\eEf\eE7\eE5\eE8\eEl\eENH\eEK\eE\e200\eEo&\e200:\e
        !           149:         :al=3*\eE^R:am:bs:cd=16*\eE^C:ce=16\eE^S:cl=2*^L:cm=\eEa%+ %+ :co#80:\e
        !           150:         :dc=16\eE^A:dl=3*\eE^B:ei=\eE\e200:eo:im=\eE^P:in:ip=16*:li#24:mi:nd=\eE=:\e
        !           151:         :se=\eEd\eEe:so=\eED\eEE:ta=8\et:ul:up=\eE;:vb=\eEk\eEK:xn:
        !           152: .fi
        !           153: .PP
        !           154: Entries may continue onto multiple lines by giving a \e as the last
        !           155: character of a line, and that empty fields
        !           156: may be included for readability (here between the last field on a line
        !           157: and the first field on the next).
        !           158: Capabilities in
        !           159: .I termcap
        !           160: are of three types:
        !           161: Boolean capabilities which indicate that the terminal has
        !           162: some particular feature, numeric capabilities giving the size of the terminal
        !           163: or the size of particular delays, and string
        !           164: capabilities, which give a sequence which can be used to perform particular
        !           165: terminal operations.
        !           166: .PP
        !           167: .B Types of Capabilities
        !           168: .PP
        !           169: All capabilities have two letter codes.  For instance, the fact that
        !           170: the Concept has \*(lqautomatic margins\*(rq (i.e. an automatic return and linefeed
        !           171: when the end of a line is reached) is indicated by the capability \fBam\fR.
        !           172: Hence the description of the Concept includes \fBam\fR.
        !           173: Numeric capabilities are followed by the character `#' and then the value.
        !           174: Thus \fBco\fR which indicates the number of columns the terminal has
        !           175: gives the value `80' for the Concept.
        !           176: .PP
        !           177: Finally, string valued capabilities, such as \fBce\fR (clear to end of line
        !           178: sequence) are given by the two character code, an `=', and then a string
        !           179: ending at the next following `:'.  A delay in milliseconds may appear after
        !           180: the `=' in such a capability, and padding characters are supplied by the
        !           181: editor after the remainder of the string is sent to provide this delay.
        !           182: The delay can be either a integer, e.g. `20', or an integer followed by
        !           183: an `*', i.e. `3*'.  A `*' indicates that the padding required is proportional
        !           184: to the number of lines affected by the operation, and the amount given is
        !           185: the per-affected-unit padding required.
        !           186: When a `*' is specified, it is sometimes useful to give a delay of the form
        !           187: `3.5' specify a delay per unit to tenths of milliseconds.
        !           188: .PP
        !           189: A number of escape sequences are provided in the string valued capabilities
        !           190: for easy encoding of characters there.  A \fB\eE\fR maps to an \s-2ESCAPE\s0
        !           191: character, \fB^x\fR maps to a control-x for any appropriate x, and the sequences
        !           192: \fB\en \er \et \eb \ef\fR give a newline, return, tab, backspace and formfeed.
        !           193: Finally, characters may be given as three octal digits after a \fB\e\fR,
        !           194: and the characters \fB^\fR and \fB\e\fR may be given as \fB\e^\fR and \fB\e\e\fR.
        !           195: If it is necessary to place a \fB:\fR in a capability it must be escaped in
        !           196: octal as \fB\e072\fR.
        !           197: If it is necessary to place a null character in a string capability it
        !           198: must be encoded as \fB\e200\fR.  The routines which deal with
        !           199: .I termcap
        !           200: use C strings, and strip the high bits of the output very late so that
        !           201: a \fB\e200\fR comes out as a \fB\e000\fR would.
        !           202: .br
        !           203: .ne 5
        !           204: .PP
        !           205: .B Preparing Descriptions
        !           206: .PP
        !           207: We now outline how to prepare descriptions of terminals.
        !           208: The most effective way to prepare a terminal description is by imitating
        !           209: the description of a similar terminal in
        !           210: .I termcap
        !           211: and to build up a description gradually, using partial descriptions
        !           212: with
        !           213: .I ex
        !           214: to check that they are correct.
        !           215: Be aware that a very unusual terminal may expose deficiencies in
        !           216: the ability of the
        !           217: .I termcap
        !           218: file to describe it
        !           219: or bugs in
        !           220: .I ex.
        !           221: To easily test a new terminal description you can set the environment variable
        !           222: TERMCAP to a pathname of a file containing the description you are working
        !           223: on and the editor will look there rather than in
        !           224: .I /etc/termcap.
        !           225: TERMCAP can also be set to the termcap entry itself
        !           226: to avoid reading the file when starting up the editor.
        !           227: (This only works on version 7 systems.)
        !           228: .PP
        !           229: .B Basic capabilities
        !           230: .PP
        !           231: The number of columns on each line for the terminal is given by the
        !           232: \fBco\fR numeric capability.  If the terminal is a \s-2CRT\s0, then the
        !           233: number of lines on the screen is given by the \fBli\fR capability.
        !           234: If the terminal wraps around to the beginning of the next line when
        !           235: it reaches the right margin, then it should have the \fBam\fR capability.
        !           236: If the terminal can clear its screen, then this is given by the
        !           237: \fBcl\fR string capability.  If the terminal can backspace, then it
        !           238: should have the \fBbs\fR capability, unless a backspace is accomplished
        !           239: by a character other than \fB^H\fR (ugh) in which case you should give
        !           240: this character as the \fBbc\fR string capability.  If it overstrikes
        !           241: (rather than clearing a position when a character is struck over)
        !           242: then it should have the \fBos\fR capability.
        !           243: .PP
        !           244: A very important point here is that the local cursor motions encoded
        !           245: in
        !           246: .I termcap
        !           247: are undefined at the left and top edges of a \s-2CRT\s0 terminal.
        !           248: The editor will never attempt to backspace around the left edge, nor
        !           249: will it attempt to go up locally off the top.  The editor assumes that
        !           250: feeding off the bottom of the screen will cause the screen to scroll up,
        !           251: and the \fBam\fR capability tells whether the cursor sticks at the right
        !           252: edge of the screen.  If the terminal has switch selectable automatic margins,
        !           253: the
        !           254: .I termcap
        !           255: file usually assumes that this is on, i.e. \fBam\fR.
        !           256: .PP
        !           257: These capabilities suffice to describe hardcopy and \*(lqglass-tty\*(rq terminals.
        !           258: Thus the model 33 teletype is described as
        !           259: .PP
        !           260: .DT
        !           261:        t3\||\|33\||\|tty33:co#72:os
        !           262: .PP
        !           263: while the Lear Siegler \s-2ADM\-3\s0 is described as
        !           264: .PP
        !           265: .DT
        !           266:        cl\||\|adm3|3|lsi adm3:am:bs:cl=^Z:li#24:co#80
        !           267: .PP
        !           268: .B Cursor addressing
        !           269: .PP
        !           270: Cursor addressing in the terminal is described by a
        !           271: \fBcm\fR string capability, with 
        !           272: .IR printf (3S)
        !           273: like escapes \fB%x\fR in it.
        !           274: These substitute to encodings of the current line or column position,
        !           275: while other characters are passed through unchanged.
        !           276: If the \fBcm\fR string is thought of as being a function, then its
        !           277: arguments are the line and then the column to which motion is desired,
        !           278: and the \fB%\fR encodings have the following meanings:
        !           279: .PP
        !           280: .DT
        !           281: .nf
        !           282:        %d      as in \fIprintf\fR, 0 origin
        !           283:        %2      like %2d
        !           284:        %3      like %3d
        !           285:        %.      like %c
        !           286:        %+x     adds \fIx\fR to value, then %.
        !           287:        %>xy    if value > x adds y, no output.
        !           288:        %r      reverses order of line and column, no output
        !           289:        %i      increments line/column (for 1 origin)
        !           290:        %%      gives a single %
        !           291:        %n      exclusive or row and column with 0140 (DM2500)
        !           292:        %B      BCD (16*(x/10)) + (x%10), no output.
        !           293:        %D      Reverse coding (x-2*(x%16)), no output. (Delta Data).
        !           294: .fi
        !           295: .PP
        !           296: Consider the HP2645, which, to get to row 3 and column 12, needs
        !           297: to be sent \eE&a12c03Y padded for 6 milliseconds.  Note that the order
        !           298: of the rows and columns is inverted here, and that the row and column
        !           299: are printed as two digits.  Thus its \fBcm\fR capability is \*(lqcm=6\eE&%r%2c%2Y\*(rq.
        !           300: The Microterm \s-2ACT-IV\s0 needs the current row and column sent
        !           301: preceded by a \fB^T\fR, with the row and column simply encoded in binary,
        !           302: \*(lqcm=^T%.%.\*(rq.  Terminals which use \*(lq%.\*(rq need to be able to
        !           303: backspace the cursor (\fBbs\fR or \fBbc\fR),
        !           304: and to move the cursor up one line on the screen (\fBup\fR introduced below).
        !           305: This is necessary because it is not always safe to transmit \fB\et\fR, \fB\en\fR
        !           306: \fB^D\fR and \fB\er\fR, as the system may change or discard them.
        !           307: .PP
        !           308: A final example is the \s-2LSI ADM\s0-3a, which uses row and column
        !           309: offset by a blank character, thus \*(lqcm=\eE=%+ %+ \*(rq.
        !           310: .PP
        !           311: .B Cursor motions
        !           312: .PP
        !           313: If the terminal can move the cursor one position to the right, leaving
        !           314: the character at the current position unchanged, then this sequence should
        !           315: be given as \fBnd\fR (non-destructive space).  If it can move the cursor
        !           316: up a line
        !           317: on the screen in the same column, this should be given as \fBup\fR.
        !           318: If the terminal has no cursor addressing capability, but can home the cursor
        !           319: (to very upper left corner of screen) then this can be given as
        !           320: \fBho\fR; similarly a fast way of getting to the lower left hand corner
        !           321: can be given as \fBll\fR; this may involve going up with \fBup\fR
        !           322: from the home position,
        !           323: but the editor will never do this itself (unless \fBll\fR does) because it
        !           324: makes no assumption about the effect of moving up from the home position.
        !           325: .PP
        !           326: .B Area clears
        !           327: .PP
        !           328: If the terminal can clear from the current position to the end of the
        !           329: line, leaving the cursor where it is, this should be given as \fBce\fR.
        !           330: If the terminal can clear from the current position to the end of the
        !           331: display, then this should be given as \fBcd\fR.
        !           332: The editor only uses
        !           333: \fBcd\fR from the first column of a line.
        !           334: .PP
        !           335: .B Insert/delete line
        !           336: .PP
        !           337: If the terminal can open a new blank line before the line where the cursor
        !           338: is, this should be given as \fBal\fR; this is done only from the first
        !           339: position of a line.  The cursor must then appear on the newly blank line.
        !           340: If the terminal can delete the line which the cursor is on, then this
        !           341: should be given as \fBdl\fR; this is done only from the first position on
        !           342: the line to be deleted.
        !           343: If the terminal can scroll the screen backwards, then this can be given as
        !           344: \fBsb\fR, but just \fBal\fR suffices.
        !           345: If the terminal can retain display memory above then the
        !           346: \fBda\fR capability should be given; if display memory can be retained
        !           347: below then \fBdb\fR should be given.  These let the editor understand
        !           348: that deleting a line on the screen may bring non-blank lines up from below
        !           349: or that scrolling back with \fBsb\fR may bring down non-blank lines.
        !           350: .PP
        !           351: .B Insert/delete character
        !           352: .PP
        !           353: There are two basic kinds of intelligent terminals with respect to
        !           354: insert/delete character which can be described using
        !           355: .I termcap.
        !           356: The most common insert/delete character operations affect only the characters
        !           357: on the current line and shift characters off the end of the line rigidly.
        !           358: Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make
        !           359: a distinction between typed and untyped blanks on the screen, shifting
        !           360: upon an insert or delete only to an untyped blank on the screen which is
        !           361: either eliminated, or expanded to two untyped blanks.  You can find out
        !           362: which kind of terminal you have by clearing the screen and then typing
        !           363: text separated by cursor motions.  Type \*(lqabc\ \ \ \ def\*(rq using local
        !           364: cursor motions (not spaces) between the \*(lqabc\*(rq and the \*(lqdef\*(rq.
        !           365: Then position the cursor before the \*(lqabc\*(rq and put the terminal in insert
        !           366: mode.  If typing characters causes the rest of the line to shift
        !           367: rigidly and characters to fall off the end, then your terminal does
        !           368: not distinguish between blanks and untyped positions.  If the \*(lqabc\*(rq
        !           369: shifts over to the \*(lqdef\*(rq which then move together around the end of the
        !           370: current line and onto the next as you insert, you have the second type of
        !           371: terminal, and should give the capability \fBin\fR, which stands for
        !           372: \*(lqinsert null\*(rq.  If your terminal does something different and unusual
        !           373: then you may have to modify the editor to get it to use the insert
        !           374: mode your terminal defines.  We have seen no terminals which have an insert
        !           375: mode not not falling into one of these two classes.
        !           376: .PP
        !           377: The editor can handle both terminals which have an insert mode, and terminals
        !           378: which send a simple sequence to open a blank position on the current line.
        !           379: Give as \fBim\fR the sequence to get into insert mode, or give it an
        !           380: empty value if your terminal uses a sequence to insert a blank position.
        !           381: Give as \fBei\fR the sequence to leave insert mode (give this, with
        !           382: an empty value also if you gave \fBim\fR so).
        !           383: Now give as \fBic\fR any sequence needed to be sent just before sending
        !           384: the character to be inserted.  Most terminals with a true insert mode
        !           385: will not give \fBic\fR, terminals which send a sequence to open a screen
        !           386: position should give it here.  (Insert mode is preferable to the sequence
        !           387: to open a position on the screen if your terminal has both.)
        !           388: If post insert padding is needed, give this as a number of milliseconds
        !           389: in \fBip\fR (a string option).  Any other sequence which may need to be
        !           390: sent after an insert of a single character may also be given in \fBip\fR.
        !           391: .PP
        !           392: It is occasionally necessary to move around while in insert mode
        !           393: to delete characters on the same line (e.g. if there is a tab after
        !           394: the insertion position).  If your terminal allows motion while in
        !           395: insert mode you can give the capability \fBmi\fR to speed up inserting
        !           396: in this case.  Omitting \fBmi\fR will affect only speed.   Some terminals
        !           397: (notably Datamedia's) must not have \fBmi\fR because of the way their
        !           398: insert mode works.
        !           399: .PP
        !           400: Finally, you can specify delete mode by giving \fBdm\fR and \fBed\fR
        !           401: to enter and exit delete mode, and \fBdc\fR to delete a single character
        !           402: while in delete mode.
        !           403: .PP
        !           404: .B "Highlighting, underlining, and visible bells"
        !           405: .PP
        !           406: If your terminal has sequences to enter and exit standout mode these
        !           407: can be given as \fBso\fR and \fBse\fR respectively.
        !           408: If there are several flavors of standout mode
        !           409: (such as inverse video, blinking, or underlining \-
        !           410: half bright is not usually an acceptable \*(lqstandout\*(rq mode
        !           411: unless the terminal is in inverse video mode constantly)
        !           412: the preferred mode is inverse video by itself.
        !           413: If the code to change into or out of standout
        !           414: mode leaves one or even two blank spaces on the screen,
        !           415: as the TVI 912 and Teleray 1061 do,
        !           416: then \fBug\fR should be given to tell how many spaces are left.
        !           417: .PP
        !           418: Codes to begin underlining and end underlining can be given as \fBus\fR
        !           419: and \fBue\fR respectively.
        !           420: If the terminal has a code to underline the current character and move
        !           421: the cursor one space to the right, 
        !           422: such as the Microterm Mime,
        !           423: this can be given as \fBuc\fR.
        !           424: (If the underline code does not move the cursor to the right,
        !           425: give the code followed by a nondestructive space.)
        !           426: .PP
        !           427: Many terminals, such as the HP 2621, automatically leave standout
        !           428: mode when they move to a new line or the cursor is addressed.
        !           429: Programs using standout mode should exit standout mode before
        !           430: moving the cursor or sending a newline.
        !           431: .PP
        !           432: If the terminal has
        !           433: a way of flashing the screen to indicate an error quietly (a bell replacement)
        !           434: then this can be given as \fBvb\fR; it must not move the cursor.
        !           435: If the terminal should be placed in a different mode during
        !           436: open and visual modes of
        !           437: .I ex,
        !           438: this can be given as
        !           439: \fBvs\fR and \fBve\fR, sent at the start and end of these modes
        !           440: respectively.  These can be used to change, e.g., from a underline
        !           441: to a block cursor and back.
        !           442: .PP
        !           443: If the terminal needs to be in a special mode when running
        !           444: a program that addresses the cursor,
        !           445: the codes to enter and exit this mode can be given as \fBti\fR and \fBte\fR.
        !           446: This arises, for example, from terminals like the Concept with more than
        !           447: one page of memory.
        !           448: If the terminal has only memory relative cursor addressing and not screen
        !           449: relative cursor addressing, a one screen-sized window must be fixed into
        !           450: the terminal for cursor addressing to work properly.
        !           451: .PP
        !           452: If your terminal correctly generates underlined characters
        !           453: (with no special codes needed)
        !           454: even though it does not overstrike,
        !           455: then you should give the capability \fBul\fR.
        !           456: If overstrikes are erasable with a blank,
        !           457: then this should be indicated by giving \fBeo\fR.
        !           458: .PP
        !           459: .B Keypad
        !           460: .PP
        !           461: If the terminal has a keypad that transmits codes when the keys are pressed,
        !           462: this information can be given. Note that it is not possible to handle
        !           463: terminals where the keypad only works in local (this applies, for example,
        !           464: to the unshifted HP 2621 keys).
        !           465: If the keypad can be set to transmit or not transmit,
        !           466: give these codes as \fBks\fR and \fBke\fR.
        !           467: Otherwise the keypad is assumed to always transmit.
        !           468: The codes sent by the left arrow, right arrow, up arrow, down arrow,
        !           469: and home keys can be given as \fBkl, kr, ku, kd, \fRand\fB kh\fR respectively.
        !           470: If there are function keys such as f0, f1, ..., f9, the codes they send
        !           471: can be given as \fBk0, k1, ..., k9\fR.
        !           472: If these keys have labels other than the default f0 through f9, the labels
        !           473: can be given as \fBl0, l1, ..., l9\fR.
        !           474: If there are other keys that transmit the same code as the terminal expects
        !           475: for the corresponding function, such as clear screen, the \fItermcap\fP
        !           476: 2 letter codes can be given in the \fBko\fR capability,
        !           477: for example, \*(lq:ko=cl,ll,sf,sb:\*(rq, which says that the terminal has
        !           478: clear, home down, scroll down, and scroll up keys that transmit
        !           479: the same thing as the cl, ll, sf, and sb entries.
        !           480: .PP
        !           481: The
        !           482: .B ma
        !           483: entry is also used to indicate arrow keys on terminals which have
        !           484: single character arrow keys.  It is obsolete but still in use in
        !           485: version 2 of vi, which must be run on some minicomputers due to
        !           486: memory limitations.
        !           487: This field is redundant with
        !           488: .BR "kl, kr, ku, kd, " and " kh" .
        !           489: It consists of groups of two characters.
        !           490: In each group, the first character is what an arrow key sends, the
        !           491: second character is the corresponding vi command.
        !           492: These commands are
        !           493: .B h
        !           494: for
        !           495: .BR kl ,
        !           496: .B j
        !           497: for
        !           498: .BR kd ,
        !           499: .B k
        !           500: for
        !           501: .BR ku ,
        !           502: .B l
        !           503: for
        !           504: .BR kr ,
        !           505: and
        !           506: .B H
        !           507: for
        !           508: .BR kh .
        !           509: For example, the mime would be
        !           510: .B ":ma=^Kj^Zk^Xl:"
        !           511: indicating arrow keys left (^H), down (^K), up (^Z), and right (^X).
        !           512: (There is no home key on the mime.)
        !           513: .PP
        !           514: .B Miscellaneous
        !           515: .PP
        !           516: If the terminal requires other than a null (zero) character as a pad,
        !           517: then this can be given as \fBpc\fR.
        !           518: .PP
        !           519: If tabs on the terminal require padding, or if the terminal uses a
        !           520: character other than \fB^I\fR to tab, then this can be given as \fBta\fR.
        !           521: .PP
        !           522: Hazeltine terminals, which don't allow `~' characters to be printed should
        !           523: indicate \fBhz\fR.
        !           524: Datamedia terminals, which echo carriage-return linefeed for carriage return
        !           525: and then ignore a following linefeed should indicate \fBnc\fR.
        !           526: Early Concept terminals, which ignore a linefeed immediately after an \fBam\fR
        !           527: wrap, should indicate \fBxn\fR.
        !           528: If an erase-eol is required to get rid of standout
        !           529: (instead of merely writing on top of it),
        !           530: \fBxs\fP should be given.
        !           531: Teleray terminals, where tabs turn all characters moved over to blanks,
        !           532: should indicate \fBxt\fR.
        !           533: Other specific terminal problems may be corrected by adding more
        !           534: capabilities of the form \fBx\fIx\fR.
        !           535: .PP
        !           536: Other capabilities
        !           537: include \fBis\fR, an initialization string for the terminal,
        !           538: and \fBif\fR, the name of a file containing long initialization strings.
        !           539: These strings are expected to properly clear and then set the tabs
        !           540: on the terminal, if the terminal has settable tabs.
        !           541: If both are given, \fBis\fR will be printed before \fBif\fR.
        !           542: This is useful where \fBif\fR is
        !           543: .I /usr/lib/tabset/std
        !           544: but \fBis\fR
        !           545: clears the tabs first.
        !           546: .PP
        !           547: .B Similar Terminals
        !           548: .PP
        !           549: If there are two very similar terminals,
        !           550: one can be defined as being just like the other with certain exceptions.
        !           551: The string capability \fBtc\fR can be given
        !           552: with the name of the similar terminal.
        !           553: This capability must be \fIlast\fP and the combined length of the two entries
        !           554: must not exceed 1024. Since
        !           555: .I termlib
        !           556: routines search the entry from left to right, and since the tc capability is
        !           557: replaced by the corresponding entry, the capabilities given at the left
        !           558: override the ones in the similar terminal.
        !           559: A capability can be canceled with \fBxx@\fR where xx is the capability.
        !           560: For example, the entry
        !           561: .PP
        !           562:        hn\||\|2621nl:ks@:ke@:tc=2621:
        !           563: .PP
        !           564: defines a 2621nl that does not have the \fBks\fR or \fBke\fR capabilities,
        !           565: and hence does not turn on the function key labels when in visual mode.
        !           566: This is useful for different modes for a terminal, or for different
        !           567: user preferences.
        !           568: .SH FILES
        !           569: .DT
        !           570: /etc/termcap   file containing terminal descriptions
        !           571: .SH SEE ALSO
        !           572: ex(1), curses(3X), termcap(3X), tset(1), vi(1), ul(1), more(1)
        !           573: .SH AUTHOR
        !           574: William Joy
        !           575: .br
        !           576: Mark Horton added underlining and keypad support
        !           577: .SH BUGS
        !           578: .I Ex
        !           579: allows only 256 characters for string capabilities, and the routines
        !           580: in 
        !           581: .IR termcap (3X)
        !           582: do not check for overflow of this buffer.
        !           583: The total length of a single entry (excluding only escaped newlines)
        !           584: may not exceed 1024.
        !           585: .PP
        !           586: The
        !           587: .BR ma ,
        !           588: .BR vs ,
        !           589: and
        !           590: .B ve
        !           591: entries are specific to the
        !           592: .I vi
        !           593: program.
        !           594: .PP
        !           595: Not all programs support all entries.
        !           596: There are entries that are not supported by any program.

unix.superglobalmegacorp.com

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