windows - AutoHotkey 中有没有办法知道鼠标点击和触摸屏点击

标签 windows keyboard keyboard-shortcuts autohotkey touchscreen

我有两台显示器,其中一台是触摸屏。现在有人在 autohotkey 中做一个简单的代码。您在鼠标点击触摸屏点击之间收到了一个

例如,我在主显示器 1 上使用 Photoshop 应用程序

而且我的触摸屏显示器 2

上有一个虚拟键盘和我的(最喜欢的击键组合)

如果我用左手在我的虚拟键盘显示器上触摸屏点击 2,我想。

鼠标指针停留在我的主显示器上 1

这样我就可以继续使用 PhotoShop,而无需中断将鼠标指针移回主显示器 1。

这是脚本迄今为止的一个替代想法。

::^d ;push ctrl + d to disable the mouse pointer movement
BlockInput MouseMove 
return

::^e ;push ctrl + e to enable the mouse pointer movement
BlockInput MouseMoveOff 
return

keystarter and autohotkey with two monitors

最佳答案

使用 AHK 区分输入设备并不是一项微不足道的任务。可以做到,但是比较复杂。
如果您愿意将触摸屏上的每次点击都解释为触摸点击,那么您可以这样做:

When the mouse moves on the normal screen  
    store it's position in a variable.

When a left click is executed on the touch screen do the click  
    move the mouse back to the last know position on the normal monitor.

你需要:

SysGet
RegisterCallbackSetTimer + MouseGetPos
Hotkeys

关于windows - AutoHotkey 中有没有办法知道鼠标点击和触摸屏点击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38808568/

相关文章:

macos - Mac 上的 Google Chrome 开发者工具键盘快捷键自定义

python - 如何在 Web 服务器中设置 Python?

ios - 如何在 UITextField keyboardType NamePhonePad 上设置默认启动备用键盘 View

windows - 如何检测窗体何时被最大化?

ios - 如何在 iPhone 模拟器上启用日文键盘?

c++ - SendInput() 键盘字母 C/C++

java - IntelliJ IDE 突然开始在 Windows 中显示基于 "meta"的快捷方式

eclipse - Ctrl + Shift + R 在 Eclipse 中不起作用

windows - 有没有办法在 WINdows 操作系统上使用 UNIX GREP 命令

c++ - SignalObjectAndWait 考虑有 SetEvent 和 WaitForSingleObject 的目的是什么?