I have two monitors one of them is a touchscreen. do somebody now a simple code in autohotkey. that you received a value, between a mouse click and a touchscreen click
I use for example Photoshop application on my main monitor 1
And I have a virtual keyboard with my (favorite keystroke combos) on my touchscreen monitor 2
I want if I do with my left hand a touchscreen click on my virtual keyboard monitor 2.
That the mouse pointer stays on my main monitor 1
So that I can proceed with PhotoShop without interrupting to move my mouse pointer back to my main monitor 1.
This is the script so far a alternative idea.
::^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
2
Answers
Distinguishing between input devices is not a trivial task with AHK. It can be done, but it’s quite complicated.
If you’d be okay with interpreting every click on the touchscreen as a touch click then you could do something like this:
You’ll need:
SysGet
RegisterCallback or SetTimer+MouseGetPos
Hotkeys
I do not have a second monitor to fully test this code but I have tested on my main monitor which is a touchscreen. This code should do the trick 🙂
HTH 😉