Is it possible to make mouse movement work on arrow keys?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
IsolatedEgg
Posts: 2
Joined: 16 Sep 2018, 18:49

Is it possible to make mouse movement work on arrow keys?

17 Sep 2018, 19:28

Like, if you press the up arrow, the mouse cursor would go up a few pixels or so. I don't have a numpad so I can't use the mouse keypad thing.
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Is it possible to make mouse movement work on arrow keys?

18 Sep 2018, 00:58

Try this:

Code: Select all

+#^!Up::    move_Mouse("Up")        ; Shift+Win+Ctrl+Alt + up arrow
+#^!Down::  move_Mouse("Down")      ; Shift+Win+Ctrl+Alt + down arrow
+#^!Left::  move_Mouse("Left")      ; Shift+Win+Ctrl+Alt + left arrow
+#^!Right:: move_Mouse("Right")     ; Shift+Win+Ctrl+Alt + right arrow



;-------------------------------------------------------------------------------
move_Mouse(Arrow) { ; move mouse by one pixel
;-------------------------------------------------------------------------------
    IfEqual,      Arrow, Up,    MouseMove,  0,-1,, R
    Else IfEqual, Arrow, Down,  MouseMove,  0, 1,, R
    Else IfEqual, Arrow, Left,  MouseMove, -1, 0,, R
    Else IfEqual, Arrow, Right, MouseMove,  1, 0,, R
}
I hope that helps.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 368 guests