Bug 457574

Summary: kcm-wacomtablet sets express buttons on the wrong device for Huion H640P
Product: [Applications] systemsettings Reporter: jade <kde>
Component: kcm_wacomtabletAssignee: Valerii Malov <jazzvoid>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description jade 2022-08-07 01:46:17 UTC
SUMMARY

I am using the digimend drivers with the Huion H640P tablet (https://github.com/DIGImend/digimend-kernel-drivers, which I built the latest version of just now).

There are four devices exposed by the drivers for this device:

~ » xsetwacom --list devices
Tablet Monitor stylus           	id: 11	type: STYLUS
Tablet Monitor Pad pad          	id: 12	type: PAD
Tablet Monitor Touch Strip pad  	id: 13	type: PAD
Tablet Monitor Dial pad         	id: 14	type: PAD

By inspection, I found that kcm-wacomtablet set the buttons on device 14, which makes them not do anything. I then tried setting it on the other devices exposed by the tablet, and found that setting it on device 12 is correct:

~ » xsetwacom --get 14 'Button' 1
key +Control_L +Shift_L +p -p
^^^^ this is what I have in the kcm settings
~ » xsetwacom --set 14 'Button' 1 'key z'
*press it* (nothing)
~ » xsetwacom --set 13 'Button' 1 'key z'
*press it* (nothing)
~ » xsetwacom --set 12 'Button' 1 'key z'
*press it* (z)

STEPS TO REPRODUCE
1. Set an Express Button in "Graphic Tablet - System Settings" on a Huion H640P
2. Press the button

OBSERVED RESULT
Nothing happens, because the settings panel set it on the wrong device.

EXPECTED RESULT

I would like it to set on the correct device. I know that this device is sorta a weird thing and might need some workaround code :/

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.15.55-2-lts (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 jade 2022-08-07 01:54:15 UTC
Oh, bonus madness: the buttons are in discontinuous order!!

The buttons that exist are 1, 2, 3, 8, 9, 10, which are just the six buttons on the left in order top to bottom. There is no obvious reason that they are in a weird order. But this might be something this implementation might run into as well.