Button on HP Rechargable MPP2.0 Tilt pen not recognized

I have a HP Rechargable MPP2.0 Tilt pen that I want to use. Drawing works fine out of the box, but I have some headaches configuring the buttons. I have been testing the pen in KDE Settings → Drawing Tablets → Pen.

When I press the upper button, the text on “Pen button 1” turns bold. Which is already strange because the pen image to the left says that button 1 should be the lower button.
But the lower button (that should be “Pen button 2”) is not recognized at all and I can’t get it to show up.

So I used evtest to see if the buttons are working at all, and they are:

Lower button (primary)
The primary button has been emitting different events, but I am unsure what the difference is

Event: time 1786714004.766037, -------------- SYN_REPORT ------------
Event: time 1786714005.025611, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 0
Event: time 1786714005.025611, -------------- SYN_REPORT ------------
Event: time 1786714007.669950, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 1
Event: time 1786714007.993924, -------------- SYN_REPORT ------------
Event: time 1786714007.998332, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 0
Event: time 1786714007.998332, -------------- SYN_REPORT ------------
Event: time 1786714008.002042, type 1 (EV_KEY), code 321 (BTN_TOOL_RUBBER), value 1

Upper button (secondary)

Event: time 1786714008.723213, -------------- SYN_REPORT ------------
Event: time 1786714008.748976, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0044
Event: time 1786714008.748976, type 1 (EV_KEY), code 331 (BTN_STYLUS), value 0

So is there a way KDE Plasma can recognize the lower button as well? The upper button works fine in other applications like Rnote, but the lower isn’t recognized there as well.

quick question before anyone gets too wrapped up in this… was this pen ever connected to a windows machine running HP proprietary software?

Um, I think I installed it when I first got it, just to see what it could do. But I removed it shortly after.

I also tested the pen on another Windows machine that did not have the software installed, where it worked flawlessly.

Quick note: I have also used a Surface Pen in the last, where I needed to connect the pen via Bluetooth to get the entire functionalty. The HP pen on the other hand doesn’t support Bluetooth at all, everything happens via MPP.

you may be in the clear then, but those proprietary software packages can make changes to the firmware that the pen would then carry forever unless it was reprogrammed back to defaults.

i’ve had keys on my keyboard not work until i went back into windows and reset the keys back to their default settings, then linux could read them.

I tried redownloading the HP Pen Control app, but it seems like it is not available anymore. And of course, the newer app doesn’t seem to work with the pen…

Seems like I spoke too soon, I found a working link to the Microsoft Store to download it again

The app allows me to set the functionality of the pen, but they are both set to their defaults:

  • Upper button: Right click/select
  • Lower button: Delete

There are quite a few options I can choose from for both buttons:

  • Undo
  • Control key
  • Shift key
  • Alt key
  • Windows key
  • Tab key
  • Play/Pause
  • Mute/Unmute
  • Volume up
  • Volume down
  • Left arrow key
  • Right arrow key
  • New browser tab
  • Previous page
  • Next page
  • Create screenshot
  • Start Task Manager
  • Switch between apps
  • Desktop
  • Scroll
  • Disable key

After some quick tests, it seems like the application only modifies the Windows driver and not the firmware, thus any changes do not carry over to Linux, sadly

in that case, might i suggest input-remapper and see what i thinks of your buttons.

I just tried input-remapper. The lower button gets recognized as Button TOOL RUBBER, while the upper button is Button STYLUS. As a test, I applied a mapping from TOOL RUBBER to KEY_LEFTMETA, which works well.

It certainly would be a workaround to map that to keyboard shortcuts within my applications. But that would mean either switching profiles when using different programs or remap keyboard shortcuts in-application, if possible.

For example, Saber Notes has CTRL+E to toggle the eraser tool. When mapping the lower button on it, it stays active until I press the button again. My preferred way would be to stay in erase mode as long as I keep the button pressed.

Is there a way we can tell Plasma to treat the lower button as the lower button?

if plasma doesn’t recognize the hardware and give you configuration options for the buttons, then it’s unlikely you will be able to control it using plasma settings.

it’s a longshot, but you might search the HP site for a linux driver, if they have one.

your best option currently is some 3rd party tool like input-remapper, there should be separate events for button down and button up you can use to make it a momentary switch.

Well, Plasma does recognize it, just only partially.

There are no drivers available for the pen, as everything is handled through the HID driver. And HP only provides Windows drivers.

Can I create a bug report somewhere? As we’ve seen, Linux itself does recognize the pen. The problem is just that Plasma does not associate the button with the pen itself.

as with many proprietary hardware items, they get resolved into the lowest common HID denominator by linux unless the hardware vendor provides a linux driver.

working with the HID inputs you have is your best bet.

you can try running the HP software in bottles and see if the pen behaves as you expect but then it would likely only work while running that instance of bottles.

you can ask for a “wishlist” item at bugs.kde.org to have more support for the pen, but unless it’s a common request and applies to other pens as well (as with extra mouse buttons), then i would not expect driver to appear any time soon.