AutoHotkey 的三個組合鍵

AutoHotkey 的三個組合鍵

我發現如何重新映射大寫鎖定S到別的東西:CapsLock &:: ...

但是我怎麼才能擁有像這樣的三個鍵的組合控制鍵,丙氨酸轉氨酶S

答案1

據官方介紹AutoHotKey 滑鼠、操縱桿和鍵盤快捷鍵文件:

^!s::Send foo

但請注意,這僅適用於多個修飾鍵(控制鍵,轉移,替代)。關於「其他」三個組合鍵,文件目前指出:

不支援三個或更多鍵的組合。通常可以使用 #If 和 GetKeyState 檢測鍵盤硬體支援的組合,但結果可能不一致。

接下來給出瞭如何完成最後一部分的範例:

; Press AppsKey and Alt in any order, then slash (/).
#if GetKeyState("AppsKey", "P")
Alt & /::MsgBox Hotkey activated.

; If the keys are swapped, Alt must be pressed first (use one at a time):
#if GetKeyState("Alt", "P")
AppsKey & /::MsgBox Hotkey activated.

; [ & ] & \::
#if GetKeyState("[") && GetKeyState("]")
\::MsgBox

相關內容