KEY_NAME
Returns a VAXTPU keyword for a key or a combination of keys.
Syntax
keyword_variable := KEY_NAME ({string | keyword1 | integer}
[, SHIFT_KEY] [, FUNCTION | , KEYPAD])
Parameters
string A single-character string, or an expression
evaluating to a single-character string,
representing the character for which a keyword is
to be generated. The character must be a member
of the DEC Multinational Character Set.
keyword1 A VAXTPU keyname for a key.
integer The integer value of the character for which a
keyword is to be generated. The character must be
a member of the DEC Multinational Character Set.
The integer can be the integer representation of
the VAXTPU keyword that names the key. You can
obtain this integer representation using the INT
built-in. Alternatively, the integer can be the
DEC Multinational Character Set decimal equivalent
of the character for which a keyword is to be
generated. You can specify this decimal
equivalent when you want to generate a keyword for
a key that does not generate a printing character
and for which there is no existing VAXTPU keyname.
SHIFT_KEY A keyword indicating that the returned keyword is
preceded by one or more shift keys. SHIFT_KEY
refers to the VAXTPU shift key (PF1 by default),
not the SHIFT key on the keyboard.
FUNCTION A keyword indicating that the resulting keyname is
a function keyname.
KEYPAD A keyword indicating that the resulting keyname is
a keypad keyname.
Comments
Use KEY_NAME with the DEFINE_KEY built-in to create a keyname for a key
or sequence of keys. For a list of existing VAXTPU keynames, see the
VAXTPU HELP informational topic 'Keynames Table.'
If you do not specify the keyword SHIFT_KEY as a parameter, the
KEY_NAME built-in is case sensitive. That is, the following statements
generate two different keywords:
KEY_NAME ('Z');
KEY_NAME ('z');
If you use the SHIFT_KEY parameter, the built-in is case insensitive.
Examples
key1 := KEY_NAME ('Z')
This assignment statement creates the keyname key1 for the keyboard key
Z.
key2 := KEY_NAME (KP5, SHIFT_KEY)
This example uses KEY_NAME to create a keyname for a combination of
keys.
key3 := KEY_NAME (ASCII (10))
This assignment statement creates the keyname key3 for the line feed
control character.
Related Topics
DEFINE_KEY INT SET(SHIFT_KEY)