fgl_getkey()

fgl_getkey() waits for a key to be pressed and returns the integer code of the keystroke that the user makes.  The function can take an optional argument, which is an INTEGER value for a timeout period, measured in seconds.

Description: FGL_GETKEY()%20function

If the timeout is specified, then the function will return the INTEGER value of the keypress made within the timeout period.  If no keypress is made within the timeout period, the function will return 431.

Every 4gl program must include some user interactions.

If your 4gl program doesn't have any user interactions, it will be performed at runtime and close immediately - without visible actions (like opening windows or forms, etc.) except for console displays.

Unlike fgl_lastkey(), which can return a value indicating the logical effect of whatever key the user pressed, fgl_getkey() returns an integer  representing the raw value of the keystroke that the user makes.

fgl_getkey() recognizes the same codes for keys that the fgl_keyval( ) function returns.  Unlike fgl_keyval(), which can only return keystrokes that are entered in 4GL forms, fgl_getkey() can be invoked in any context where the user is providing keyboard entry.

 

Here is an example of a program fragment that calls both functions, so that fgl_keyval() evaluates what fgl_getkey() returns.

In the code example shown above "key" refers to a key on the keyboard or the effect that keystroke has, rather than the SQL construct called KEY.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.