Fix the '^?' characters appearing

This commit is contained in:
mathieui 2012-12-15 16:40:41 +01:00
parent 0190f9b017
commit 4fe00ed069

View file

@ -115,7 +115,11 @@ def get_char_list_new(s):
pass
else:
key = '%s-%s' % (key, part)
ret_list.append('^M' if key == '\r' else key)
if key == '\x7f':
key = '^?'
elif key == '\r':
key = '^M'
ret_list.append(key)
class Keyboard(object):
def __init__(self):