GK API
Revised Date: 05/05/2022
Example 1:
MOVE "GK" TO SCREEN-PARAMETERS.
PERFORM SCREEN-ROUTINE.
IF ABORT-KEY-PRESSED
This API allows the programmer to determine whether or not certain keystrokes have been pressed.
Screen-Parameters:
GK,nn nn provides different functionality as follows:
GK Wait for the next keystroke and return to the calling program (used mostly
for processing through a list of records in an OL window).
GK,95 Wait for the next keystroke, but if none is pressed in a specified number of
seconds, return the specified default function key value
SCREEN-NUMERIC-FIELD = Number of seconds before timing out
FUNCTION-KEY-VALUE = the default function key value
GK,97 (Version 8.6 and higher) Check for Ctrl+Shft+D (view I/O history), called
by BEXTFH after each 10th I/O operation -- useful to helping to detect I/O looping.
GK,98 Used in a few special cases to avoid screen flashing.
GK,99 Same as plain GK call, except returns immediately if no keystroke has been
pressed (used during report printing).
Return Value:
Screen-Function The appropriate keystroke setting.
Screen-Function The appropriate keystroke setting.
Example 1:
MOVE "GK" TO SCREEN-PARAMETERS.
PERFORM SCREEN-ROUTINE.
IF ABORT-KEY-PRESSED
...
Example 2:
A new paragraph has been added to GETKEY.PL, to facilitate using the timeout functionality.
A new paragraph has been added to GETKEY.PL, to facilitate using the timeout functionality.
MOVE 10 TO SCREEN-NUMERIC-FIELD.
MOVE "27" TO FUNCTION-KEY-VALUE.
PERFORM GET-FUNCTION-KEY-WITH-TIMEOUT.
PERFORM GET-FUNCTION-KEY-WITH-TIMEOUT.
JEG