summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-12-15 16:40:41 +0100
committermathieui <mathieui@mathieui.net>2012-12-15 16:40:41 +0100
commit4fe00ed0693340b4b76b563f6015120de25e2fe6 (patch)
tree98992f52dcfdadcc60389b2f698f263c073e460a
parent0190f9b017b93c108fd2d83653f1751871cc8c25 (diff)
downloadpoezio-4fe00ed0693340b4b76b563f6015120de25e2fe6.tar.gz
poezio-4fe00ed0693340b4b76b563f6015120de25e2fe6.tar.bz2
poezio-4fe00ed0693340b4b76b563f6015120de25e2fe6.tar.xz
poezio-4fe00ed0693340b4b76b563f6015120de25e2fe6.zip
Fix the '^?' characters appearing
-rw-r--r--src/keyboard.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/keyboard.py b/src/keyboard.py
index 71bdd0d1..2ad47e4b 100644
--- a/src/keyboard.py
+++ b/src/keyboard.py
@@ -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):