use crossterm::event::{KeyCode, KeyEvent, KeyEventKind, KeyEventState, KeyModifiers};
-use std::io::{Read, Error, ErrorKind};
+use std::io::{Error, ErrorKind, Read};
-// Provide graceful degradation limited support mode if reading from stdin that does not
+// Provide graceful degradation limited support mode if reading from stdin that does not
// support terminal features.
//
-// Retrieve a single byte from stdin, does not support full Unicode decoding; only convert
+// Retrieve a single byte from stdin, does not support full Unicode decoding; only convert
// byte to KeyEvent char if it falls within the ASCII subset of UTF-8.
//
// Does not support passing through Ctrl-C as a KeyEvent.
Ok(b) => {
if b.is_ascii() {
Ok(map_ascii_to_keyevent(b as char))
- }
- else {
+ } else {
Err(Error::new(ErrorKind::Unsupported, "not supported input"))
}
}
kind: KeyEventKind::Press,
state: KeyEventState::empty(),
}
-}
\ No newline at end of file
+}