Bug 462570

Summary: can't rebind buttons on xp-pen drawing tablet
Product: [Applications] systemsettings Reporter: Mariusz Libera <mariusz.libera>
Component: kcm_tabletAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: aleixpol, josh, nate
Priority: NOR    
Version First Reported In: master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: pentablet
pentablet-mouse
pentablet-keyboard
screenshot of kcm tablet
screenshot of xp-pen driver keys
screenshot of xp-pen driver pen

Description Mariusz Libera 2022-12-03 00:42:30 UTC
Created attachment 154248 [details]
pentablet

I have xp-pen deco mini7 tablet with 8 buttons and a pen with 2. The tablet page in system settings shows 3 buttons available to rebind. Of those three, the first one rebinds one of the buttons on the pen, the other 2 don't seem to have any effect.

In evdev the tablet appears as 3 devices:
1. /dev/input/event7:      UGTABLET 6 inch PenTablet Mouse
2. /dev/input/event8:      UGTABLET 6 inch PenTablet Keyboard
3. /dev/input/event9:      UGTABLET 6 inch PenTablet

On the system settings page it appears as 'UGTABLET 6 inch PenTablet'.

 It's not a hardware issue, all of the buttons work out of the box with predefined bindings, and are detected by evdev-record and libinput debug-events. Buttons on the tablet come from /dev/input/event8 and the ones on the pen from /dev/input/event9, I think.

 I can rebind all of the buttons using the official xp-pen app/driver - but if I run that app the buttons only work in Krita and seem to become inactive elsewhere. The other drawback of using the official app is that mapping of screens becomes all messed up, because it seems to conflicts with kde (on wayland, on x11 it works fine).
If I use the official xp-pen app/driver 3 additional devices are created:
1. /dev/input/event30:     XP-PEN STYLUS
2. /dev/input/event31:     XP-PEN MOUSE
3. /dev/input/event256:    XP-PEN ERASER

kde built using kdesrc-build
evemu-describe outputs in attachments
Comment 1 Mariusz Libera 2022-12-03 00:43:21 UTC
Created attachment 154249 [details]
pentablet-mouse
Comment 2 Mariusz Libera 2022-12-03 00:43:45 UTC
Created attachment 154250 [details]
pentablet-keyboard
Comment 3 Mariusz Libera 2022-12-03 00:45:06 UTC
Created attachment 154251 [details]
screenshot of kcm tablet
Comment 4 Mariusz Libera 2022-12-03 00:48:06 UTC
Created attachment 154252 [details]
screenshot of xp-pen driver keys
Comment 5 Mariusz Libera 2022-12-03 00:49:21 UTC
Created attachment 154254 [details]
screenshot of xp-pen driver pen
Comment 6 Joshua Goins 2024-01-11 23:22:48 UTC
Unfortunately this is nothing we can fix, you need to report it upstream to something like libinput: https://gitlab.freedesktop.org/libinput/libinput/-/issues. Once it's fixed on their end (or they point you where to go next) then it will work in our KCM. Sorry!