Functions | |
int | getch (void) |
int | getche (void) |
int | kbhit (void) |
int | aaio_hard_reset (void) |
int | aaio_reset (void) |
int | aaio_grant_tty_lock (void) |
int | aaio_flush (void) |
Many people moving from Windows programming to UNIX program have problems with the missing non-blocking getch() and getche() functions provided by conio.h. This library provides the functionality of getch(), getche() and kbhit(). It does not require an initialization (like curses) and does not abuse the terminal (i.e. whenever the mode of the terminal is changed its state is stored so it can be restored). For increased efficiency there exists funcionality to allow abuse of the terminal as well as functions to restore or reset the terminal when the application exits.
|
Flush any remaining characters from the stdandard input |
|
Allow the aaio functions (getch, getche and kbhit) to "abuse" the terminal (i.e. change the terminal settings without resetting them. This gives a boost to performance that can be usefull in some cases. Most often, however, it is not necessary or recomended to grant the tty lock to aaio. If the lock has been granted aaio_reset must be called before program exit to reset the terminal to its original state.
|
|
Perform a hard reset of the terminal to cause it to go back to its original state.
|
|
Reset the terminal to the state it was in when aaio_grant_tty_lock was called.
|
|
Get a character from stdin. Block until a character is available but does not wait for a new line. Characters are not echoed on to screen.
|
|
Get a character from stdin. Block until a character is available but does not wait for a new line. Characters are echoed on to screen.
|
|
Get the number of characters available on stdin.
|