문제

I am trying to write a python script on Windows 7 to interact with my Wacom Bamboo Pen tablet. Wacom recommends using the WinTab API, and it works fine, but not for my application. I don't want the Wacom tablet to act as a pointing device (as in, it should not move the cursor). All I want is raw x, y data from the device.

What is the best way to implement this? Do I have to write a different driver for the tablet to allow this? Or can I modify the existing Wacom driver to not affect the system cursor.

도움이 되었습니까?

해결책

I think, in wintab you can get the raw coordinates. At least in Python wrapper for wintab you can access them:

cgkit.wintab.Packet.x

In absolute mode, contains the scaled cursor location along the x axis. In relative mode, contains the scaled change in cursor position.

cgkit.wintab.Packet.y

In absolute mode, contains the scaled cursor location along the y axis. In relative mode, contains the scaled change in cursor position.

I'm investigating for myself if there is an cross-platform api for tablets, but if you need windows-only solution that should work.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top