capsLock key to toggle between input methods [in windows] [with autohotkey]

key words: autohotkey, input method, capsLock key.


In windows, one may be using ctrl + space keys or win + space keys to toggle between English input method and Chinese input method. It’s, somehow, a labored work finding the win key with my little finger or moving away my left hand and pressing the win key with my index finger.
Here is an easier way to achieve the goal, toggling between your input methods. Using capsLock key instead, for it’s a rarely used key. To configure this on your computer, you just need to install autohotkey on you computer and deploy a short transcript. The transcript could be like this:

; CapsLock key to switch input method
CapsLock::
    Send, #{Space}
    return

; shift key + capslock key to toggle capslock
$+Capslock::
    SetCapsLockState % getkeystate("Capslock", "t") ? "off" : "on"
    return

; you may prefer to use pause key as substitution for capsLock key.
Pause::
    SetCapsLockState % getkeystate("Capslock", "t") ? "off" : "on"
    return

To deploy this on your computer, copy this code to a text file and rename the file as transcript.ahk. If you have installed autohotkey, the software, double click the ahk file. Now, you’re ready to go.

key(s)feature
capsLocktoggle between input methods.
shift + capsLocktoggle between capital on/off.
pausetoggle between capital on/off.

posted on 2017-10-25 10:08  yusisc  阅读(32)  评论(0编辑  收藏  举报

导航