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

本文介绍了一种利用AutoHotkey脚本将Caps Lock键重新映射为切换输入法的方法,使得用户可以在英文和中文输入法之间快速切换。此外,还提供了Shift+Caps Lock组合键用于切换大小写锁定状态的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值