Bug 512572

Summary: Stylus Mapping Not Able to Be Changed
Product: [Applications] systemsettings Reporter: theawkwarddreamer
Component: kcm_tabletAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: aleixpol, josh
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Output of libinput list-devices as well as output from multiple libinput record

Description theawkwarddreamer 2025-11-24 21:49:20 UTC
Created attachment 187134 [details]
Output of libinput list-devices as well as output from multiple libinput record

SUMMARY
Stylus buttons will not be remapped if changed in the tablet settings GUI. Using a Microsoft Surface Slim Pen (no clip), but this seems to be a longstanding bug. See below.

STEPS TO REPRODUCE
1. Acquire stylus with side buttons.
2. Remap any of the shown buttons to anything that isn't left click.
3. Attempt to use the stylus.

OBSERVED RESULT
The stylus only left clicks.

EXPECTED RESULT
The stylus will perform the action it is remapped to.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 43
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.0
Kernel Version: 6.17.8-300.fc43.x86_64 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
ktabletconfig couldn't detect either a tablet or a stylus despite the touchscreen being built-in. The pen is connected via bluetooth.
The stylus GUI doesn't show an appropriate amount of buttons. I wonder if it would be helpful if a user could define how many buttons their pen has and where. It'd at least make it easier to test out the mappings.

This bug seems to exist in other distros as this individual also couldn't remap their stylus in Mint or Ubuntu. Unsure if they were using KDE, but I've been looking into this for a while and it seems to be a widespread issue.
https://community.frame.work/t/struggling-with-stylus-with-linux-mint/76882
This user is also having the issue that started me down this route and has a similar pen to me (but I use a Framework 12 computer): https://github.com/linux-surface/linux-surface/issues/1428
This bug seems similar as a whole, but occurs in kcm_wacomtablet: https://bugs.kde.org/show_bug.cgi?id=474020
Comment 1 Joshua Goins 2025-11-27 23:10:35 UTC
Marking as duplicate as this may be related to a bug on our side.

*** This bug has been marked as a duplicate of bug 508084 ***
Comment 2 theawkwarddreamer 2025-12-02 18:49:43 UTC
Crossposting from the other bug as I've found new information and it appears that my issue is not a duplicate of the other bug, so I'm moving relevant information here. I'm just hesitant to change the status myself as I'm not a developer and unsure of the etiquette.

I attempted to change settings in `.config/kcminputrc` as a workaround while I wait for other possible fixes to end up on my machine, but even remapping supposedly every button on my stylus to right click does absolutely nothing. Touching the stylus to the screen is still left click. The side button is still middle click. Eraser erases. I have the following in my kcminputrc:

[ButtonRebinds][TabletTool][ILIT2901:00 222A:5539 Stylus]
320=MouseButton,273
321=MouseButton,273
331=MouseButton,273
332=MouseButton,273

I assume that's the correct device as the header was created by me changing one of the GUI bindings to right click and then modifying the 0 to 331 in the file.

Another update: ktabletconfig can now see my stylus, but states all the buttons are mapped to 273 like the kcminputrc file. I've ended up just remapping right click to middle click, which did work. I really wonder if it's something with styluses and 2-in-1s that cause the issue. OpenTabletDriver seems to be of no use to me at all as it seems to want an attached tablet to do anything. Will be going into their support discord to look more into this.