FGL_GETKEY()

Waits for a keystroke and returns the key number.

Syntax

FGL_GETKEY()
  RETURNING keynum INTEGER
  1. keynum is the integer key code of the pressed key.

Usage

FGL_GETKEY() waits for a keystroke and returns the key code corresponding to the pressed physical key.

This function should only be used in text mode.

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 key code of the physical key that the user pressed. The FGL_GETKEY() function recognizes the same codes for keys that the FGL_KEYVAL() function returns. Unlike FGL_KEYVAL(), which can only return keystrokes that are entered during dialogs, FGL_GETKEY() can be called outside a dialog context.