Accents.ahk

#Windows #AutoHotkey

This AutoHotkey script improves the way Windows inserts accents to be more MacOS-like. I don't like the way the International keyboard handles, so I wrote this script.

Press the right Shift key with one of the letters a,c,e,i,n,o,u to get those characters with commonly used accent or alternative characters. The left Shift key will capitalize as normal. The Control key can also be used for other characters.

And so on.

; Accent keys, used with Right Shift key
RShift & 4::Send {€}
return

RShift & A::
    If GetKeyState("LShift", "P")
        Send {Á}
	Else Send {á}
return

RShift & C::
	If GetKeyState("LShift", "P")
		Send {Ç}
	Else Send {ç}
return

RShift & E::
	If GetKeyState("LShift", "P")
		Send {É}
	Else Send {é}
return

RShift & I::
	If GetKeyState("LShift", "P")
		Send {Í}
	Else Send {í}
return

RShift & N::
	If GetKeyState("LShift", "P")
		Send {Ñ}
	Else Send {ñ}
return

RShift & O::
	If GetKeyState("LShift", "P")
		If GetKeyState("Control", "P")
			Send {Ö}
		Else Send {Ó}

	Else If GetKeyState("Control", "P")
			Send {ö}
		Else Send {ó}
return

RShift & U::
	If GetKeyState("LShift", "P")
		If GetKeyState("Control", "P")
			Send {Ü}
		Else Send {Ú}
	Else If GetKeyState("Control", "P")
			Send {ü}
		Else Send {ú}
return

RShift & ?::Send {¿}
return