Created attachment 162351 [details] sudo libinput record Plasma 6 git master, Wayland, 200% scale. My 2-in-1 laptop has a garaged pen with two buttons. The button farther from the tip middle-clicks when pressed. The button closest to the tip does nothing when pressed, but it should do a right-click. I tested in the following apps: - Dolphin - Kate - Gedit - Firefox - Discord - Plasma So it seems like a general input handling issue, rather than a bug in specific apps or toolkits. I'm attaching a log from `sudo libinput record`.
Cannot reproduce with my Wacom tablet and any of the listed apps. The behavior for which of the two buttons on the stylus is inconsistent between apps, but that's up to the app to decide
Results of some testing today on Plasma 6 Wayland and X11: All Qt apps tested, both Wayland and X11 ======================================== - tip left-clicks everything - first button does nothing - second button middle-clicks GTK apps ======== GIMP on Wayland and X11: - tip left-clicks everything - first button does nothing - second button middle-clicks Gedit on Wayland: - tip left-clicks on some UI elements, does nothing for others (e.g. menu items in popup menus) - first button does nothing - second button right-clicks Gedit on X11: - tip left-clicks everything - first button does nothing - second button middle-clicks GNOME Text Editor on Wayland - tip left-clicks everything - first button does nothing - second button right-clicks GNOME Text Editor on X11 - tip left-clicks everything - first button does nothing - second button middle-clicks Firefox on Wayland: - tip left-clicks everything - first button does nothing - second button right-clicks Firefox on X11 - tip left-clicks everything - first button does nothing - second button does nothing
I am not in expert in this so take the following with some caveats. I have tested this with a Pen with two buttons: They generate BTN_STYLUS and BTN_STYLUS2. These are mapped everywhere to middle and right click respectively and that what I see on Plasma. I've checked QtWayland, GTK, X11 evdev, wacom and libinput drivers, as well as Xwayland. So I am confused a bit that you are seeing different behavior between X11 and Wayland and sometimes different buttons ,did you configure the x driver somehow? In your log I see no actual button press but BTN_TOOL_PEN and BTN_TOOL_RUBBER, I think your first button actually switches the "tool" that your pen represents from pen to eraser instead of being a button button. That's why it doesn't do anything in any app.
So you're saying my pen is being a bit special? 😅 Maybe what we need is a way to re-map pen buttons not just to keyboard shortcuts, but mouse buttons. That's tracked by 469232 already. Another issue is that when my pen enters this eraser mode, there's no cursor change to signal this so that I know it's not just broken. Let's use the bug report to track that.
Please don't recycle bug reports for something different than originally reported. Bugreport ids aren't scarce, we can afford a new one, and it makes things confusing for future readers
Ok
See Bug 481737 and Bug 481738.
> So you're saying my pen is being a bit special? I think its common-ish