HP-UX Reference (11i v1 00/12) - 4 File Formats (vol 8)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man4/!!!intro.4
________________________________________________________________
___ ___
t
terminfo(4) terminfo(4)
(ENHANCED CURSES)
Putting this all together into the sgr sequence gives:
sgr=\E[0%?%p2%p6%|%t;3%;%?%p1%p3%|%p6%
|%t;4%;%?%p5%t;5%;%?%p1%p5%
|%t;7%;%?%p7%t;8%;m%?%p9%tˆN%eˆO%;,
Remember that sgr and sgr0 must always be specified.
Keypad
If the device has a keypad that transmits sequences when the keys are pressed, this information can also be
specified. Note that it is not possible to handle devices where the keypad only works in local (this applies,
for example, to the unshifted Hewlett-Packard 2621 keys). If the keypad can be set to transmit or not
transmit, specify these sequences as smkx and rmkx. Otherwise the keypad is assumed to always
transmit.
The sequences sent by the left arrow, right arrow, up arrow, down arrow, and home keys can be given as
kcub1, kcuf1, kcuu1, kcud1 and khome, respectively. If there are function keys such as f0, f1, ..., f63,
the sequences they send can be specified as kf0, kf1, ..., kf63. If the first 11 keys have labels other than
the default f0 through f10, the labels can be given as lf0, lf1, ..., lf10.
The codes transmitted by certain other special keys can be given: kll (home down), kbs (backspace),
ktbc (clear all tabs), kctab (clear the tab stop in this column), kclr (clear screen or erase key), kdch1
(delete character), kdl1 (delete line), krmir (exit insert mode), kel (clear to end of line), ked (clear to
end of screen), kich1 (insert character or enter insert mode), kil1 (insert line), knp (next page), kpp
(previous page), kind (scroll forward/down), kri (scroll backward/up), khts (set a tab stop in this
column). In addition, if the keypad has a 3 by 3 array of keys including the four arrow keys, the other five
keys can be given as ka1, ka3, kb2, kc1, and kc3. These keys are useful when the effects of a 3 by 3
directional pad are needed. Further keys are defined above in the capabilitieslist.
Strings to program function keys can be specified as pfkey, pfloc, and pfx. A string to program screen
labels should be specified as pln. Each of these strings takes two arguments: a function key identifier and
a string to program it with. pfkey causes pressing the given key to be the same as the user typing the
given string; pfloc causes the string to be executed by the terminal in local mode; and pfx causes the
string to be transmitted to the computer. The capabilities nlab, lw and lh define the number of pro-
grammable screen labels and their width and height. If there are commands to turn the labels on and off,
give them in smln and rmln. smln is normally output after one or more pln sequences to make sure
that the change becomes visible.
Tabs and Initialization
If the device has hardware tabs, the command to advance to the next tab stop can be given as ht (usually
control-I). A "backtab" command that moves leftward to the next tab stop can be given as cbt. By conven-
tion, if tty modes show that tabs are being expanded by the computer rather than being sent to the device,
programs should not use ht or cbt (even if they are present) because the user might not have the tab
stops properly set. If the device has hardware tabs that are initially set every n spaces when the device is
powered up, the numeric argument it is given, showing the number of spaces the tabs are set to. This is
normally used by tput init to determine whether to set the mode for hardware tab expansion and
whether to set the tab stops. If the device has tab stops that can be saved in nonvolatile memory, the ter-
minfo description can assume that they are properly set. If there are commands to set and clear tab stops,
they can be given as tbc (clear all tab stops) and hts (set a tab stop in the current column of every row).
Other capabilities include: is1, is2, and is3, initialization strings for the device; iprog, the path name
of a program to be run to initialize the device; and if, the name of a file containing long initialization
strings. These strings are expected to set the device into modes consistent with the rest of the terminfo
description. They must be sent to the device each time the user logs in and be output in the following
order: run the program iprog; output is1; output is2; set the margins using mgc, smgl and smgr;
set the tabs using tbc and hts; print the file if; and finally output is3. This is usually done using the
init option of tput.
Most initialization is done with is2. Special device modes can be set up without duplicating strings by
putting the common sequences in is2 and special cases in is1 and is3. Sequences that do a reset from
a totally unknown state can be given as rs1, rs2, rf, and rs3, analogous to is1, is2, is3, and if.
(The method using files, if and rf, is used for a few terminals; however, the recommended method is to
use the initialization and reset strings.) These strings are output by tput reset, which is used when the
terminal gets into a wedged state. Commands are normally placed in rs1, rs2, rs3, and rf only if they
produce annoying effects on the screen and are not necessary when logging in. For example, the command
HP-UX Release 11i: December 2000 19 Section 4341
___
___