From f7c8c2b192863162e9d89850e7158563d3426c47 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Tue, 20 Jul 2010 21:57:25 +0000 Subject: also fix the backspace problem --- src/keyboard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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: -- cgit v1.2.3