How to bind tablet / stylus buttons under Wayland?

I have a Wacom tablet that works quite well, but I’d like to be able to map the buttons to mouse buttons. As far as I can tell, I can only set them to keyboard bindings. In fact, the same seems to be the case for mouse buttons.

I would like to be able to map certain buttons on the stylus and/or trackpad to left or right mouse button presses, so I could use it as an actual pointing device. Is this something that would be extremely hard to do? Is it possible but just not through the System Settings GUI? I assume this’d share some code or logic with remapping mouse buttons, for example when people would want to swap left and right to use a mouse with their left hand.

Edit: I think this is at least tangentially related to this thread.

If you’re using X11, I believe this can be done in the Wacom Tablet settings. If you’re on Wayland you don’t have a lot of options (maybe someone here can mention a workaround).

However, we’re working towards support for that which is tracked here: 469232 – Ability to bind mouse click types (left-click, right-click, etc) to drawing tablet pen buttons (it mentions pen buttons, but the same feature can be applied to tablet buttons as well)

1 Like

Ah, that looks like exactly what I meant, so at least it’s on the radar. Thanks for the link, I’ll keep an eye on it!