 	setKeysRight( "HJKL" )
 	return
 
+MenuAccelerate:
+	toggleAccelerate()
+	return

; Move the mouse the specifed x and y distances, both scaled by the
; mouse acceleration factor calculated from the key repeat count.
Move( x, y ) {
	global repeat
	++repeat
	factor := Floor( ( repeat + 1 ) / 2 )
	x := x * factor
	y := y * factor
	MouseMove, x, y, 0, R



; Read a string value from our settings registry key, or return otherwise if not present
RegReadValue( name, otherwise ) {
	global regKeySettings
	value := ""
	RegRead, value, HKCU, %regKeySettings%, %name%
	if( ErrorLevel )
		return %otherwise%
	return %value%
}

; Write a dword value to our settings registry key
RegWriteDword( name, value ) {
	RegWriteValue( name, value, "REG_DWORD" )
}

; Write a string value to our settings registry key
RegWriteString( name, value ) {
	RegWriteValue( name, value, "REG_SZ" )
}

; Write a value of a specific type to our settings registry key
RegWriteValue( name, value, type ) {
	global regKeySettings
	RegWrite, %type%, HKCU, %regKeySettings%, %name%, %value%
}

; TODO: refactor SetKeysLeft() and SetKeysRight()!
