问题描述
我正在尝试在Windows 7上编写python脚本以与Wacom Bamboo Pen平板电脑交互. Wacom建议使用WinTab API,它可以正常工作,但不适用于我的应用程序.我不希望Wacom数位板充当定点设备(例如,它不应移动光标).我想要的只是来自设备的原始x,y数据.
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.
实现此目标的最佳方法是什么?我是否需要为平板电脑编写其他驱动程序才能允许这样做?还是可以修改现有的Wacom驱动程序以不影响系统光标.
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.
推荐答案
我认为,在wintab中,您可以获得原始坐标.至少在 wintab的Python包装器中,您可以访问它们:
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
cgkit.wintab.Packet.y
我是 为自己调查是否有适用于平板电脑的跨平台api,但是如果您需要仅适用于Windows的解决方案.
I'm investigating for myself if there is an cross-platform api for tablets, but if you need windows-only solution that should work.
这篇关于Python Wacom界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!