|
|
|
@ -48,6 +48,9 @@ def write_caps(char):
|
|
|
|
|
write_report(chr(32)+NULL_CHAR+chr(char)+NULL_CHAR*5)
|
|
|
|
|
def write_str(word):
|
|
|
|
|
for letter in word:
|
|
|
|
|
if letter == "~":
|
|
|
|
|
letter = "`"
|
|
|
|
|
write_caps(keycodes.keycodelst[letter])
|
|
|
|
|
if letter == "|":
|
|
|
|
|
letter = "\\"
|
|
|
|
|
write_caps(keycodes.keycodelst[letter])
|
|
|
|
@ -55,9 +58,11 @@ def write_str(word):
|
|
|
|
|
if letter == "!":
|
|
|
|
|
letter = "1"
|
|
|
|
|
write_caps(keycodes.keycodelst[letter])
|
|
|
|
|
continue
|
|
|
|
|
if letter == "*":
|
|
|
|
|
letter = "8"
|
|
|
|
|
write_caps(keycodes.keycodelst[letter])
|
|
|
|
|
continue
|
|
|
|
|
if letter.capitalize() == letter and letter >= 'A' and letter <= 'Z':
|
|
|
|
|
#print(letter.capitalize(), letter)
|
|
|
|
|
write_caps(keycodes.keycodelst[letter])
|
|
|
|
@ -74,6 +79,15 @@ def write_str(word):
|
|
|
|
|
finally:
|
|
|
|
|
write_report(NULL_CHAR*8)
|
|
|
|
|
|
|
|
|
|
def write_special(input):
|
|
|
|
|
#lst = [x for x in input]
|
|
|
|
|
#if lst[0] == "F": # F key requested!
|
|
|
|
|
try:
|
|
|
|
|
write_char(keycodes.keycodelst[input])
|
|
|
|
|
except:
|
|
|
|
|
print("Unsupported keycode! Ask Cole Deck to add support.")
|
|
|
|
|
finally:
|
|
|
|
|
write_report(NULL_CHAR*8)
|
|
|
|
|
|
|
|
|
|
#write_str("root\n")
|
|
|
|
|
#time.sleep(0.5)
|
|
|
|
|