如何让 Windows 触摸板像 Mac 触摸板一样工作?

发布于 2024-12-28 08:17:37 字数 913 浏览 1 评论 0原文

我正在尝试使用 WINAPI 为 Windows 编写一些东西,这样我就可以让触摸板执行 Mac 触摸板所做的任何操作。

我已经使用 Spy++ 检查了两个手指点击等发送到操作系统的 WM 消息,但发现它只发送那些加号/减号:

WM_LBUTTONDOWN
WM_LBUTTONUP
WM_MOUSEHOVER
WM_MOUSEHWHEEL
WM_MOUSELEAVE
WM_MOUSEMOVE
WM_RBUTTONDOWN
WM_RBUTTONUP

当我尝试查看用 3 个或 2 个手指单击时发生的情况时,它没有发送任何特定的消息,除非我稍微移动了它们。

首先我想从这个开始:

当 5 个手指向下时显示桌面(如 win+D 那样)。

  • 如何编写(驱动程序?)可以诊断同时触摸触摸板的 5 个手指的东西? 当然,没有操作系统消息,但我可以对现有消息进行一些独特的组合,并通过该组合来分析它。

  • 如果我需要编写一个驱动程序,我可以将其作为大多数触摸板的通用驱动程序吗?我可以将其作为附加组件吗?

  • 如果您可以发布一个您熟悉的编写 Windows 驱动程序的好教程,请,因为我对此一无所知。

  • 我还需要考虑什么吗:

<前><代码>1。诊断5指鼠标事件。 2. 在启动时在资源管理器中创建一个线程来处理这些新的鼠标消息。

预先感谢

鼠标输入通知< /a>

I am trying to write something for windows using WINAPI, so I can make the touch pad do whatever the mac touch pad do.

I have checked using Spy++ what WM messages the two finger taps and etc. send to the OS, but figured out it sends only those plus/minus:

WM_LBUTTONDOWN
WM_LBUTTONUP
WM_MOUSEHOVER
WM_MOUSEHWHEEL
WM_MOUSELEAVE
WM_MOUSEMOVE
WM_RBUTTONDOWN
WM_RBUTTONUP

When I tried to see what happend when clicking with 3 or 2 fingers it didn't send any particular message, unless I moved them a bit.

firstly i would like to start with this:

when 5 fingers going down show desktop (as win+D does).

  • How to write (driver?) something that can diagnose 5 fingers touching simultaneously the touch pad?
    Of curse there is no OS messages for this, but I can make some unique combination of existed messages and by that diganose it.

  • If I need to write a driver can I do it generic for most of the touchpad, can I do it as add-on?

  • If you can post a good tutorial you are familiar with for writing a driver for windows, pls, cause I have no clue about it.

  • Do I need anything else to take into account :

1. Diagnose 5 fingers mouse events.
2. Make a thread in Explorer on startup that handle those new mouse messages.

thanks in advance

Mouse Input Notifications

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦言归人 2025-01-04 08:17:37

简而言之,你不能。

首先,有些触摸板只能物理检测到 1 个手指触摸,而对于那些可以检测到多个手指触摸的触摸板,他们的驱动程序会为您进行翻译。

Windows 没有任何对读取多个触摸输入的固有支持 - 它依赖于触摸板驱动程序来提供它们。

对于某些设备,您可以通过编写自己的触摸板驱动程序来实现您的目标(可能从 Linux 触摸板驱动程序和 Windows 驱动程序开发套件开始),但这远非简单。

而且,您需要对您想要支持的每一个触摸板设备(例如 Synaptics、Alps Electric、Cirque 等)执行此操作。

只有在此之后,您才能继续实施反应用于资源管理器等应用程序中的触摸板操作。

In short, you can't.

First, there are touchpads that can physically detect only 1 finger touch, and for those who can detect many - their drivers do the translation for you.

Windows does not have any inherent support for reading multiple touch inputs - it relies on the touchpad drivers to provide them.

You can achieve your goal for SOME devices by writing your own touchpad driver (probably starting from Linux touchpad drivers and Windows driver development kit), but this is far from being simple.

And, you'll need to do this for each and every touchpad device you want to support (from Synaptics, Alps Electric, Cirque to name the few)

Only after that you can move on to implementing the reaction for the touchpad actions in applications like Explorer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文