wayland: several mouse buttons are detected wrong
Not sure it is mpv bug or wayland or xkbcommon, but using mouse with mpv in weston-1.2.0 does not work fine. I have these lines in /etc/mpv/input.conf:
MOUSE_BTN0 cycle pause
MOUSE_BTN0_DBL ignore
MOUSE_BTN1 quit
MOUSE_BTN2 cycle fullscreen
MOUSE_BTN3 cycle sub
MOUSE_BTN4 cycle audio
MOUSE_BTN7 add volume -1
MOUSE_BTN8 add volume 1
With X11 config works fine, but with wayland many buttons do wrong commands:
MOUSE_BTN0 cycle pause
MOUSE_BTN0_DBL ignore
MOUSE_BTN1 cycle fullscreen
MOUSE_BTN2 quit
MOUSE_BTN3 cycle sub
MOUSE_BTN4 cycle audio
MOUSE_BTN7 cycle sub
MOUSE_BTN8 cycle audio
Can you post the output of mpv when you run it with the following environment variable set?
WAYLAND_DEBUG=1
The file will probably be very big so don't run mpv too long.
Here it is http://bpaste.net/raw/115061/
Started mpv and pressed right mouse button.
Sorry I can't reproduce this behavior. Have you tried it with a different mouse with less buttons? Because it looks like 2 buttons are switched and the other 2 buttons do the same thing.
Also could you please post a log where you press every mouse button and post your mouse model.
Same problem with "normal" (2 buttons+wheel = 5 buttons) mouse.
log was provided to you in irc.
Sorry I can't find the WAYLAND_DEBUG log in my irc logs. Could you please post a link here. The problem is that I am always online but not always on my personal computer.
http://bpaste.net/raw/115061/
I mean a log where you press every button on the mouse plus mouse wheel.
http://bpaste.net/raw/117049/
Thank you, could you also please post the output of the following line, just in case.
grep BTN_LEFT /usr/include/linux/input.h
I guess the first button you pressed was the left mouse button, then right and as last you pressed mousewheel? The only strange thing I noticed is that there is no left putton release event sent
$ grep BTN_LEFT /usr/include/linux/input.h
#define BTN_LEFT 0x110
I pressed left button, right button, rotated wheel both directions, pressed 2 additional buttons, pressed wheel.
Current State: BTN3 and BTN4 are hardcoded for mouse axis events (mouse wheel), which is bad imo.
A suitable solution would be to add new input identifiers like AXIS_LEFT/UP/DOWN/RIGHT and while we're at it we should also add a scale factor to the properties which take numerals. This would make it possible to use precise seeking through precise scrolling of input devices that support such a hardware feature.
This is fixed f364a1e3dfb78239985b3068e079544bbff6d66f . But now you have to add AXIS_UP/DOWN events in your input.conf file and assign it the same function as BTN3/BTN4. Sadly now it behaves differently than the other backends.