#568·Weylus

Flipped stylus eraser generates BTN_TOOL_RUBBER but libinput still reports pen

Author: KvGrooveCreated Sep 11, 2026Updated Sep 11, 2026

I'm using Weylus Community Edition 2026.5.22 on Linux with a Surface Pro 8 + Slim Pen 2 as the client.

The pen itself works correctly through Weylus, including pressure and tilt. However, flipping the Slim Pen around to use the physical eraser does not appear as an eraser in applications such as Xournal++.

I traced the input through several layers:

Weylus browser debug overlay

Normal pen:

pointerType: pen
button: -1
buttons: 1

Flipped eraser:

pointerType: pen
button: -1
buttons: 32

So the browser is distinguishing the eraser through the buttons bitmask.

evtest on the Weylus Stylus device

When using the eraser, I see:

BTN_TOOL_PEN      0
BTN_TOOL_RUBBER   1

So Weylus does emit BTN_TOOL_RUBBER at the evdev level.

However:

bash
sudo libinput debug-events --device /dev/input/event7

always reports the tool as:

pen

including when using the flipped eraser. I never get an eraser tablet tool from libinput.

Xournal++ therefore also identifies both the normal tip and the flipped eraser as the same Stylus device.

Host:

  • Linux / KDE Plasma Wayland
  • Weylus Community Edition 2026.5.22
  • libinput 1.31.3
  • Weylus virtual stylus via uinput

Client:

  • Surface Pro 8
  • Linux
  • Surface Slim Pen 2
  • browser PointerEvents correctly show buttons: 32 for eraser

It looks like the virtual uinput tool transition may not be emitted in the sequence libinput expects. In particular, the browser reports the eraser primarily via event.buttons, while event.button remains -1 during movement.

Is this a Weylus uinput issue, or is there another event sequence needed for libinput to recognize the virtual tool as LIBINPUT_TABLET_TOOL_TYPE_ERASER?