Search code examples
pythonlinuxusbtablet

Tablet Pressure with Python on Linux


Is there a simple way to get the pen pressure data from a usb tablet using python on Linux?


Solution

  • You can do it by reading input events on the input device node. I wrote some modules to do this. you can find it in the Pycopia project.

    The disadvantage of this is that your program must run as root.

    The powerdroid project also uses this, but that's old code now. You can see another example of synthesizing touch input in the devices module. It probably won't work anymore, but you might start with that.