📄 terminfo.5.html
字号:
alt_scancode_esc scesa S8 Alternate escape for scancode emu- lation bit_image_carriage_return bicr Yv Move to beginning of same row bit_image_newline binel Zz Move to next row of the bit image bit_image_repeat birep Xy Repeat bit image cell #1 #2 times char_set_names csnm Zy Produce #1'th item from list of char- acter set names code_set_init csin ci Init sequence for multiple codesets color_names colornm Yw Give name for color #1 define_bit_image_region defbi Yx Define rectan- gualar bit image region device_type devt dv Indicate lan- guage/codeset sup- port display_pc_char dispc S1 Display PC charac- ter #1 end_bit_image_region endbi Yy End a bit-image region enter_pc_charset_mode smpch S2 Enter PC character display mode enter_scancode_mode smsc S4 Enter PC scancode mode exit_pc_charset_mode rmpch S3 Exit PC character display mode exit_scancode_mode rmsc S5 Exit PC scancode mode get_mouse getm Gm Curses should get button events, parameter #1 not documented. key_mouse kmous Km Mouse event has occurred mouse_info minfo Mi Mouse status information pc_term_options pctrm S6 PC terminal options pkey_plab pfxl xl Program function key #1 to type string #2 and show string #3 req_mouse_pos reqmp RQ Request mouse position scancode_escape scesc S7 Escape for scan- code emulation set0_des_seq s0ds s0 Shift to codeset 0 (EUC set 0, ASCII) set1_des_seq s1ds s1 Shift to codeset 1 set2_des_seq s2ds s2 Shift to codeset 2 set3_des_seq s3ds s3 Shift to codeset 3 set_a_background setab AB Set background color to #1, using ANSI escape set_a_foreground setaf AF Set foreground color to #1, using ANSI escape set_color_band setcolor Yz Change to ribbon color #1 set_lr_margin smglr ML Set both left and right margins to #1, #2. (ML is not in BSD term- cap). set_page_length slines YZ Set page length to #1 lines set_tb_margin smgtb MT Sets both top and bottom margins to #1, #2 The XSI Curses standard added these. They are some post-4.1 versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x. The <STRONG>ncurses</STRONG> termcap names for them are invented; according to the XSI Curses standard, they have no termcap names. If your compiled terminfo entries use these, they may not be binary-compatible with System V terminfo entries after SVr4.1; beware! <STRONG>Variable</STRONG> <STRONG>Cap-</STRONG> <STRONG>TCap</STRONG> <STRONG>Description</STRONG> <STRONG>String</STRONG> <STRONG>name</STRONG> <STRONG>Code</STRONG> enter_horizontal_hl_mode ehhlm Xh Enter horizontal highlight mode enter_left_hl_mode elhlm Xl Enter left highlight mode enter_low_hl_mode elohlm Xo Enter low highlight mode enter_right_hl_mode erhlm Xr Enter right high- light mode enter_top_hl_mode ethlm Xt Enter top highlight mode enter_vertical_hl_mode evhlm Xv Enter vertical high- light mode set_a_attributes sgr1 sA Define second set of video attributes #1-#6 set_pglen_inch slengthsL YI Set page length to #1 hundredth of an inch <STRONG>A</STRONG> <STRONG>Sample</STRONG> <STRONG>Entry</STRONG> The following entry, describing an ANSI-standard terminal, is representative of what a <STRONG>terminfo</STRONG> entry for a modern terminal typically looks like. ansi|ansi/pc-term compatible with color, mc5i, colors#8, ncv#3, pairs#64, cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, cuu=\E[%p1%dA, dch=\E[%p1%dP, dl=\E[%p1%dM, ech=\E[%p1%dX, el1=\E[1K, hpa=\E[%p1%dG, ht=\E[I, ich=\E[%p1%d@, il=\E[%p1%dL, indn=\E[%p1%dS, .indn=\E[%p1%dT, kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E[M, kf10=\E[V, kf11=\E[W, kf12=\E[X, kf2=\E[N, kf3=\E[O, kf4=\E[P, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, kich1=\E[L, mc4=\E[4i, mc5=\E[5i, nel=\r\E[S, op=\E[37;40m, rep=%p1%c\E[%p2%{1}%-%db, rin=\E[%p1%dT, s0ds=\E(B, s1ds=\E)B, s2ds=\E*B, s3ds=\E+B, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p8%t;11%;%?%p9%t;12%;m, sgr0=\E[0;10m, tbc=\E[2g, u6=\E[%d;%dR, u7=\E[6n, u8=\E[?%[;0123456789]c, u9=\E[c, vpa=\E[%p1%dd, Entries may continue onto multiple lines by placing white space at the beginning of each line except the first. Comments may be included on lines beginning with ``#''. Capabilities in <EM>terminfo</EM> are of three types: Boolean capa- bilities which indicate that the terminal has some particular feature, numeric capabilities giving the size of the terminal or the size of particular delays, and string capabilities, which give a sequence which can be used to perform particular terminal operations. <STRONG>Types</STRONG> <STRONG>of</STRONG> <STRONG>Capabilities</STRONG> All capabilities have names. For instance, the fact that ANSI-standard terminals have <EM>automatic</EM> <EM>margins</EM> (i.e., an automatic return and line-feed when the end of a line is reached) is indicated by the capability <STRONG>am</STRONG>. Hence the description of ansi includes <STRONG>am</STRONG>. Numeric capabilities are followed by the character `#' and then a positive value. Thus <STRONG>cols</STRONG>, which indicates the number of columns the ter- minal has, gives the value `80' for ansi. Values for numeric capabilities may be specified in decimal, octal or hexadecimal, using the C programming language conventions (e.g., 255, 0377 and 0xff or 0xFF). Finally, string valued capabilities, such as <STRONG>el</STRONG> (clear to end of line sequence) are given by the two-character code, an `=', and then a string ending at the next following `,'. A number of escape sequences are provided in the string valued capabilities for easy encoding of characters there. Both <STRONG>\E</STRONG> and <STRONG>\e</STRONG> map to an ESCAPE character, <STRONG>^x</STRONG> maps to a control-x for any appropriate x, and the sequences <STRONG>\n</STRONG> <STRONG>\l</STRONG> <STRONG>\r</STRONG> <STRONG>\t</STRONG> <STRONG>\b</STRONG> <STRONG>\f</STRONG> <STRONG>\s</STRONG> give a newline, line-feed, return, tab, backspace, form-feed, and space. Other escapes include <STRONG>\^</STRONG> for <STRONG>^</STRONG>, <STRONG>\\</STRONG> for <STRONG>\</STRONG>, <STRONG>\</STRONG>, for comma, <STRONG>\:</STRONG> for <STRONG>:</STRONG>, and <STRONG>\0</STRONG> for null. (<STRONG>\0</STRONG> will produce \200, which does not terminate a string but behaves as a null character on most terminals, provid- ing CS7 is specified. See <STRONG><A HREF="stty.1.html">stty(1)</A></STRONG>.) Finally, characters may be given as three octal digits after a <STRONG>\</STRONG>. A delay in milliseconds may appear anywhere in a string capability, enclosed in $<..> brackets, as in <STRONG>el</STRONG>=\EK$<5>, and padding characters are supplied by <EM>tputs</EM> to provide this delay. The delay must be a number with at most one decimal place of precision; it may be followed by suffixes `*' or '/' or both. A `*' indicates that the padding required is proportional to the number of lines affected by the operation, and the amount given is the per- affected-unit padding required. (In the case of insert character, the factor is still the number of <EM>lines</EM> affected.) Normally, padding is advisory if the device has the <STRONG>xon</STRONG> capability; it is used for cost computation but does not trigger delays. A `/' suffix indicates that the padding is mandatory and forces a delay of the given number of milliseconds even on devices for which <STRONG>xon</STRONG> is present to indicate flow control. Sometimes individual capabilities must be commented out. To do this, put a period before the capability name. For example, see the second <STRONG>ind</STRONG> in the example above. <STRONG>Fetching</STRONG> <STRONG>Compiled</STRONG> <STRONG>Descriptions</STRONG> If the environment variable TERMINFO is set, it is inter- preted as the pathname of a directory containing the com- piled description you are working on. Only that directory is searched. If TERMINFO is not set, the <STRONG>ncurses</STRONG> version of the ter- minfo reader code will instead look in the directory <STRONG>$HOME/.terminfo</STRONG> for a compiled description. If it fails to find one there, and the environment variable TER- MINFO_DIRS is set, it will interpret the contents of that variable as a list of colon- separated directories to be searched (an empty entry is interpreted as a command to search <EM>/usr/share/terminfo</EM>). If no description is found in any of the TERMINFO_DIRS directories, the fetch fails. If neither TERMINFO nor TERMINFO_DIRS is set, the last place tried will be the system terminfo directory, <EM>/usr/share/terminfo</EM>. (Neither the <STRONG>$HOME/.terminfo</STRONG> lookups nor TERMINFO_DIRS extensions are supported under stock System V ter- minfo/curses.) <STRONG>Preparing</STRONG> <STRONG>Descriptions</STRONG> We now outline how to prepare descriptions of terminals. The most
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -