We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ceb5c7 commit 385fc44Copy full SHA for 385fc44
src/read.rs
@@ -112,7 +112,7 @@ pub mod windows {
112
disable_line_buffering().unwrap();
113
if std::io::stdin().read(&mut buffer).is_ok() {
114
enable_line_buffering().unwrap();
115
- match buffer[0] {
+ match buffer {
116
[13, 0, 0] => Some(Key::Enter),
117
[9, 0, 0] => Some(Key::Tab),
118
[8, 0, 0] => Some(Key::Backspace),
@@ -121,7 +121,7 @@ pub mod windows {
121
[0, 0, 80] => Some(Key::ArrowDown),
122
[0, 0, 77] => Some(Key::ArrowRight),
123
[0, 0, 75] => Some(Key::ArrowLeft),
124
- c => Some(Key::Char(c as char)),
+ [c, _, _] => Some(Key::Char(c as char)),
125
}
126
} else {
127
None
0 commit comments