We are using evdev in a project, and while we tested Ubuntu 23, we notice that. UInput is not working at all when is running Wayland. using X11 works correctly
SO: Ubuntu 23.04
kernel: Linux ubuntu2304 6.2.0-35-generic
from evdev import UInput, ecodes as e
import time
ui = UInput(name='uinput-sample', vendor=0x1, product=0x1, version=1)
# we tried this also
# ui = UInput()
time.sleep(2)
print("Simulating key press and release...")
ui.write(e.EV_KEY, e.KEY_A, 1)
ui.syn()
ui.write(e.EV_KEY, e.KEY_A, 0)
ui.syn()
time.sleep(2)
ui.close()
We are using evdev in a project, and while we tested Ubuntu 23, we notice that. UInput is not working at all when is running Wayland. using X11 works correctly
SO: Ubuntu 23.04 kernel: Linux ubuntu2304 6.2.0-35-generic
This is the image we are using https://www.linuxvmimages.com/images/ubuntu-2304/
Here's a sample script that we tried
We also tested the following C script