-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python-uinput mouse clicks don't work with libinput #26
Comments
Looks like some of the basic settings are bad From my Xorg log file: [ 303.549] (II) config/udev: Adding input device python-uinput (/dev/input/mouse4) |
Used derekhe/waveshare-7inch-touchscreen-driver#22 to solve min == max error, now it looks like the input driver "uinput" needs to be specified for mouse4 and js1. |
For reference what a "good" log looks like (Ubuntu 16.04) [ 72.640] (II) config/udev: Adding input device python-uinput (/dev/input/mouse4) |
My conclusion here is there's a bug related to the transition from evdev to libinput. I'll file a report over there and keep this issue open in the meantime as documentation of non-functionality. |
I got some help from Peter Hutterer at https://gitlab.freedesktop.org/libinput/libinput/issues/203. It turns out that emitting [(BTN_LEFT, 1), (BTN_LEFT, 0), (SYN)] will not register with libinput as a left mouse click (but the evdev driver will). Updating libsuinput to emit [(BTN_LEFT, 1), (SYN), (BTN_LEFT, 0), (SYN)] will register as a left mouse click. Once the scope of what needs to be updated is determined, I'll start working on a pull request. In the meantime, adding the line |
@Chazzz Thank you so much! Was debugging this for hours, finally stumbled upon this ticket. For reference, I'm running into the same issue with Ubuntu 22.04. |
UPDATE: SEE LATEST COMMENT
I'm not exactly sure what's going wrong, but python-uinput seems to be not outputting mouse commands on my machine (Ubuntu 18.10). Keyboard commands all work,.
I've downloaded master and run python setup.py build/install, so I'll be debugging it on my end, but any suggestions as to causes, solutions, or things to investigate would be greatly appreciated.
MVP:
>>> import uinput
>>> events = (uinput.BTN_LEFT,)
>>> device = uinput.Device(events)
>>> device.emit_click(uinput.BTN_LEFT)
(expect left click, get nothing)
via /proc/bus/input/devices:
II: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="python-uinput"
P: Phys=
S: Sysfs=/devices/virtual/input/input54
U: Uniq=
H: Handlers=event259
B: PROP=0
B: EV=3
B: KEY=10000 0 0 0 0
The text was updated successfully, but these errors were encountered: