Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
termcap(4) OSS System Calls Reference Manual
Keypad Support
If the terminal has a keypad that transmits codes when the keys are pressed, this information can
be provided in termcap. Note that it is not possible to handle terminals where the keypad works
only in local mode (this applies, for example, to the unshifted Hewlett-Packard 2621 terminal’s
keys). If the keypad can be set to transmit or not transmit, specify the ks and ke capabilities.
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 specified by the kl, kr, ku, kd, and kh capa-
bilities, respectively. If there are function keys such as f0, f1, ..., f9, the codes they send can be
specified by the k0, k1,..., k9 capabilities. If these keys have labels other than the default f0
through f9, the labels can be specified by the l0, l1,..., l9 capabilities.
The codes transmitted by certain other special keys can be specified by the following capabili-
ties:
kH Home down
kb Backspace
ka Clear all tabs
kt Clear the tab stop in this column
kC Clear screen or erase
kD Delete character
kL Delete line
kM Exit insert mode
kE Clear to end of line
kS Clear to end of screen
kI Insert character or enter insert mode
kA Insert line
kN Next page
kP Previous page
kF Scroll forward/down
kR Scroll backward/up
kT 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, then the other
five keys can be specified by the K1, K2, K3, K4, and K5 capabilities. These keys are useful
when the effects of a 3-by-3 directional pad are needed. The obsolete ko capability, used to
describe "other" function keys, has been completely replaced by the preceding list of capabilities.
The ma capability is also used to indicate arrow keys on terminals that have single-character
arrow keys. It is obsolete but still in use in version 2 of the vi utility, which must be run on some
minicomputers due to memory limitations. The ma capability is redundant with the
kl, kr, ku,
kd,
and kh capabilities. The ma capability consists of groups of two characters. In each group,
the first character is what an arrow key sends, and the second character is the corresponding vi
command. These vi commands are h for the kl capability, j for kd, k for ku, l for kr, and H for
kh. For example, the Microterm Mime terminal would have ma=ˆHhˆKjˆZkˆXl indicating arrow
keys left (ˆH), down (ˆK), up (ˆZ), and right (ˆX). (There is no home key on the Microterm Mime
11−60 Hewlett-Packard Company 527186-023