mirror of
https://github.com/dbisu/pico-ducky.git
synced 2025-12-08 21:34:58 +00:00
Fixed key parsing to ensure the correct keys are found
This commit is contained in:
@@ -26,12 +26,16 @@ Keycode.F1, Keycode.F2, Keycode.F3, Keycode.F4, Keycode.F5, Keycode.F6, Keycode.
|
|||||||
Keycode.F10, Keycode.F11, Keycode.F12]
|
Keycode.F10, Keycode.F11, Keycode.F12]
|
||||||
|
|
||||||
def convertLine(line):
|
def convertLine(line):
|
||||||
|
keys = line.split(" ")
|
||||||
newline = []
|
newline = []
|
||||||
print(line)
|
# print("keys ", keys)
|
||||||
|
|
||||||
|
for k in keys:
|
||||||
for j in range(len(keycodeCommands)):
|
for j in range(len(keycodeCommands)):
|
||||||
if line.find(duckyCommands[j]) != -1:
|
if k == (duckyCommands[j]):
|
||||||
newline.append(keycodeCommands[j])
|
newline.append(keycodeCommands[j])
|
||||||
print(newline)
|
|
||||||
|
# print("keys commands",newline)
|
||||||
return newline
|
return newline
|
||||||
|
|
||||||
def runScriptLine(line):
|
def runScriptLine(line):
|
||||||
|
|||||||
Reference in New Issue
Block a user