How to use MPP stylus eraser function

Hello Framework Community,

I’m using Ubuntu 25.10 (Ubuntu Studio, KDE), Kernel 6.17.0-19-generic on the Laptop12 and a MPP stylus (Metapen Surface Pen M2). The Stylus should act as an eraser if you use it’s backside. This function is actually detected in libinput but can’t seem to be used in any programs (in my case Krita, Obsidian Excalidraw).

Here’s the output of libinput debug-events | grep -e pen -e erase (without Time, Position and Tilt, for better readability). The first two lines show touching the screen with the tip, the next two lines show the same with the bottom of the stylus.

-event6   TABLET_TOOL_PROXIMITY        pen      (0, id 0x471e) proximity-in    axes:pt btn:SS2
 event6   TABLET_TOOL_PROXIMITY        pen      (0, id 0x471e) proximity-out
-event6   TABLET_TOOL_PROXIMITY        eraser   (0, id 0x4746) proximity-in    axes:pt btn:SS2
 event6   TABLET_TOOL_PROXIMITY        eraser   (0, id 0x4746) proximity-out

Any ideas how to use this eraser function?

Thanks a lot in advance!
Thomas

Somewhat off-topic/might help with the algorithm for visibility leaving this comment;

I know this is super extra, but just learned about it and I couldn’t help myself libinput debug-events | grep -E "pen|erase” is a tiny bit more efficient, using extended regex and the | acting as an OR argument :nerd_face:

I should probably go touch grass..

1 Like

Yeah, I’m actually almost regex illiterate …

Sorry for getting even more off-topic, but I highly recommend https://regex101.com/. It was by far the most helpful thing for me when I learned regular expressions. You can enter your test strings and see in real-time what matches and what doesn’t, it has a quick syntax reference, and my favorite part is how it breaks down your regex and explains back to you it in plain language.

I hope this doesn’t come across as “RTFM”, because that’s not my intent, and your original grep command is totally fine :slight_smile: