10.0;kd (key_definition) *DM*, revision 1.0, 87/12/23
kd (key_definition) set or display key definition
usage: kd key_name [[definition ke]]
DESCRIPTION
The kd command defines a keyboard key as a sequence of DM commands. It
also can display the definition of a key.
ARGUMENTS
key_name (required)
Specify the name of the key to be defined or displayed.
Key names are available from help DM keys. Enclose normal
alphanumeric and punctuation keys in quotation marks.
definition (optional)
Specify the sequence of DM commands that represent the
desired key function; separate commands with newlines or
semicolons. Definition can be any number of commands, but
cannot exceed 1024 characters. Definitions may contain
other predefined keys (that is, key definitions may be
embedded in one another).
You must precede the input request character, '&', which
is frequently used in key definitions, by an escape
character when the kd command appears in a script.
If you do not specify a definition and ke is present (that
is, the definition is null), the current key definition is
deleted and the key reverts to its normal graphic value,
if any. If ke is also absent, the definition of the named
key is displayed in the DM message window.
Default if omitted: see above
ke (optional) Signal the end of the kd command. This argument is
required if you specify a definition, or if you wish to
delete a definition by specifying a null definition.
Default if omitted: display key_name definition
EXAMPLES
kd l3 Display definition of key l3.
kd f6 au;tr ke Define f6 key to move the cursor to end of previous line
in window.
kd ^C ke Delete current definition of ^C.
You can embed key definitions in key definitions, and thereby define keys
that define other keys. The embedded key definition follows the same
rules as any other key definition. The ke that ends the embedded
definition must be separated from the next command by an "escaped"
semicolon; that is, a semicolon preceded by the @ character. For
example,
kd kd ^X es 'April is the cruelest month' @ke; pv ke
changes the definition of the f3 key, which normally just invokes the DM
command pv, so that it also changes the definition of ^X to print out the
string shown. If you do not precede the ';' by an escape character, the
DM does not accept the definition.
Note that key definitions within key definitions are scanned three times:
1) when the outer key definition is made, 2) when the outer key
definition is executed and the inner key definition is made, and 3) when
the inner key definition is executed. Therefore, be very careful when
you escape (with "@") certain special characters such as "@" itself.
SEE ALSO
More information is available. Type the following at an Aegis shell
prompt:
help dm keys For a list of standard key definitions