fn read_kbd_event() -> Option<char> {
    terminal::enable_raw_mode().unwrap();
    let c = std::io::stdin()
        .bytes()
        .next()
        .and_then(|result| result.ok())
        .map(|byte| byte as char);
    terminal::disable_raw_mode().unwrap();
    c
}
// recursively read until we get a keyboard event or we error
recursively read until we get a keyboard event or we error
recursively read until we get a keyboard event or we error
fn read_kbd_event() -> Option<char> {
    terminal::enable_raw_mode().unwrap();
    let c = std::io::stdin()
        .bytes()
        .next()
        .and_then(|result| result.ok())
        .map(|byte| byte as char);
    terminal::disable_raw_mode().unwrap();
    c
}
fn read_kbd_event ( ) -> Option < char > { terminal :: enable_raw_mode ( ) . unwrap ( ) ; let c = std :: io :: stdin ( ) . bytes ( ) . next ( ) . and_then ( | result | result . ok ( ) ) . map ( | byte | byte as char ) ; terminal :: disable_raw_mode ( ) . unwrap ( ) ; c }
recursively read until we get a keyboard event or we error
recursively read until we get a keyboard event or we error