READ_KEY
Waits for you to press a key and then returns the keyword for that key.
The key is not echoed on the terminal screen. Use READ_KEY instead of
READ_CHAR when you are entering escape sequences, control codes, or
other non-text characters. READ_KEY processes escape sequences and the
DECTPU SHIFT_KEY.
Syntax
keyword := READ_KEY
Examples
1. my_key := READ_KEY;
Stores in the variable MY_KEY the keyword for the next key entered.
2. The following procedure sets the SHIFT_KEY to the last (or current)
key, reads the next key, and returns the keyname for the shifted
key:
PROCEDURE user_get_shift_key
! Keyword for key pressed after shift key
LOCAL key_to_shift;
SET (SHIFT_KEY, LAST_KEY);
key_to_shift := KEY_NAME (READ_KEY, SHIFT_KEY);
RETURN (key_to_shift);
ENDPROCEDURE;
Related topics
DEFINE_KEY KEY_NAME LAST_KEY LOOKUP_KEY READ_CHAR SHIFT_KEY