Мне нужно получить доступ к данным пера планшета Windows (например, к поверхности) через Python. В основном мне нужны значения положения, давления и наклона.
Я знаю, как получить доступ к данным пера Wacom, но перо Windows отличается.
Существует библиотека Python с именем Kivy, которая может обрабатывать мультитач, но распознает мое перо как палец (WM_TOUCH ), а не как перо (WM_PEN).
Это мой код Kivy (который не сообщает о давлении и наклоне):
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()
Существует замечательная обрабатывающая библиотека с именем Планшет, который работает только с планшетом Wacom с простым API (например, tablet.getPressure()
)
Мне нужно что-то вроде этого.