use ESC to quit

master
Cole Deck 4 years ago
parent 65678cdc1b
commit b9d5fa0e13

@ -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 != "[":

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

Loading…
Cancel
Save