You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm trying to translate keyboard keys to joystick movements on an emulator screen (BlueStacks) on my Mac Catalina.
What I'm trying to achieve is to keep the movement until the key is released so I decided to create a loop to repeat the movement until the key is released. However, the loop is blocking the Thread so I can't accomplish that easily. I tried then to create 2 Threads, 1 for on_press events and another for on_release events but that don't work either since I always get AttributeErrors from the objc for any key I press.
Disclaimer: I tried to use pyinput for mouse events but I couldn't make it work on my Mac, even allowing my terminal and IDE on Accessibility (couldn't auth Python) and running with sudo so I'm using ADB.
The text was updated successfully, but these errors were encountered:
and then just update the global state from the callback? The thread body would be a simple while STATE != State.Quit-loop.
And your problems with mouse events seem strange, since keyboard events require even more privileges. Do you have a stack trace or other information? Or do you simply not receive any events?
Hi! I'm trying to translate keyboard keys to joystick movements on an emulator screen (BlueStacks) on my Mac Catalina.
What I'm trying to achieve is to keep the movement until the key is released so I decided to create a loop to repeat the movement until the key is released. However, the loop is blocking the Thread so I can't accomplish that easily. I tried then to create 2 Threads, 1 for
on_press
events and another foron_release
events but that don't work either since I always getAttributeError
s from theobjc
for any key I press.Part of my code:
Thanks for any help and directions =)
Disclaimer: I tried to use
pyinput
for mouse events but I couldn't make it work on my Mac, even allowing my terminal and IDE on Accessibility (couldn't auth Python) and running withsudo
so I'm using ADB.The text was updated successfully, but these errors were encountered: