Bug 481737 - No visual feedback when pressing stylus buttons that emit BTN_TOOL_PEN or BTN_TOOL_RUBBER
Summary: No visual feedback when pressing stylus buttons that emit BTN_TOOL_PEN or BT...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: master
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-02-23 21:55 UTC by Nate Graham
Modified: 2024-02-27 07:39 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2024-02-23 21:55:17 UTC
See Bug 475704 for the investigation that led here.

I have a stylus with two buttons. When one button is pushed, it emits BTN_TOOL_PEN. When the other is pushed, it emits BTN_TOOL_RUBBER.

In both cases, there is no visual change anywhere to suggest that the buttons are handled and recognized and actually doing anything. Thus I thought they were broken.

In addition to the ability to re-bind these buttons to emit right and middle clicks (which is tracked in Bug 469232), it would be better if there was some kind of visual status change to so the user knows that their pen buttons are not broken.
Comment 1 David Redondo 2024-02-26 09:19:40 UTC
That's on the app and kinda hard to do. 

These evdev events indicate not button presses but that a certain tool is in use with the device see 
https://www.kernel.org/doc/Documentation/input/event-codes.txt

Quoting
* BTN_TOOL_<name>:
  - These codes are used in conjunction with input trackpads, tablets, and
    touchscreens. These devices may be used with fingers, pens, or other tools.
    When an event occurs and a tool is used, the corresponding BTN_TOOL_<name>
    code should be set to a value of 1. When the tool is no longer interacting
    with the input device, the BTN_TOOL_<name> code should be reset to 0. All
    trackpads, tablets, and touchscreens should use at least one BTN_TOOL_<name>
    code when events are generated.

The compositor just sees a "proximity in" event for a tool.
I think it's not possible to know in general if a tool is the same physical object or not.  
Further reading:

https://gitlab.freedesktop.org/libinput/libinput/-/issues/841#note_1699093
https://wayland.freedesktop.org/libinput/doc/1.12.0/tablet-support.html

I think at some point the user should know what the buttons on their hardware do. Given that we did not receive bug reports about that so far I would make a guess that if you buy a drawing tablet that behavior would be documented and/or known by artists.
Comment 2 Nate Graham 2024-02-26 18:49:21 UTC
> I think at some point the user should know what the buttons on their hardware do.
I feel called out! :D 

FWIW the pen in question is the one that came with my laptop, and it lives in a little garage. Hardware like this is of secondary importance compared to a standalone drawing tablet, so I think we can't expect the user to be so much of an expert in what the buttons of the pen do.

Maybe Bug 469232 is enough, though.
Comment 3 David Redondo 2024-02-27 07:39:40 UTC
> Maybe Bug 469232 is enough, though.

I am not sure it's possible for these buttons because we don't actually see a button press but let's see.

For exmaple I have a pen and the eraser is at the top of it (like a physical pencil with eraser). These events are generated when I turn that pen around.