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.