Using a MacBook trackpad as a graphics tablet
There are pressure sensors built into MacBook trackpads and you can use them as a kitchen scale. But using one as a graphics tablet ironically seems a bit more challenging.
First, I set-up a local TCP server that broadcasts the detailed touch data (I based it on the TrackWeight project). Then, using the pressure data, I wanted to create a plug-in for Krita that would modify the brush size accordingly to the pressure readings. But I hit a wall - the brush size cannot be updated mid-stroke, so even though the communication worked fine, the brush size didn’t change. I also tried making a plug-in for GIMP, but couldn’t get it to run in the background.
Eventually, just to have a working proof of concept, I made a tiny local web page with HTML5 canvas.
the code is available here (very messy, I’m sorry, can be a starting point though?)
I wish Apple supported this use case natively, just as a fun thing. It would be also really cool if someone created a sort of virtual HID graphics tablet driver that used the pressure data, but I don’t know if that’s possible.