Library /sys$common/syshlp/TPUHELP.HLB  —  LOOKUP_KEY
  LOOKUP_KEY

  Returns the executable code or the comment associated with a specified
  key.  The code can be returned as a program or learn sequence; the comment
  is returned as a string.

  Syntax

     variable := LOOKUP_KEY (keyname, {PROGRAM | COMMENT | KEY_MAP}
                 [,string])

  Parameters

     keyname    Specifies the key (or key combination) you want to find out
                about.  (See help on KEYNAMES TABLE.)

     PROGRAM    Specifies that either a program or a learn sequence will be
                returned if the key was defined.  If the key was not
                defined, zero is returned.

     COMMENT    Specifies that the comment string will be returned.  If no
                comment was given, a null string is returned.

     KEY_MAP    Specifies that the string given for the key map when the key
                was defined with DEFINE_KEY is returned.

     string     An optional string that causes the procedure to return the
                requested information from the specified key map, or from
                the first definition for the key in the specified key-map
                list.  If neither a key map nor a key-map list is specified,
                the first definition in the key-map list bound to the
                current buffer is returned.

  Example

  1.  programx := LOOKUP_KEY (key1, PROGRAM);

      Returns the executable code that is associated with KEY1.  The keyword
      PROGRAM indicates that the result will be returned in a program or a
      learn data type.

  2.  MESSAGE (LOOKUP_KEY (LAST_KEY, COMMENT));

      Displays in the message area the comment that you included with your
      key definition for the last key that you typed.

  Related topics

     DEFINE_KEY   LAST_KEY   KEY_NAME   Keynames Table   READ_KEY
Close Help