Skip to content

Commit

Permalink
Return Key::Tab instead of \t on windows (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon01 committed Aug 30, 2023
1 parent 51425fc commit 0567bdc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/windows_term/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ pub fn read_single_key() -> io::Result<Key> {
// a special keycode for `Enter`, while ReadConsoleInputW() prefers to use '\r'.
if c == '\r' {
Ok(Key::Enter)
} else if c == '\t' {
Ok(Key::Tab)
} else if c == '\x08' {
Ok(Key::Backspace)
} else if c == '\x1B' {
Expand Down

0 comments on commit 0567bdc

Please sign in to comment.