Getting key event in termion


#1

I am learning Rust and I want to port the following code in rustbox to termion.

match self.rb.poll_event(true) {
    Ok(Event::KeyEventRaw(_, key, ch)) => {
        let k = match key {
        0 => char::from_u32(ch).map(Key::Char),
        a => Key::from_special_code(a),
};

I know that I can replace rb.poll_event() by

for evt in self.stdin.events() {
    let ev = evt.unwrap();

But how can I implement Event::KeyEventRaw(_, key, ch) using termion?

Any help will be greatly appreciated.