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 enable_bracketed_paste : Stdlib.out_channel -> unit

enable_bracketed_paste oc enables bracketed paste mode on oc. This is disabled at exit on the same channel via an at_exit handler.

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.