diff --git a/__pycache__/keycodes.cpython-37.pyc b/__pycache__/keycodes.cpython-37.pyc index 9ac577c..f67676f 100644 Binary files a/__pycache__/keycodes.cpython-37.pyc and b/__pycache__/keycodes.cpython-37.pyc differ diff --git a/input.py b/input.py index 3e66ce3..debd9f5 100755 --- a/input.py +++ b/input.py @@ -8,8 +8,8 @@ get = _Getch(); while True: input_key = get() print(input_key + ": " + str(ord(input_key))) - if input_key == "?": - break + #if input_key == "?": + # break if ord(input_key) == 127: write_special("BACKSPACE_DELETE") continue @@ -19,7 +19,11 @@ while True: if ord(input_key) == 27: print("Special key detected!") key = [x for x in "ABCDE7890134~2"] - if get() == "[": + input_key = get() + #print(ord(input_key)) + if ord(input_key) == 27: + break + if input_key == "[": again = False input_key = get() if input_key != "[": diff --git a/keycodes.py b/keycodes.py index 6035db3..5c2fa85 100644 --- a/keycodes.py +++ b/keycodes.py @@ -96,5 +96,6 @@ keycodelst["["] = 0x2f keycodelst["-"] = 0x2d keycodelst["]"] = 0x30 keycodelst["."] = 0x37 -keycodelst["\'"] = 0x31 # This exists, but we use keycodelst["4 instead. +#keycodelst["\'"] = 0x31 # This exists, but we use keycodelst["4 instead. keycodelst["`"] = 0x35 +keycodelst["\'"] = 0x34