[−][src]Function winconsole::console::getch
pub fn getch(suppress: bool) -> WinResult<char>
Reads a single character from the input buffer. Note that this will wait for input from the user, and will only accept certain characters; this will not return from a control key press event.
Arguments
suppress
- Should the character be returned without printing?
Examples
Gets a character and prints it to the console.
console::getch(false).unwrap();
Errors
InvalidHandleError
: Returned if an invalid handle to the console input/output is retrieved or used.IoError
: Returned if an IO or OS error occurs.