

Description:
LOOKUP_KEY returns information on the first parameter's keyname. The keyword
passed as the second parameter determines the type of information returned. The
optional third parameter is used to specify the key-map or key-map-list to be
searched. Second parameter values and returns are:
Parameter 2 Return
COMMENT Returns the optional name specified by DEFINE_KEY.
KEY_MAP Returns name of the key-map the key is defined in.
PROGRAM Returns the program steps or learn sequence tied to the key. The integer value
0 is returned if the key is not defined.
Syntax:
value := LOOKUP_KEY ( key_name, request )
value := LOOKUP_KEY ( key_name, request, list_or_map_name )
Example:
The following text returns the comment text string specified as the optional
third argument in the DEFINE_KEY builtin for the CTRL_B_KEY definition, included
in the "TPU$KEY_MAP" key-map. The string 'EVE command' is returned to the
comment$text variable.
DEFINE_KEY ("EVE_DOC", CTRL_B_KEY, "EVE Command", "TPU$KEY_MAP");
comment$text := LOOKUP_KEY (CTRL_B_KEY, COMMENT);
Errors:
TPU$_BADKEY Must be COMMENT, KEY_MAP, or PROGRAM.
TPU$_EMPTYKMLIST No key-maps in list.
TPU$_KEYMAPNTFND Invalid key-map-name.
TPU$_NOKEYMAP The string is not a key-map.
TPU$_NOKEYMAPLIST Invalid key-map-list-name.
TPU$_NOTDEFINABLE Undefined key.
LOOKUP_KEY