I am trying to simulate mouse movement with my keyboard. I can move in the xy plane one direction at a time but now I need diagonal movement, e.g. holding down shift + w + d moves upright. I would prefer answers that can address the problem of triggering multiple hotkeys simultaneously in general since this is something I would like to implement in other scripts.
#NoEnv
SetWorkingDir %A_ScriptDir%
#SingleInstance Force
#NoTrayIcon
SendMode Input
SetDefaultMouseSpeed, 0
;Variables
taskbar_height := 630
effective_screen_height := A_ScreenHeight - taskbar_height
x_movement := 0.03*A_ScreenWidth
y_movement := 0.05*effective_screen_height
;Mouse
+a::MouseMove, -%x_movement%, 0,, R
+d::MouseMove, %x_movement%, 0,, R
+w::MouseMove, 0, -%y_movement%,, R
+s::MouseMove, 0, %y_movement%,, R
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…