Open MostHated opened 4 years ago
Apparently I had to get a bit more explicit with it:
if len(split2) == 2:
hotkey(str(split2[0]), str(split2[1]))
if len(split2) == 3:
hotkey(str(split2[0]), str(split2[1]), str(split2[2]))
else:
hotkey(str(split2))
It throws you off a bit, because the example explination says "pass a list"
But it seems that you can't literally pass a list of keys?
Thanks, -MH
Hey there, I am testing on Windows 10, I am attempting to take a list and send it into the press() function. The receiving application can show was keys were received, and it is showing that Shift + S was sent and not Alt + S.
Here is what I was using, it is a PySide2 Tree widget getting clicked and sending the contents of a particular column when it is double-clicked, which contains text delimited by a space, but combined as a hotkey combination with a +, such as "Shift+S Alt+S" or "Ctrl+Alt+S Alt+S" or simply "S". I am taking whatever the first hotkey combination is and sending it to the parent widget as a keypress combination. I was trying to use the hotkey() function first, but the parent never received anything, so I tried using the press() function, which did get received, but it was received wrong.
Thanks, -MH