pub fn typeahead<FD: AsRawFd + Read>(
    file: Option<FD>
) -> Result<(), NCurseswError>
Expand description

Specify that the file descriptor file be used for typeahead checking. If file is None, then no typeahead checking is done.

The NCurses library does “line-breakout optimization” by looking for typeahead periodically while updating the screen. If input is found, and it is coming from a tty, the current update is postponed until refresh or doupdate is called again, allowing faster response to commands typed in advance. This function allows specifying a different file descriptor for typeahead checking.