我正在尝试在 Windows 7 上编写一个 python 脚本来与我的 Wacom Bamboo Pen 数位板交互。 Wacom 建议使用 WinTab API,它工作正常,但不适用于我的应用程序。我不希望 Wacom 数位板充当定点设备(例如,它不应该移动光标)。我只需要来自设备的原始 x、y 数据。
实现它的最佳方法是什么?我是否必须为平板电脑编写不同的驱动程序才能允许这样做?或者我可以修改现有的 Wacom 驱动程序以不影响系统光标。
请您参考如下方法:
我想,在 wintab 中你可以获得原始坐标。至少在 Python wrapper for wintab你可以访问它们:
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.
我是 investigating对我自己来说,如果有一个跨平台的平板电脑 api,但如果你需要应该工作的仅限 Windows 的解决方案。
