- AppGraphics Documentation
- Getting Started with AppGraphics
- Window Management
- Colors and Patterns
- Mouse Interactions
- Keyboard Interaction
- Graphics Shapes and Primitives
- Text Output
- Graphic Viewports
- Windows Controls
- Common Dialogs
- Clipboard Operations
- Threads, Thread Safety, and Idling
- AppGraphics License Agreement
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.