Autohotkey:需要Capslock for Hotstring

时间:2018-01-03 21:41:09

标签: autohotkey capslock

以下自动密钥代码

:*:\alpha::α

导致热字符串文本“\ alpha”被相应的UTF8字符“α”连续替换。

但是,始终启用此替换会非常烦人。所以我想通过CapsLock键激活它。那么只有在字符串组合之前紧接CapsLock键时,如何启用上述hotstring?

1 个答案:

答案 0 :(得分:3)

; The tilde prefix (~) prevents AHK from blocking key-down/up events.

~Capslock Up:: Send, {Capslock Up}


; The #If directive creates context-sensitive hotkeys and hotstrings:

#If (A_PriorHotkey = "~Capslock Up")

    :*:\alpha::α

#If

https://autohotkey.com/docs/commands/_If.htm