Skip to content

Commit

Permalink
windows actually uses \x08 for BACKSPACE
Browse files Browse the repository at this point in the history
closes #57
  • Loading branch information
Cube707 committed Jul 24, 2022
1 parent a7c0645 commit f0af43d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readchar/readchar.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def readkey(getchar_fn=None):
return xlate_dict[b]
except KeyError:
return None
elif a == 8:
return key.BACKSPACE
else:
return ch.decode()

Expand Down
1 change: 1 addition & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
readchar.key.F10: "F10",
readchar.key.F12: "F12",
readchar.key.ALT_A: "ALT_A",
readchar.key.BACKSPACE: "BACKSPACE",
}

while True:
Expand Down

0 comments on commit f0af43d

Please sign in to comment.