Fix arrow keys on macOS

This commit is contained in:
Joe Wilm 2016-08-03 08:20:33 -07:00
parent 8b34df7c02
commit 16ed2ddfe9
1 changed files with 2 additions and 0 deletions

View File

@ -233,6 +233,8 @@ fn main() {
match c {
// Ignore BACKSPACE and DEL. These are handled specially.
'\u{8}' | '\u{7f}' => (),
// OSX arrow keys send invalid characters; ignore.
'\u{f700}' | '\u{f701}' | '\u{f702}' | '\u{f703}' => (),
_ => {
let encoded = c.encode_utf8();
writer.write(encoded.as_slice()).unwrap();