Fix bug in Keys
This commit is contained in:
parent
2335596a1a
commit
7145651a83
|
@ -55,6 +55,8 @@ impl<I: Iterator<Item = Result<char, CharsError>>> Iterator for Keys<I> {
|
||||||
Some(Ok(c)) => Key::Alt(c),
|
Some(Ok(c)) => Key::Alt(c),
|
||||||
Some(Err(_)) | None => Key::Invalid,
|
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('\x7F')) => Some(Key::Backspace),
|
||||||
Some(Ok(c @ '\x01' ... '\x1A')) => Some(Key::Ctrl((c as u8 - 0x1 + b'a') as char)),
|
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)),
|
Some(Ok(c @ '\x1C' ... '\x1F')) => Some(Key::Ctrl((c as u8 - 0x1C + b'4') as char)),
|
||||||
|
|
Loading…
Reference in New Issue