I need to access a windows tablet pen data (such as the surface) via Python. I mainly need the position, pressure, and tilt values.
I know how to access the Wacom pen data but the windows pen is different.
There is a Python library named Kivy that can handle multi-touch but it recognizes my pen as a finger (WM_TOUCH) and not as a pen (WM_PEN).
This is my Kivy code (that doesnt report pressure and tilt):
from kivy.app import App
from kivy.uix.widget import Widget
class TouchInput(Widget):
def on_touch_down(self, touch):
print(touch)
def on_touch_move(self, touch):
print(touch)
def on_touch_up(self, touch):
print("RELEASED!",touch)
class SimpleKivy4(App):
def build(self):
return TouchInput()
There is a wonderful processing library named Tablet that only works with the Wacom tablet with a simple API (e.g., tablet.getPressure()
)
I need something like this.