tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Huion tablet support



On Sun, 2 Mar 2025, Yorick Hardy wrote:
So what do you think? Should a new axis be added to wscons only
for this? Should the z axis be used for pressure on these devices?
(and w for tilt?)

The Z axis could be setup as pressure at
sys/dev/hid/hidms.c:hidms_setup()

[...]
        /* Try the wheel first as the Z activator since it's tradition. */
        hl = hid_locate(desc,
                        size,
                        HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
                        id,
[...]
        /*
         * The horizontal component of the scrollball can also be given by
         * Application Control Pan in the Consumer page, so if we didnt see
         * any Z then check that.
         */
        if (!hl) {
                hl = hid_locate(desc,
                                size,
                                HID_USAGE2(HUP_CONSUMER, HUC_AC_PAN),
                                id,
[...]

I could addd a similar block to check for HUD_TIP_PRESSURE after
that.  If the device has a wheel the pressure wont be set as z.
Another solution could be proposed if someone encounters such a
device.

But the ws driver should be modified as Yorick did.

If there is no concense in the use of Z for tip pressure, there is
no point in taking the trouble of doing this.

Regards.
adr

Sorry for not replying sooner, I am interested in getting something committed;
but I am swamped until probably at least end of March (perhaps even June).
I think it is worth pursuing. I don't have any experience of tablets with
a z or w wheel -- so it seems okay for now. But perhaps a little investigation
is warranted first so that we can ensure that any future device support
is not crippled by our decisions now.

Hi, I will make the changes then. I will add the descriptor report
section for the tablet's buttons and share the patches with the
list before filing a PR.  It will be easy to add more uclogic
tablets. Note that with the changes I talked before and your ws
driver patch any hid compliant tablet should have pressure working
in X. It's incredible how many manufactures choose not to comply with
the hid specification.

If in the future we find some problematic device, a specific
parameter for pressure (and tilt...) could be added to wscons.
Adapting the code then for this parameter should be fairly easy.

Regards.
adr


Home | Main Index | Thread Index | Old Index