 	Menu, Tray, Uncheck, Left Hand: %keysLeft%
 	keysLeft := keys
 	Menu, Tray, Check, Left Hand: %keysLeft%
-	RegStringWrite( "KeysLeft", keysLeft )
+	RegWriteString( "KeysLeft", keysLeft )
 	ReloadAllKeys()
 }
 

Menu, Tray, Add, Right Hand: IJKL, MenuIJKL
Menu, Tray, Add, Right Hand: HJKL, MenuHJKL
Menu, Tray, Add
Menu, Tray, Add, About JKLmouse, MenuAbout
Menu, Tray, Add, JKLmouse Website, MenuWebsite

Menu, Tray, Check, Left Hand: %keysLeft%
Menu, Tray, Check, Right Hand: %keysRight%




; 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()!
