Bug 457636 - Feature to map pen buttons to keys / sequence of keys or commands
Summary: Feature to map pen buttons to keys / sequence of keys or commands
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_tablet (show other bugs)
Version: 5.25.3
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-08 17:06 UTC by Chris
Modified: 2024-04-04 03:23 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
X11 Wacom stylus settings (20.49 KB, image/png)
2022-08-09 23:12 UTC, Nicolas Fella
Details
Screenshot showing tablet button mapping from old kcm (72.46 KB, image/png)
2022-08-10 05:55 UTC, Raghavendra kamath
Details
Plasma Wayland 6.0.3 Drawing Tablet KCM (150.91 KB, image/png)
2024-04-04 03:23 UTC, James North
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2022-08-08 17:06:41 UTC
This is meant as a follow up on https://bugs.kde.org/show_bug.cgi?id=433045#c23
and https://bugs.kde.org/show_bug.cgi?id=433045#c18

I'm using a tablet-pc, Z20t-C, that I want to use tablet only mode, without external keyboard, like an ipad.
This device has a plain wacom stylus, which could really ease the transition, since it has buttons, those buttons are readily recognized by libinput-wayland, they could be used as substitute to not having a mouse.

I've had opportunity to try Gnome configuration tool, it does recognize the stylus buttons, and suggest using them as mouse click.

Using `libinput debug-events` I can see `TABLET_TOOL_BUTTON` is working. This event is sent when I use the pen/stylus button.

It would be nice to have this functionality implemented in systemsettings.

Note: I'm using as much wayland as possible and as little of legacy x11 as possible. So I do not have access to any legacy tool.

Note: every functionality of Krita regarding the wacom digitizer and stylus are working fine. Krita itself however is not really usable, because in the face of not having access to mouse clicks and/or keyboard shortcuts, I quickly get stuck and have to give up.
Comment 1 Nate Graham 2022-08-09 19:58:32 UTC
What's the bug exactly? In Plasma the stylus isn't recognized as a click? Or something else?

Or are you looking for a configuration interface for something? If so, for what? For the buttons on the stylus? Or something else?
Comment 2 Nicolas Fella 2022-08-09 23:11:56 UTC
Basically what is asked for is a Wayland equivalent of the stylus settings in the X11 Wacom KCM, which allows to bind pen buttons to arbitrary mouse/key presses
Comment 3 Nicolas Fella 2022-08-09 23:12:21 UTC
Created attachment 151209 [details]
X11 Wacom stylus settings
Comment 4 Nicolas Fella 2022-08-09 23:13:11 UTC
FWIW I'm probably going to work on this (and button remapping as well) soon
Comment 5 Nicolas Fella 2022-08-09 23:55:38 UTC
I guess there is another aspect to this. There are two cases to consider:
- When an application has native tablet support KWin gives it the "raw" tablet events
- When the application does not natively support tablet input then KWin emulates mouse events, i.e. left mouse button down when pressing and left mouse button up when lifting the pen. However it does no such emulation for the pen buttons. Perhaps we should emulate middle/right mouse button clicks by default in that case
Comment 6 Raghavendra kamath 2022-08-10 05:52:37 UTC
Should I file a different report for button mapping on the tablets as well? or is it okay to bundle all the buttons on pen and tablet in here?
Comment 7 Raghavendra kamath 2022-08-10 05:54:12 UTC
Adding screenshot of the
Comment 8 Raghavendra kamath 2022-08-10 05:55:07 UTC
Created attachment 151214 [details]
Screenshot showing tablet button mapping from old kcm
Comment 9 Aleix Pol 2022-09-13 17:07:26 UTC
It's implemented for tablet buttons already for Plasma 5.26.
Comment 10 Raghavendra kamath 2022-09-13 17:45:36 UTC
Can we test it in neon? Is it in the same settings kcm? Thanks
Comment 11 Aleix Pol 2022-09-20 22:34:18 UTC
Yes
Comment 12 James North 2024-04-04 03:23:54 UTC
Created attachment 168122 [details]
Plasma Wayland 6.0.3 Drawing Tablet KCM

I'm a little confused on the status of this. I have a Cintiq so I don't have any Tablet Buttons, only the buttons on my stylus. I can't evaluate whether that has been done, but comments from 2022 suggest they have been.

When I look at the Drawing Tablet KCM in Plasma 6.0.3, I see three "Tool Buttons". This seems pretty similar to the X KCM screenshot Nicolas Fella provided. However, there is no image of the Stylus on the Wayland KCM. The image is really useful, because it clearly displays where on the stylus the Buttons are located. I need to guess on Wayland.

Additionally, I can't seem to find a way to bind the Tool Buttons to mouse presses like Middle Mouse button or Left Mouse button as shown in Nicolas Fella's X screenshot: https://bugs.kde.org/attachment.cgi?id=151209

So:

* Need a graphic of the pen with button numbers labelled
* Need to be able to map mouse presses to stylus

I think that's it?

I've uploaded an attachment of what the current settings look like in 6.0.3.