Module Down_std.Stdin

Setup standard input for tty interaction.

Note. When the module is loaded an at_exit handler is installed to make sure set_raw_mode false is called at the end of the program.

Raw mode and character input

val set_raw_mode : bool -> bool

set_raw_mode raw sets stdin raw mode according to raw returns false if the operation fails.

val readc : unit -> int option

readc () reads a single byte from stdin. This is a blocking read. None is returned in case the operation failed for some reason.