KEY_NAME Returns a DECTPU keyword for a key or a combination of keys. Syntax keyword_variable := KEY_NAME ({string | keyword1 | integer} [, SHIFT_KEY |, SHIFT_MODIFIED |, ALT_MODIFIED |, CTRL_MODIFIED |, HELP_MODIFIED [, ...]] [, 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 DECTPU 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 DECTPU 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 DECTPU keyname. SHIFT_KEY A keyword indicating that the returned keyword is preceded by one or more shift keys. SHIFT_KEY refers to the DECTPU shift key (PF1 by default), not the SHIFT key on the keyboard. SHIFT_MODIFIED A keyword specifying that the key name created by the built-in includes the key marked SHIFT on the keyboard. (The keyword SHIFT_MODIFIED specifies the key that toggles between uppercase and lowercase.) SHIFT_MODIFIED only modifies function keys and keypad keys. ALT_MODIFIED A keyword specifying that the key name created by the built-in includes the ALT key. Note that on most DIGITAL keyboards the ALT key is labeled COMPOSE CHARACTER. ALT_MODIFIED only modifies function keys and keypad keys. CTRL_MODIFIED A keyword specifying that the key name created by the built-in includes the CTRL key. CTRL_MODIFIED only modifies function keys and keypad keys. HELP_MODIFIED A keyword specifying that the key name created by the built-in includes the HELP key. HELP_MODIFIED only modifies function keys and keypad keys. 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 DECTPU keynames, see the DECTPU 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. new_key := KEY_NAME (KP4, CTRL_MODIFIED, SHIFT_KEY) This assignment statement creates a name for the key sequence GOLD/CTRL/KP4. Related Topics DEFINE_KEY INT SET(SHIFT_KEY)