AppGraphics provides limited support of keyboard interaction. The two main functions, described below, provide information on whether a key has been pressed and, if so, which key was pressed. Functions that normally return an ASCII code based on keypress will also return the following constants for non-alphanumeric keys (after first returning a zero as an indicator of a special key):
C int getch ( )
Fortran function getch ( )
Waits for and returns a keypress. This function normally returns an ASCII code for the key pressed. However, if a special key is pressed, the function will first return zero. The next call will return the code for the special key, as described above.
The ASCII code for the key pressed, a zero, or, if the previous call was zero, a code for the special key pressed.
C int kbhit ( )
Fortran function kbhit ( )
Returns whether a key has been pressed since the last call to getch.
Returns non-zero or .TRUE. if a keypress has occurred, zero or .FALSE. otherwise.