@READ_KEYSTROKE reads a keystroke entered from the keyboard. The keystroke is not echoed in the window. The keystroke may be any standard alphanumeric character, any keypad or function key, or one of the cursor control keys. The specified window must be pasted to use this system function.
This function returns an integer keycode for the keystroke entered from the keyboard. A special keycode is returned when a keystroke is not entered before the specified timeout limit. See the section called "Terminal Key Codes" for a complete list of key codes.
@READ_KEYSTROKE (window_id timeout_value)
window_id |
is an integer system field, Global Storage (GS) field, or user-defined field that contains the window ID assigned to the window. |
timeout_value |
specifies the maximum number of elapsed seconds to wait for a keystroke to be entered from the keyboard. If a zero timeout value is specified, @READ_KEYSTROKE waits indefinitely for a keystroke to be entered. |
IF:10 (@READ_KEYSTROKE(HELP_ID 30) EQ @ASC 'N' 509)
...
CONTINUE:10This example illustrates how to retrieve a response for additional help. If a response is not made within 30 seconds, a keycode of 509 is returned and we assume the response was no. This example can determine if the answer is YES, NO, or no response at all.