also fix the backspace problem

This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2010-07-20 21:57:25 +00:00
parent 2c1a05a153
commit f7c8c2b192

View file

@ -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: