AutoHotKey脚本SendInput

时间:2016-11-27 16:30:19

标签: autohotkey sendinput

我正在尝试使用AutoHotKey编写一个小脚本来替换键来更改我的键盘布局。它应该像这样工作:

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

除了:=Ö之外,所有键都有效,这将导致:=:

我是否正确使用了$和{Raw}?

我希望我的帖子不会太混乱。 ; - )



    #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

1 个答案:

答案 0 :(得分:1)

如果有人有类似的问题,这里有一个解决方案:$ +; :: +表示移位键。转移和; =: