Bug 490975 - Allow rebinding tablet pen buttons to other tablet pen buttons
Summary: Allow rebinding tablet pen buttons to other tablet pen buttons
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_tablet (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-29 14:17 UTC by Sebastian Parborg
Modified: 2024-11-04 21:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Parborg 2024-07-29 14:17:44 UTC
SUMMARY
It is currently possible to rebind tablet pen buttons to mouse buttons by editing some KDE configuration files. 
However rebinding the tablet pen buttons to mouse events has some downsides as certain applications (like GIMP and Blender) treat mouse events differently than tablet pen events.

A very common use case is to switch around the two pen buttons on the pen grip (this is available as a toggle in Gnome).
This is currently not possible in Plasma (without getting unintended side-effects by mapping them to mouse buttons).


OBSERVED RESULT
The end user is only able to remap the tablet pen buttons to keyboard or mouse events.

EXPECTED RESULT
The end user is able to remap the tablet pen buttons to other tablet pen buttons
For example remap "Pen button 1" to "Pen button 2" so when they press "Pen button 1" on the physical pen, Plasma sends "Pen button 2" to the applications.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo/KDE Plasma 5.92.0
Comment 1 Sebastian Parborg 2024-09-20 13:16:29 UTC
I just noticed that you can already do this with ".config/kcminputrc".
I missed/forgot that this was implemented in: https://invent.kde.org/plasma/kwin/-/merge_requests/3055

You can currently manually rebind the buttons by adding:
```
[ButtonRebinds][TabletTool][Wacom Movink 13 Pen]
331=TabletToolButton,332
332=TabletToolButton,331
```

Would be nice to expose this in the UI though
Comment 2 Joshua Goins 2024-11-02 16:10:44 UTC
Git commit d5a79ec3911a70deea07b17a7b5bfd6e3e6f5794 by Joshua Goins.
Committed on 01/11/2024 at 15:35.
Pushed by redstrate into branch 'master'.

kcms/tablet: Add support for remapping to tablet tool buttons

This is already supported by KWin, but not yet exposed in the UI. Useful
for switching around actions in programs that already support the tablet
tool buttons natively - such as Krita, Blender and so on.

M  +61   -0    kcms/tablet/inputsequence.cpp
M  +15   -1    kcms/tablet/inputsequence.h
M  +2    -0    kcms/tablet/ui/ActionBinding.qml
M  +39   -2    kcms/tablet/ui/ActionDialog.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/d5a79ec3911a70deea07b17a7b5bfd6e3e6f5794