Jar*_*ari 5 windows autohotkey magic-trackpad
我一直在试图弄清楚如何从触控板上“捕捉”三指和四指滑动以将自定义键盘命令绑定到它们。我认为也可以以同样的方式禁用点击点击。
我的想法是使用Autohotkey来捕捉信号并将动作(或不动作)绑定到该鼠标输入。问题是默认驱动程序不会将此信息传递给系统。
有谁知道如何从系统获取原始输入到 Windows 中 Autohotkey 的鼠标信号?某些应用程序、DLL 或其他什么?
这些代码来自我能够从 Magic Trackpad 捕获的默认 Autohotkey:
VK SC Type Up/Dn Elapsed Key
02 000 d 1.22 RButton
02 000 u 0.00 RButton
9E 001 d 2.15 WheelDown
9E 001 d 0.03 WheelDown
9F 001 d 1.22 WheelUp
9F 001 d 0.02 WheelUp
9D 001 d 1.83 WheelRight
9D 001 d 0.00 WheelRight
9C 001 d 1.22 WheelLeft
9C 001 d 0.02 WheelLeft
Run Code Online (Sandbox Code Playgroud)
使用上面的 WheelLeft 函数,我使用 Autohotkey 中的以下函数创建了两个手指滑动的后退按钮:
WheelLeft::
winc_presses = 1
SetTimer, Whleft, 400 ; Wait for more presses within a 400 millisecond window.
return
Whleft:
SetTimer, Whleft, off ; Disable timer after first time its called.
if winc_presses >= 1 ; The key was pressed once or more.
{
SendInput, !{Left} ; Send alt + left for back button (in Chrome at least)
}
; Regardless of which action above was triggered, reset the count to prepare for the next series of presses:
winc_presses = 0
return
Run Code Online (Sandbox Code Playgroud)
使用 400 毫秒延迟是因为扫描会导致多个 WheelLeft 被发送到计算机。这在 400 毫秒内仅捕获其中的第一个。我们不想多次发送返回命令。查看 uberoptions.net 以获取为 Logitech MX1000 完成的类似解决方案。
那么,有谁知道如何从 Magic Trackpad 获取其他手势,以便我们可以在 Windows 中正确使用它?
小智 1
这很有趣:http://www.trackpadcontrol.com/blog/24-an-impossible-battery-gauge.html 看来苹果故意隐藏了触控板超过一根手指和两根手指输入的任何东西。我不是 HID 方面的专家,但不能有人为触控板编写自己的驱动程序,然后可以接收使用苹果驱动程序时隐藏的原始鼠标数据。您可以尝试执行此人所做的操作并卸载苹果驱动程序,然后尝试使用自动热键。
我很想在 Windows 上为我的神奇触控板获得完整的多点触控支持,可惜苹果如此坚持不允许 Windows 用户拥有多点触控:/
| 归档时间: |
|
| 查看次数: |
2190 次 |
| 最近记录: |