GetKeys
You can use theGetKeysprocedure to obtain the current state of the keyboard.
PROCEDURE GetKeys (VAR theKeys: KeyMap);
- theKeys
 - Returns the current state of the keyboard, including the keypad, if any. The
 GetKeysprocedure returns this information using theKeyMapdata type.TYPE KeyMap = PACKED ARRAY[0..127] OF Boolean;- Each key on the keyboard or keypad corresponds to an element in the
 KeyMaparray. The index for a particular key is the same as the key's virtual key code minus 1. For example, the key with virtual key code 38 (the "J" key on the Apple Keyboard II) can be accessed asKeyMap[37]in the returned array. AKeyMapelement isTRUEif the corresponding key is down andFALSEif it isn't. The maximum number of keys that can be down simultaneously is two character keys plus any combination of the five modifier keys.DESCRIPTION
You can use theGetKeysprocedure to determine the current state of the keyboard at any time. For example, you can determine whether one of the modifier keys is down by itself or in combination with another key using theGetKeysprocedure.