Python Wacom输入

2024-06-17 10:12:07 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试在Windows7上编写一个python脚本来与我的Wacom Bamboo Pen平板电脑进行交互。Wacom推荐使用wintabapi,它工作得很好,但不适合我的应用程序。我不想让Wacom平板电脑充当指针设备(比如,它不应该移动光标)。我只需要设备上的原始x,y数据。在

实现这一点的最佳方法是什么?我需要为平板电脑编写一个不同的驱动程序才能实现这一点吗?或者我可以修改现有的Wacom驱动程序以不影响系统光标。在


Tags: 数据方法脚本应用程序系统驱动程序电脑指针
1条回答
网友
1楼 · 发布于 2024-06-17 10:12:07

我想,在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.

^{pr2}$

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

如果有一个用于平板电脑的跨平台api,但如果您需要一个只适用于windows的解决方案,那么我对自己的看法是investigating。在

相关问题 更多 >