📄 terminfo.tail
字号:
not on the bottom line (to make, for example, a non-blinking underline into aneasier to find block or blinking underline)give this sequence as.BR cvvis .If there is a way to make the cursor completely invisible, give that as.BR civis .The capability.BR cnormshould be given which undoes the effects of both of these modes..PPIf your terminal correctly generates underlined characters(with no special codes needed)even though it does not overstrike,then you should give the capability \fBul\fR.If a character overstriking another leaves both characters on the screen,specify the capability \fBos\fP.If overstrikes are erasable with a blank,then this should be indicated by giving \fBeo\fR..PP.SS Keypad and Function Keys.PPIf the terminal has a keypad that transmits codes when the keys are pressed,this information can be given.Note that it is not possible to handleterminals where the keypad only works in local (this applies, for example,to the unshifted HP 2621 keys).If the keypad can be set to transmit or not transmit,give these codes as \fBsmkx\fR and \fBrmkx\fR.Otherwise the keypad is assumed to always transmit.The codes sent by the left arrow, right arrow, up arrow, down arrow,and home keys can be given as\fBkcub1, kcuf1, kcuu1, kcud1, \fRand\fB khome\fR respectively.If there are function keys such as f0, f1, ..., f10, the codes they sendcan be given as \fBkf0, kf1, ..., kf10\fR.If these keys have labels other than the default f0 through f10, the labelscan be given as \fBlf0, lf1, ..., lf10\fR.The codes transmitted by certain other special keys can be given:.B kll(home down),.B kbs(backspace),.B ktbc(clear all tabs),.B kctab(clear the tab stop in this column),.B kclr(clear screen or erase key),.B kdch1(delete character),.B kdl1(delete line),.B krmir(exit insert mode),.B kel(clear to end of line),.B ked(clear to end of screen),.B kich1(insert character or enter insert mode),.B kil1(insert line),.B knp(next page),.B kpp(previous page),.B kind(scroll forward/down),.B kri(scroll backward/up),.B khts(set a tab stop in this column).In addition, if the keypad has a 3 by 3 array of keys including the fourarrow keys, the other five keys can be given as.BR ka1 ,.BR ka3 ,.BR kb2 ,.BR kc1 ,and.BR kc3 .These keys are useful when the effects of a 3 by 3 directional pad are needed..PPStrings to program function keys can be given as.BR pfkey ,.BR pfloc ,and.BR pfx .A string to program screen labels should be specified as \fBpln\fP.Each of these strings takes two parameters: the function key number toprogram (from 0 to 10) and the string to program it with.Function key numbers out of this range may program undefined keys ina terminal dependent manner.The difference between the capabilities is that.B pfkeycauses pressing the given key to be the same as the user typing thegiven string;.B pfloccauses the string to be executed by the terminal in local; and.B pfxcauses the string to be transmitted to the computer..PPThe capabilities \fBnlab\fP, \fBlw\fP and \fBlh\fPdefine the number of programmablescreen labels and their width and height.If there are commands to turn the labels on and off,give them in \fBsmln\fP and \fBrmln\fP.\fBsmln\fP is normally output after one or more plnsequences to make sure that the change becomes visible..PP.SS Tabs and Initialization.PPIf the terminal has hardware tabs, the command to advance to the nexttab stop can be given as.B ht(usually control I).A ``back-tab'' command which moves leftward to the preceding tab stop canbe given as.BR cbt .By convention, if the teletype modes indicate that tabs are beingexpanded by the computer rather than being sent to the terminal,programs should not use.B htor.B cbteven if they are present, since the user may not have the tab stopsproperly set.If the terminal has hardware tabs which are initially set every.I nspaces when the terminal is powered up,the numeric parameter.B itis given, showing the number of spaces the tabs are set to.This is normally used by the.IR tsetcommand to determine whether to set the mode for hardware tab expansion,and whether to set the tab stops.If the terminal has tab stops that can be saved in non-volatile memory,the terminfo description can assume that they are properly set..PPOther capabilitiesinclude.BR is1 ,.BR is2 ,and.BR is3 ,initialization strings for the terminal,.BR iprog ,the path name of a program to be run to initialize the terminal,and \fBif\fR, the name of a file containing long initialization strings.These strings are expected to set the terminal into modes consistentwith the rest of the terminfo description.They are normally sent to the terminal, by the.I initoption of the.IR tputprogram, each time the user logs in.They will be printed in the following order:run the program.BR iprog ;output.BR is1 ;.BR is2 ;set the margins using.BR mgc ,.BR smgland.BR smgr ;set tabs using.B tbcand.BR hts ;print the file.BR if ;and finallyoutput.BR is3 ..PPMost initialization is done with.BR is2 .Special terminal modes can be set up without duplicating stringsby putting the common sequences in.B is2and special cases in.B is1and.BR is3 .A pair of sequences that does a harder reset from a totally unknown statecan be analogously given as.BR rs1 ,.BR rs2 ,.BR rf ,and.BR rs3 ,analogous to.B is2and.BR if .These strings are output by the.IR resetprogram, which is used when the terminal gets into a wedged state.Commands are normally placed in.BR rs1 ,.BR rs2.B rs3and.B rfonly if they produce annoying effects on the screen and are notnecessary when logging in.For example, the command to set the vt100 into 80-column mode wouldnormally be part of.BR is2 ,but it causes an annoying glitch of the screen and is not normallyneeded since the terminal is usually already in 80 column mode..PPIf there are commands to set and clear tab stops, they can be given as.B tbc(clear all tab stops)and.B hts(set a tab stop in the current column of every row).If a more complex sequence is needed to set the tabs than can bedescribed by this, the sequence can be placed in.B is2or.BR if ..SS Delays and Padding.PPMany older and slower terminals don't support either XON/XOFF or DTRhandshaking, including hard copy terminals and some very archaic CRTs(including, for example, DEC VT100s).These may require padding charactersafter certain cursor motions and screen changes..PPIf the terminal uses xon/xoff handshaking for flow control (that is,it automatically emits ^S back to the host when its input buffers areclose to full), set.BR xon .This capability suppresses the emission of padding.You can also set itfor memory-mapped console devices effectively that don't have a speed limit.Padding information should still be included so that routines canmake better decisions about relative costs, but actual pad characters willnot be transmitted..PPIf \fBpb\fR (padding baud rate) is given, padding is suppressed at baud ratesbelow the value of \fBpb\fR.If the entry has no padding baud rate, thenwhether padding is emitted or not is completely controlled by \fBxon\fR..PPIf the terminal requires other than a null (zero) character as a pad,then this can be given as \fBpad\fR.Only the first character of the.B padstring is used..PP.SS Status LinesSome terminals have an extra `status line' which is not normally used bysoftware (and thus not counted in the terminal's \fBlines\fR capability)..PPThe simplest case is a status line which is cursor-addressable but notpart of the main scrolling region on the screen; the Heathkit H19 hasa status line of this kind, as would a 24-line VT100 with a 23-linescrolling region set up on initialization.This situation is indicatedby the \fBhs\fR capability..PPSome terminals with status lines need special sequences to access thestatus line.These may be expressed as a string with single parameter\fBtsl\fR which takes the cursor to a given zero-origin column on thestatus line.The capability \fBfsl\fR must return to the main-screencursor positions before the last \fBtsl\fR.You may need to embed thestring values of \fBsc\fR (save cursor) and \fBrc\fR (restore cursor)in \fBtsl\fR and \fBfsl\fR to accomplish this..PPThe status line is normally assumed to be the same width as the widthof the terminal.If this is untrue, you can specify it with the numericcapability \fBwsl\fR..PPA command to erase or blank the status line may be specified as \fBdsl\fR..PPThe boolean capability \fBeslok\fR specifies that escape sequences, tabs,etc., work ordinarily in the status line..PPThe \fBncurses\fR implementation does not yet use any of these capabilities.They are documented here in case they ever become important..PP.SS Line Graphics.PPMany terminals have alternate character sets useful for forms-drawing.Terminfo and \fBcurses\fR build in support for the drawing characterssupported by the VT100, with some characters from the AT&T 4410v1 added.This alternate character set may be specified by the \fBacsc\fR capability..PP.TS Hcenter expand;c l l cc l l clw28 lw6 lw2 lw20..\".TH\fBGlyph ACS Ascii VT100\fR\fBName Name Default Name\fRUK pound sign ACS_STERLING f }arrow pointing down ACS_DARROW v .arrow pointing left ACS_LARROW < ,arrow pointing right ACS_RARROW > +arrow pointing up ACS_UARROW ^ -board of squares ACS_BOARD # hbullet ACS_BULLET o ~checker board (stipple) ACS_CKBOARD : adegree symbol ACS_DEGREE \e fdiamond ACS_DIAMOND + `greater-than-or-equal-to ACS_GEQUAL > zgreek pi ACS_PI * {horizontal line ACS_HLINE - qlantern symbol ACS_LANTERN # ilarge plus or crossover ACS_PLUS + nless-than-or-equal-to ACS_LEQUAL < ylower left corner ACS_LLCORNER + mlower right corner ACS_LRCORNER + jnot-equal ACS_NEQUAL ! |plus/minus ACS_PLMINUS # gscan line 1 ACS_S1 ~ oscan line 3 ACS_S3 - pscan line 7 ACS_S7 - rscan line 9 ACS_S9 \&_ ssolid square block ACS_BLOCK # 0tee pointing down ACS_TTEE + wtee pointing left ACS_RTEE + utee pointing right ACS_LTEE + ttee pointing up ACS_BTEE + vupper left corner ACS_ULCORNER + lupper right corner ACS_URCORNER + kvertical line ACS_VLINE | x.TE.PPThe best way to define a new device's graphics set is to add a columnto a copy of this table for your terminal, giving the character which(when emitted between \fBsmacs\fR/\fBrmacs\fR switches) will be renderedas the corresponding graphic.Then read off the VT100/your terminalcharacter pairs right to left in sequence; these become the ACSC string..PP.SS Color Handling.PPMost color terminals are either `Tektronix-like' or `HP-like'.Tektronix-liketerminals have a predefined set of N colors (where N usually 8), and can setcharacter-cell foreground and background characters independently, mixing theminto N * N color-pairs.On HP-like terminals, the use must set each colorpair up separately (foreground and background are not independently settable).Up to M color-pairs may be set up from 2*M different colors.ANSI-compatibleterminals are Tektronix-like..PPSome basic color capabilities are independent of the color method.The numericcapabilities \fBcolors\fR and \fBpairs\fR specify the maximum numbers of colorsand color-pairs that can be displayed simultaneously.The \fBop\fR (originalpair) string resets foreground and background colors to their default valuesfor the terminal.The \fBoc\fR string resets all colors or color-pairs totheir default values for the terminal.Some terminals (including many PCterminal emulators) erase screen areas with the current background color ratherthan the power-up default background; these should have the boolean capability\fBbce\fR..PPTo change the current foreground or background color on a Tektronix-typeterminal, use \fBsetaf\fR (set ANSI foreground) and \fBsetab\fR (set ANSIbackground) or \fBsetf\fR (set foreground) and \fBsetb\fR (set background).These take one parameter, the color number.The SVr4 documentation describesonly \fBsetaf\fR/\fBsetab\fR; the XPG4 draft says that "If the terminalsupports ANSI escape sequences to set background and foreground, they shouldbe coded as \fBsetaf\fR and \fBsetab\fR, respectively.If the terminalsupports other escape sequences to set background and foreground, they shouldbe coded as \fBsetf\fR and \fBsetb\fR, respectively.The \fIvidputs()\fRfunction and the refresh functions use \fBsetaf\fR and \fBsetab\fR if they aredefined.".PPThe \fBsetaf\fR/\fBsetab\fR and \fBsetf\fR/\fBsetb\fR capabilities take asingle numeric argument each.Argument values 0-7 of \fBsetaf\fR/\fBsetab\fR are portably defined asfollows (the middle column is the symbolic #define available in the header forthe \fBcurses\fR or \fBncurses\fR libraries).The terminal hardware is free tomap these as it likes, but the RGB values indicate normal locations in colorspace..PP.TS Hcenter;l c c cl l n l.\fBColor #define Value RGB\fRblack \fBCOLOR_BLACK\fR 0 0, 0, 0red \fBCOLOR_RED\ \fR 1 max,0,0green \fBCOLOR_GREEN\fR 2 0,max,0yellow \fBCOLOR_YELLOW\fR 3 max,max,0blue \fBCOLOR_BLUE\fR 4 0,0,maxmagenta \fBCOLOR_MAGENTA\fR 5 max,0,maxcyan \fBCOLOR_CYAN\fR 6 0,max,maxwhite \fBCOLOR_WHITE\fR 7 max,max,max.TE.PP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -