Skip to content

Instantly share code, notes, and snippets.

@FR073N
Last active August 29, 2015 14:02
Show Gist options
  • Save FR073N/670cddcd0d4a8379b62f to your computer and use it in GitHub Desktop.
Save FR073N/670cddcd0d4a8379b62f to your computer and use it in GitHub Desktop.
Special char keyboard shortcuts (ñ, ş, ı...) - AutoHotkey
#Hotstring ?*c
::^^S::
SendUnicodeChar(0x015E)
Return
::^^s::
SendUnicodeChar(0x015F)
Return
::^^i::
SendUnicodeChar(0x131)
Return
::^^I::
SendUnicodeChar(0x130)
Return
::^^g::
SendUnicodeChar(0x011F)
Return
::^^G::
SendUnicodeChar(0x011E)
Return
::^^n::
SendUnicodeChar(0x00F1)
Return
::^^N::
SendUnicodeChar(0x00D1)
Return
::^^c::
SendUnicodeChar(0x00E7)
Return
::^^C::
SendUnicodeChar(0x00C7)
Return
::^^u::
SendUnicodeChar(0x00FC)
Return
::^^U::
SendUnicodeChar(0x00DC)
Return
::^^o::
SendUnicodeChar(0x00F6)
Return
::^^O::
SendUnicodeChar(0x00D6)
Return
; Find the corresponding letter from the unicode
; and send the input back
SendUnicodeChar(charCode)
{
VarSetCapacity(ki, 28 * 2, 0)
EncodeInteger(&ki + 0, 1)
EncodeInteger(&ki + 6, charCode)
EncodeInteger(&ki + 8, 4)
EncodeInteger(&ki +28, 1)
EncodeInteger(&ki +34, charCode)
EncodeInteger(&ki +36, 4|2)
DllCall("SendInput", "UInt", 2, "UInt", &ki, "Int", 28)
}
EncodeInteger(ref, val)
{
DllCall("ntdll\RtlFillMemoryUlong", "Uint", ref, "Uint", 4, "Uint", val)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment