Fix the '^?' characters appearing
This commit is contained in:
parent
0190f9b017
commit
4fe00ed069
1 changed files with 5 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue