typeahead - control checking for typeahead
#include <curses.h> int typeahead(int fildes);
The typeahead() function controls the detection of typeahead during a refresh, based on the value of fildes:
- If fildes is a valid file descriptor, typeahead is enabled during refresh; Curses periodically checks fildes for input and aborts the refresh if any character is available. (This is the initial setting, and the typeahead file descriptor corresponds to the input file associated with the screen created by initscr() or newterm().) The value of fildes need not be the file descriptor on which the refresh is occurring.
- If fildes is -1, Curses does not check for typeahead during refresh.
Upon successful completion, typeahead() returns OK. Otherwise, it returns ERR.
No errors are defined.
Input Processing , doupdate(), getch(), initscr(), <curses.h>, XBD specification, Parameters that Can be Set .