Hi i’m trying to control emulationstation using python as keyboard. I have this code
from evdev import uinput, ecodes as e
def buttonEventHandler ():
with uinput.UInput() as ui:
ui.write(e.EV_KEY, e.KEY_UP, 1)
ui.write(e.EV_KEY, e.KEY_SPACE, 0)
It works only if i first plug a real keyboard then i can disconnect the keyboard and the script starts working and i can see emulationstation reacting when i send the keys from the script. How can i make it working without plug a keyboard first?
I also tried with a modified version of retrogame but nothing