Wednesday, May 29, 2024

AHK实现用快捷键快速切换输入法

 !1::
SwitchIME(00000804)
return

!2::
SwitchIME(0x04090409)
return

SwitchIME(dwLayout){
    HKL:=DllCall("LoadKeyboardLayout", Str, dwLayout, UInt, 1)
    ControlGetFocus,ctl,A
    SendMessage,0x50,0,HKL,%ctl%,A
}

No comments: