From 7145651a83fa85b8577baa559343a44d11387d5d Mon Sep 17 00:00:00 2001 From: Ticki Date: Thu, 10 Mar 2016 21:57:42 +0100 Subject: [PATCH] Fix bug in Keys --- src/input.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/input.rs b/src/input.rs index 576e2bf..b5cd91a 100644 --- a/src/input.rs +++ b/src/input.rs @@ -55,6 +55,8 @@ impl>> Iterator for Keys { Some(Ok(c)) => Key::Alt(c), Some(Err(_)) | None => Key::Invalid, }), + Some(Ok('\n')) | Some(Ok('\r')) => Some(Key::Char('\n')), + Some(Ok('\t')) => Some(Key::Char('\t')), Some(Ok('\x7F')) => Some(Key::Backspace), Some(Ok(c @ '\x01' ... '\x1A')) => Some(Key::Ctrl((c as u8 - 0x1 + b'a') as char)), Some(Ok(c @ '\x1C' ... '\x1F')) => Some(Key::Ctrl((c as u8 - 0x1C + b'4') as char)),