Using Autohotkey to move the camera in games without keyboard camera support Home

I was playing the recently released demo of Trials of Mana / Seiken Densetsu 3 Remake (for a funny review of the original, go here) and liking it splendidly, except for the camera controls. Those are restricted to the mouse movement with no option for customization. I like to play with both hands on the keyboard and to use the arrow keys for character movement, leaving WASD for camera instead. I tried a compromise using Windows Accessibility options but it's incompatible with the game. My last resort was a custom script in AutoHotKey to move the mouse with the keyboard, thus simulating keyboard camera controls. You can find the script below. It also works in The Elder Scrolls Online (ESO) - though I wouldn't recommend using it in online games.

Key assignments: it uses Delete/PageDown/Home/End as Left/Right/Up/Down camera. Alt+Ctrl+Shift+F2 to toggle the script on/off with sound feedback (for times when the Delete key is needed), and Alt+Ctrl+Shift+F3 to reload the script in case you are testing. You can customize your keys and other parameters changing the CONFIG_* lines. If you feel there's too much delay to when the camera starts responding, run "main.cpl @1" and reduce the keystroke repeat delay (affects all applications).

; --------------- YOUR CONFIG ---------------- ;

; reduce keystroke repeat delay with "main.cpl @1"

CONFIG_ACTIVE:=true
CONFIG_SPEED:=5

Hotkey, IfWinActive, Trials of Mana
CONFIG_TOGGLE_KEY    := "!+^F2"
CONFIG_CAMERA_LEFT   := "Del"
CONFIG_CAMERA_RIGHT  := "PgDn"
CONFIG_CAMERA_UP     := "Home"
CONFIG_CAMERA_DOWN   := "End"
CONFIG_CAMERA_LEFT2  := CONFIG_CAMERA_LEFT
CONFIG_CAMERA_RIGHT2 := CONFIG_CAMERA_RIGHT
CONFIG_CAMERA_UP2    := CONFIG_CAMERA_UP
CONFIG_CAMERA_DOWN2  := CONFIG_CAMERA_DOWN

; ------------------- CODE ------------------- ;
AutoHotKeyParameters()
HotKey % CONFIG_TOGGLE_KEY, DO_TOGGLE_KEY
HotKey % CONFIG_CAMERA_LEFT  , DO_CAMERA_LEFT 
HotKey % CONFIG_CAMERA_RIGHT , DO_CAMERA_RIGHT
HotKey % CONFIG_CAMERA_UP    , DO_CAMERA_UP    
HotKey % CONFIG_CAMERA_DOWN  , DO_CAMERA_DOWN 
HotKey % CONFIG_CAMERA_LEFT2  , DO_CAMERA_LEFT 
HotKey % CONFIG_CAMERA_RIGHT2 , DO_CAMERA_RIGHT
HotKey % CONFIG_CAMERA_UP2    , DO_CAMERA_UP    
HotKey % CONFIG_CAMERA_DOWN2  , DO_CAMERA_DOWN 
return

AutoHotKeyParameters()
{
	HotKey, !+^F3, DO_RELOAD_KEY
	CoordMode, Mouse, Client
	SendMode Input
	SetMouseDelay, -1, -1
	SetKeyDelay, -1, -1
	SetControlDelay, -1
	SetWinDelay, -1
	SetDefaultMouseSpeed, 0
}


	
DO_TOGGLE_KEY:
	CONFIG_ACTIVE:=!CONFIG_ACTIVE
	if (CONFIG_ACTIVE)
	{
		HotKey % CONFIG_CAMERA_LEFT  , On
		HotKey % CONFIG_CAMERA_RIGHT , On
		HotKey % CONFIG_CAMERA_UP    , On
		HotKey % CONFIG_CAMERA_DOWN  , On
		HotKey % CONFIG_CAMERA_LEFT2  , On
		HotKey % CONFIG_CAMERA_RIGHT2 , On
		HotKey % CONFIG_CAMERA_UP2    , On
		HotKey % CONFIG_CAMERA_DOWN2  , On
		SoundPlay, %A_WinDir%\Media\notify.wav, WAIT
	}
	else
	{
		HotKey % CONFIG_CAMERA_LEFT  , Off
		HotKey % CONFIG_CAMERA_RIGHT , Off
		HotKey % CONFIG_CAMERA_UP    , Off
		HotKey % CONFIG_CAMERA_DOWN  , Off
		HotKey % CONFIG_CAMERA_LEFT2  , Off
		HotKey % CONFIG_CAMERA_RIGHT2 , Off
		HotKey % CONFIG_CAMERA_UP2    , Off
		HotKey % CONFIG_CAMERA_DOWN2  , Off
		SoundPlay, %A_WinDir%\Media\chord.wav, WAIT
	}
	return

DO_RELOAD_KEY:
	reload
	return

DO_CAMERA_LEFT:
	MouseGetPos, cx, cy
	WinGetPos, , , winx, winy
	if (cx=0) 
		DllCall("SetCursorPos", Int, A_ScreenWidth/2, Int, A_ScreenHeight/2)
	else 
		MouseMove, 2*-CONFIG_SPEED, 0, 0, R
	return

DO_CAMERA_RIGHT:
	MouseGetPos, cx, cy
	WinGetPos, , , winx, winy
	if (cx>(winx*0.90)) 
		DllCall("SetCursorPos", Int, A_ScreenWidth/2, Int, A_ScreenHeight/2)
	else 
		MouseMove, 2*CONFIG_SPEED, 0, 0, R
	return

DO_CAMERA_UP:
	MouseGetPos, cx, cy
	WinGetPos, , , winx, winy
	if (cy=0) 
		DllCall("SetCursorPos", Int, A_ScreenWidth/2, Int, A_ScreenHeight/2)
	else 
		MouseMove, 0, -CONFIG_SPEED, 0, R
	return

DO_CAMERA_DOWN:
	MouseGetPos, cx, cy
	WinGetPos, , , winx, winy
	if (cy>(winy*0.90)) 
		DllCall("SetCursorPos", Int, A_ScreenWidth/2, Int, A_ScreenHeight/2)
	else 
		MouseMove, 0, CONFIG_SPEED, 0, R
	return