📄 termcap.5
字号:
.\" Copyright (c) 1985, 1991, 1993, 1994.\" The Regents of the University of California. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)termcap.5 8.3 (Berkeley) 4/16/94.\".Dd April 16, 1994.Dt TERMCAP 5.Os BSD 3.Sh NAME.Nm termcap.Nd terminal capability data base.Sh SYNOPSIS.Nm termcap.Sh DESCRIPTIONThe.Nm Termcapfileis a data base describing terminals,used,for example,by.Xr \&vi 1and.Xr curses 3 .Terminals are described in.Nm termcapby giving a set of capabilities that they have and by describinghow operations are performed.Padding requirements and initialization sequencesare included in.Nm termcap ..PpEntries in.Nm termcapconsist of a number of `:'-separated fields.The first entry for each terminal gives the names that are known for theterminal, separated by `|' characters.The first name given is the most common abbreviation for the terminal.The last name given should be a long name fully identifying the terminal,and all others are understood as synonyms for the terminal name.All names but the last should be in lower case and contain no blanks;the last name may well contain upper case characters and blanks forreadability..PpTerminal names (except for the last, verbose entry)should be chosen using the following conventions.The particular piece of hardware making up the terminalshould have a root name chosen, thus.Dq hp2621This name should not contain hyphens.Modes that the hardware can be inor user preferencesshould be indicated by appending a hyphen and an indicator of the mode.Therefore, a.Dq vt100in 132-column mode would be.Dq vt100-w .The following suffixes should be used where possible:.Pp.Bd -filled -offset indent.Bl -column indent "With automatic margins (usually default)xx".Sy Suffix Meaning Example-w Wide mode (more than 80 columns) vt100-w-am With automatic margins (usually default) vt100-am-nam Without automatic margins vt100-nam.Pf \- Ar n Ta No "Number of lines on screen aaa-60"-na No arrow keys (leave them in local) concept100-na.Pf \- Ar \&np Ta No "Number of pages of memory concept100-4p"-rv Reverse video concept100-rv.El.Ed.Sh CAPABILITIESThe characters in the.Em Notesfunctionfield in the table have the following meanings(more than one may apply to a capability):.Pp.Bd -unfilled -offset indentN indicates numeric parameter(s)P indicates that padding may be specified* indicates that padding may be based on the number of lines affectedo indicates capability is obsolete.Ed.Pp.Dq Obsoletecapabilities have no.Em terminfoequivalents,since they were considered useless,or are subsumed by other capabilities.New software should not rely on them at all..Pp.Bl -column indent indent indent.Sy Name Type Notes Descriptionfunctions.It "ae str (P) End alternate character set.".It AL str (NP*) Add".Em nnew blank lines.It "al str (P*) Add new blank line.".It "am bool Terminal has automatic margins.".It "as str (P) Start alternate character set.".It "bc str (o) Backspace if not.".Sy \&^H ..It "bl str (P) Audible signal (bell).".It "bs bool (o) Terminal can backspace with".Sy \&^H ..It "bt str (P) Back tab.".It "bw bool " Ta Sy \&le(backspace) wraps from column 0 to last column..It "CC str Terminal settable command character in prototype.".It "cd str (P*) Clear to end of display.".It "ce str (P) Clear to end of line.".It "ch str (NP) Set cursor column (horizontal position).".It "cl str (P*) Clear screen and home cursor.".It "CM str (NP) Memory-relative cursor addressing.".It "cm str (NP) Screen-relative cursor motion.".It "co num Number of columns in a line (See".Sx BUGSsection below)..It "cr str (P) Carriage return.".It "cs str (NP) Change scrolling region (VT100).".It "ct str (P) Clear all tab stops.".It "cv str (NP) Set cursor row (vertical position).".It "da bool Display may be retained above the screen.".It "dB num (o) Milliseconds of".Sy \&bsdelay needed (default 0)..It "db bool Display may be retained below the screen.".It "DC str (NP*) Delete".Em ncharacters..It "dC num (o) Milliseconds of".Sy \&crdelay needed (default 0)..It "dc str (P*) Delete character.".It "dF num (o) Milliseconds of".Sy \&ffdelay needed (default 0)..It "DL str (NP*) Delete".Ar nlines..It "dl str (P*) Delete line.".It "dm str Enter delete mode.".It "dN num (o) Milliseconds of.Sy \&nldelay needed (default 0)..It "DO str (NP*) Move cursor down:.Ar nlines..It "do str Down one line.".It "ds str Disable status line.".It "dT num (o) Milliseconds of horizontal tab delay needed (default 0).".It "dV num (o) Milliseconds of vertical tab delay needed (default 0).".It "ec str (NP) Erase".Ar ncharacters..It "ed str End delete mode.".It "ei str End insert mode.".It "eo bool Can erase overstrikes with a blank.".It "EP bool (o) Even parity.".It "es bool Escape can be used on the status line.".It "ff str (P*) Hardcopy terminal page eject.".It "fs str Return from status line.".It "gn bool Generic line type, for example dialup, switch).".It "hc bool Hardcopy terminal.".It "HD bool (o) Half-duplex.".It "hd str Half-line down (forward 1/2 linefeed).".It "ho str (P) Home cursor.".It "hs bool Has extra".Dq status line ..It "hu str Half-line up (reverse 1/2 linefeed).".It "hz bool Cannot print ``~'' (Hazeltine).".It "i1-i3 str Terminal initialization strings".Pf ( Xr terminfoonly).It "IC str (NP*) Insert".Ar nblank characters..It "ic str (P*) Insert character.".It "if str Name of file containing initialization string.".It "im str Enter insert mode.".It "in bool Insert mode distinguishes nulls.".It "iP str Pathname of program for initialization".Pf ( Xr terminfoonly)..It "ip str (P*) Insert pad after character inserted.".It "is str Terminal initialization string".Pf ( Nm termcaponly)..It "it num Tabs initially every".Ar npositions..It "K1 str Sent by keypad upper left.".It "K2 str Sent by keypad upper right.".It "K3 str Sent by keypad center.".It "K4 str Sent by keypad lower left.".It "K5 str Sent by keypad lower right.".It "k0-k9 str Sent by function keys 0-9.".It "kA str Sent by insert-line key.".It "ka str Sent by clear-all-tabs key.".It "kb str Sent by backspace key.".It "kC str Sent by clear-screen or erase key.".It "kD str Sent by delete-character key.".It "kd str Sent by down-arrow key.".It "kE str Sent by clear-to-end-of-line key.".It "ke str Out of".Dq keypad transmitmode..It "kF str Sent by scroll-forward/down key.".It "kH str Sent by home-down key.".It "kh str Sent by home key.".It "kI str Sent by insert-character or enter-insert-mode key.".It "kL str Sent by delete-line key.".It "kl str Sent by left-arrow key.".It "kM str Sent by insert key while in insert mode.".It "km bool Has a".Dq metakey (shift, sets parity bit)..It "kN str Sent by next-page key.".It "kn num (o) Number of function".Pq Sy \&k\&0 Ns \- Sy \&k\&9keys (default 0)..It "ko str (o) Termcap entries for other non-function keys.".It "kP str Sent by previous-page key.".It "kR str Sent by scroll-backward/up key.".It "kr str Sent by right-arrow key.".It "kS str Sent by clear-to-end-of-screen key.".It "ks str Put terminal in".Dq keypad transmitmode..It "kT str Sent by set-tab key.".It "kt str Sent by clear-tab key.".It "ku str Sent by up-arrow key.".It "l0-l9 str Labels on function keys if not".Dq \&f Ns Em n ..It "LC bool (o) Lower-case only.".It "LE str (NP) Move cursor left".Ar npositions..It "le str (P) Move cursor left one position.".It "li num Number of lines on screen or page (See".Sx BUGSsection below).It "ll str Last line, first column.It "lm num Lines of memory if >" Sy \&li(0 means varies)..It "ma str (o) Arrow key map (used by".Xr \&viversion 2 only)..It "mb str Turn on blinking attribute.".It "md str Turn on bold (extra bright) attribute.".It "me str Turn off all attributes.".It "mh str Turn on half-bright attribute.".It "mi bool Safe to move while in insert mode.".It "mk str Turn on blank attribute (characters invisible).".It "ml str (o) Memory lock on above cursor.".It "mm str Turn on".Dq meta mode(8th bit)..It "mo str Turn off".Dq meta mode ..It "mp str Turn on protected attribute.".It "mr str Turn on reverse-video attribute.".It "ms bool Safe to move in standout modes.".It "mu str (o) Memory unlock (turn off memory lock).".It "nc bool (o) No correctly-working".Sy \&cr(Datamedia 2500, Hazeltine 2000)..It "nd str Non-destructive space (cursor right).".It "NL bool (o)" Ta Sy \&\en No "is newline, not line feed.".It "nl str (o) Newline character if not" Sy \en ..It "ns bool (o) Terminal is a" Tn CRT No "but doesn't scroll.".It "nw str (P) Newline (behaves like".Sy \&crfollowed by.Sy \&do )..It "OP bool (o) Odd parity.".It "os bool Terminal overstrikes.".It "pb num Lowest baud where delays are required.".It "pc str Pad character (default" Tn NUL )..It "pf str Turn off the printer.".It "pk str Program function key".Em nto type string.Em s.Pf ( Xr terminfoonly)..It "pl str Program function key".Em nto execute string.Em s.Pf ( Xr terminfoonly)..It "pO str (N) Turn on the printer for".Em nbytes..It "po str Turn on the printer.".It "ps str Print contents of the screen.".It "pt bool (o) Has hardware tabs (may need to be set with".Sy \&is )..It "px str Program function key".Em nto transmit string.Em s.Pf ( Xr terminfoonly)..It "r1-r3 str Reset terminal completely to sane modes".Pf ( Xr terminfoonly)..It "rc str (P) Restore cursor to position of last".Sy \&sc ..It "rf str Name of file containing reset codes.".It "RI str (NP) Move cursor right".Em npositions..It "rp str (NP*) Repeat character".Em c ntimes..It "rs str Reset terminal completely to sane modes".Pf ( Nm termcaponly)..It "sa str (NP) Define the video attributes.".It "sc str (P) Save cursor position.".It "se str End standout mode.".It "SF str (NP*) Scroll forward".Em nlines..It "sf str (P) Scroll text up.".It "sg num Number of garbage chars left by".Sy \&soor.Sy \&se(default 0)..It "so str Begin standout mode.".It "SR str (NP*) Scroll backward".Em nlines..It "sr str (P) Scroll text down.".It "st str Set a tab in all rows, current column.".It "ta str (P) Tab to next 8-position hardware tab stop.".It "tc str Entry of similar terminal \- must be last.".It "te str String to end programs that use".Nm termcap ..It "ti str String to begin programs that use".Nm termcap ..It "ts str (N) Go to status line, column".Em n ..It "UC bool (o) Upper-case only.".It "uc str Underscore one character and move past it.".It "ue str End underscore mode.".It "ug num Number of garbage chars left by".Sy \&usor.Sy \&ue(default 0)..It "ul bool Underline character overstrikes.".It "UP str (NP*) Move cursor up".Em nlines..It "up str Upline (cursor up).".It "us str Start underscore mode.".It "vb str Visible bell (must not move cursor).".It "ve str Make cursor appear normal (undo".Sy \&vs Ns / Sy \&vi ) ..It "vi str Make cursor invisible.".It "vs str Make cursor very visible.".It "vt num Virtual terminal number (not supported on all systems).".It "wi str (N) Set current window.".It "ws num Number of columns in status line.".It "xb bool Beehive".Pf ( "f1=" Dv ESC ,.Pf "f2=" Sy \&^C ) ..It "xn bool Newline ignored after 80 cols (Concept).".It "xo bool Terminal uses xoff/xon".Pq Dv DC3 Ns / Ns Dv DC1handshaking..It "xr bool (o) Return acts like".Sy "ce cr nl"(Delta Data)..It "xs bool Standout not erased by overwriting (Hewlett-Packard).".It "xt bool Tabs ruin, magic".SY \&sochar (Teleray 1061)..It "xx bool (o) Tektronix 4025 insert-line.".El.Ss A Sample EntryThe following entry, which describes the Concept\-100, is among the morecomplex entries in the.Nm termcapfile as of this writing..Pp.Bd -literalca\||\|concept100\||\|c100\||\|concept\||\|c104\||\|concept100-4p\||\|HDS Concept\-100:\e :al=3*\eE^R:am:bl=^G:cd=16*\eE^C:ce=16\eE^U:cl=2*^L:cm=\eEa%+ %+ :\e :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 :ip=16*:is=\eEU\eEf\eE7\eE5\eE8\eEl\eENH\eEK\eE\e200\eEo&\e200\eEo\e47\eE:k1=\eE5:\e :k2=\eE6:k3=\eE7:kb=^h:kd=\eE<:ke=\eEx:kh=\eE?:kl=\eE>:kr=\eE=:ks=\eEX:\e :ku=\eE;:le=^H:li#24:mb=\eEC:me=\eEN\e200:mh=\eEE:mi:mk=\eEH:mp=\eEI:\e :mr=\eED:nd=\eE=:pb#9600:rp=0.2*\eEr%.%+ :se=\eEd\eEe:sf=^J:so=\eEE\eED:\e :.ta=8\et:te=\eEv \e200\e200\e200\e200\e200\e200\eEp\er\en:\e :ti=\eEU\eEv 8p\eEp\er:ue=\eEg:ul:up=\eE;:us=\eEG:\e :vb=\eEk\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\eEK:\e :ve=\eEw:vs=\eEW:vt#8:xn:\e :bs:cr=^M:dC#9:dT#8:nl=^J:ta=^I:pt:.Ed.PpEntries may continue onto multiple lines by giving a \e as the lastcharacter of a line, and empty fieldsmay be included for readability (here between the last field on a lineand the first field on the next).Comments may be included on lines beginning with.Dq # ..Ss Types of CapabilitiesCapabilities in.Nm termcapare of three types: Boolean capabilities,which indicate particular features that the terminal has;numeric capabilities,giving the size of the display or the size of other attributes;and string capabilities,which give character sequences that can be used to perform particularterminal operations.All capabilities have two-letter codes.For instance, the fact thatthe Concept has.Em automatic margins(an automatic return and linefeedwhen the end of a line is reached) is indicated by the Boolean capability.Sy \&am .Hence the description of the Concept includes.Sy \&am ..Pp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -