Skip to content

Conversation

HannahLP
Copy link

Added support for the XP-Pen Deco 02.
Descriptors: linuxwacom/wacom-hid-descriptors#506

Stylus support is only partial, due to the one-button nature of the only supported stylus.

Buttons may not be correct, as libinput only seems to offer KEYBOARD events, but this is the format that appears to be used by every other XP-Pen device currently in the repository. See lines 47-49 for further detail.

SVG is melting my brain a bit, so it's fairly minimal, but the tags should be correct even in the absence of labels.

@whot
Copy link
Member

whot commented Aug 24, 2025

we have support for the Deco04 in udev-hid-bpf, in theory that can be adjusted or serve as base to cater for the Deco02 too. That will then also give you the right button codes, etc.

The keycodes is actually a firmware feature, libinput doesn't (cannot) know that those keys are actually buttons. What the BPF does is correct that into a proper tablet-like device.

@HannahLP HannahLP marked this pull request as draft September 21, 2025 14:14
@HannahLP
Copy link
Author

Thanks @whot for direction on this. I have written a BPF program for the device and submitted a merge request to that repository.
In the meantime, I've adjusted the pull request here to reflect that program, and will leave this marked as draft until it is deemed to have been suitable for merging (unless any of the maintaining folks here would prefer that this be pushed back until the BPF program is moved to stable?) .

The changes here are now reflective of the current state of the BPF program. This is tested against GNOME's tablet mapper tool, and all buttons are now mappable and correctly placed with appropriate leaders.

The exception to this is that the dial cannot be mapped in either direction, for reasons I cannot quite figure out. For reference, the evemu-record for a clockwise rotation followed by anti-clockwise rotation is as follows:

E: 0.000001 0002 0007 0001	# EV_REL / REL_DIAL             1
E: 0.000001 0000 0000 0000	# ------------ SYN_REPORT (0) ---------- +0ms
E: 1.426027 0002 0007 -001	# EV_REL / REL_DIAL             -1
E: 1.426027 0000 0000 0000	# ------------ SYN_REPORT (0) ---------- +1426ms

Following the same procedure as above for libinput debug-events:

-event5   TABLET_PAD_DIAL             +0.000s	dial 0 delta 120.00 (mode 0)
 event5   TABLET_PAD_DIAL             +1.313s	dial 0 delta -120.00 (mode 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants