Mouse to arrow keys

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mink

Mouse to arrow keys

23 Sep 2017, 15:14

Hi all,

I'm disabled and i found this script, so i can use my mouse as the arrow keys (left and right) on the keyboard for the racing game Forza Horizen 3. But i can't get the script to work. I also can't hold hot keys down while using my mouse, so i need something like caps.

+MButton::
MouseGetPos, xpos, ypos
xright:=xpos+2
xleft:=xpos-2
yup:=ypos-2
ydown:=ypos+2
loop=1
Loop
{
MouseGetPos, xchg, ychg
if not GetKeyState("shift","P")
{
loop=0
return
}
if not loop = 0
{
if (xchg > xright)
{
sendinput {Right}
MouseMove, xpos, ypos

}
if (xchg < xleft)
{
sendinput {Left}
MouseMove, xpos, ypos
}
if (ychg < yup)
{
sendinput {up}
MouseMove, xpos, ypos

}
if (ychg > ydown)
{
sendinput {down}
MouseMove, xpos, ypos
}
}

}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Aqualest, Bing [Bot], bonobo, Google [Bot], OrangeCat, ruespe, Scr1pter, Spawnova and 388 guests