summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/keyboard.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/keyboard.py b/src/keyboard.py
index 2f27968e..4c677e79 100644
--- a/src/keyboard.py
+++ b/src/keyboard.py
@@ -44,7 +44,9 @@ def read_char(s):
(first, char) = get_next_byte(s)
if first == None: # Keyboard special, like KEY_HOME etc
return char
- if first <= 127: # ASCII char on one byte
+ if first == 127 or first == 8:
+ return "KEY_BACKSPACE"
+ if first < 127: # ASCII char on one byte
if first <= 26: # transform Ctrl+* keys
char = "^"+chr(first + 64)
if first == 27: