Search code examples
autohotkeysendinput

AutoHotKey script SendInput


I'm trying to write a small script with AutoHotKey that replaces keys to changes my keyboard layout. It is supposed to work like this:

[=ü
{=Ü
;=ö
:=Ö
'=ä
"=Ä
]='
}="
\=;
|=:

All keys work except the :=Ö which will result in :=:

Did i use the $ and {Raw} correctly?

I hope my post is not too confusing. ;-)



    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn  ; Enable warnings to assist with detecting common errors.
    SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

    $[::
        SendInput {Raw}ü
    Return
    ${::
        SendInput {Raw}Ü
    Return


    $;::
        SendInput {Raw}ö
    Return
    $:::
        SendInput {Raw}Ö
    Return


    $'::
        SendInput {Raw}ä
    Return
    $"::
        SendInput {Raw}Ä
    Return


    $]::
        SendInput {Raw}'
    Return
    $}::
        SendInput {Raw}"
    Return


    $\::
        SendInput {Raw};
    Return
    $|::
        SendInput {Raw}:
    Return


Solution

  • If anyone has a similar issue, here is a solution: $+;:: The + is for the shift key. Shift and ; = :