Skip to content

Commit 0567bdc

Browse files
authored
Return Key::Tab instead of \t on windows (#182)
1 parent 51425fc commit 0567bdc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/windows_term/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ pub fn read_single_key() -> io::Result<Key> {
390390
// a special keycode for `Enter`, while ReadConsoleInputW() prefers to use '\r'.
391391
if c == '\r' {
392392
Ok(Key::Enter)
393+
} else if c == '\t' {
394+
Ok(Key::Tab)
393395
} else if c == '\x08' {
394396
Ok(Key::Backspace)
395397
} else if c == '\x1B' {

0 commit comments

Comments
 (0)