Can we get pressure sense on mice?

I think one of the first practice programs we are likely to build while learning SDL2/3 is an image/png editor.
I have a screen-less wacom drawing tablet, and it shows up as if it were a regular mouse, I’ve scanned for other SDL_Events, and nothing gets triggered besides MOUSE_BUTTON and MOUSE_MOTION events.This means that a major component of the device (pen pressure) is not being captured.
Many touch pads in laptops have a pressure sense built in as well, which I hope means that the mousepad drivers should report that when it is an option.

I imagine that this information is already being generated when the device is being polled, and it’s just sitting off to the side being ignored.
Finger devices (touch screens) already have a pressure field in their event structure; how difficult would it be to add pressure to the mouse events for SDL3?

I think it would be very impressive for someone who decides to dig a little deeper into the mouse event structure to find that option already available and ready to play with.

Edit:
Anyhow, I see there have been many requests and even some attempts before, so I know it’s not that simple to implement. I guess I will button down and do some research into the matter instead.

Etc, etc.

Edit: libinput looks like a good candidate for linux’s Wayland users, it’s under the MIT license.
If there are external libs required, then the better option might be an external lib that pushes its own events.

Edit: My gosh, it’s a can of worms!!! I so wish there were an easy way to implement this, and maybe there is, I’ll go peek at gimp or krita for a better idea of things. It might truly be best left to the die-hard drawing tablet fans to implement for themselves.

{The Worms: if you were to make the pen pressure work, then people will expect all of the buttons to work, if you get the buttons to work, then you get complaints that the pen buttons aren’t responding. Get the pen buttons to respond, then it’s the axis tilt of the pen. Plus there are 80+ versions of other drawing tablets out there with different numbers of bits bobs and googahs. I would almost consider that do-able if it didn’t have to be implemented on half a dozen different platforms}

Pen support is being worked on in the official libs!

It’s getting its own event API with Multiple-Axis-Tilt detection, pressure, and eraser support.
I didn’t even know there was an air-brush device out there, but there’s support for the wheel and barrel rotation on it?

You can turn on/off mouse emulation: Mouse emulation is convenient while over the GUI/Tools area, but would be a hassle and increase complexity when drawing. Excellent decision.

Looks like there is even going to be penGUID’s which … could that mean multi-person-colab on a single computer? Or for single-developers the option of “this pen darkens and my other pen lightens”. Pens with individual states … How strange and awesome could all that be?

I’m just so excited, I’m nerding-out right now.
https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_pen.h
https://github.com/libsdl-org/SDL/blob/main/src/events/SDL_pen.c
https://github.com/libsdl-org/SDL/blob/main/test/testpen.c

Edit:
I’ve now tested it with my Wacom on an Ubuntu(X11). Works great
No need to initialize the device or anything, just plug in the device and listen for SDL_EVENT_PEN_MOTION.
Access pressure with the following: event.pmotion.axes[SDL_PEN_AXIS_PRESSURE];

Very cool.