Fixed key parsing to ensure the correct keys are found

This commit is contained in:
dbisu
2021-09-18 15:36:04 -05:00
parent 934b26c91d
commit 269612753a

View File

@@ -26,12 +26,16 @@ Keycode.F1, Keycode.F2, Keycode.F3, Keycode.F4, Keycode.F5, Keycode.F6, Keycode.
Keycode.F10, Keycode.F11, Keycode.F12]
def convertLine(line):
keys = line.split(" ")
newline = []
print(line)
# print("keys ", keys)
for k in keys:
for j in range(len(keycodeCommands)):
if line.find(duckyCommands[j]) != -1:
if k == (duckyCommands[j]):
newline.append(keycodeCommands[j])
print(newline)
# print("keys commands",newline)
return newline
def runScriptLine(line):