I did a macropad for Linux for myself on the cheap. I use it daily and it is magical!
I just updated the scripts so that it handles plug and unplug and gracefully restarts the service.
https://github.com/poleguy/remap
I also use a work provided huion Kamvas pro 13 for remote whiteboard type engineering work (#krita mostly). Pen works fine but I never bothered configuring the buttons on it.