I am trying to implement a command line editing library in Rust.
To handle the ESC key properly, I need to wait for the rest of an escape sequence that may never arrive.
Currently, I am using:
let stdin = io::stdin();
let mut chars = stdin.lock().chars();
let mut ch = try!(chars.next().unwrap());
but there seems to be no way to specify a timeout. Should I try to mix Rust IO with the poll function?