getch-rs 0.2.0

`getch` for Windows and Unix.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate getch_rs;
use getch_rs::{Getch, Key};

fn main() {
    let g = Getch::new();

    println!("press `q` to exit");

    loop {
        match g.getch() {
            Ok(Key::Char('q')) => break,
            Ok(key) => println!("{:?}", key),
            Err(e) => println!("{}", e),
        }
    }
}