M HYPE SPLASH
// general

Three Key combination for AutoHotkey

By Abigail Rogers

I found out how to remap Caps Lock and S to something else: CapsLock &:: ...

But how can I have a combination with three keys like CTRL, ALT and S?

1 Answer

Per the official AutoHotKey Mouse, Joystick and Keyboard Shortcuts documentation:

^!s::Send foo

Note, however, this only works with multiple modifier keys (Ctrl, Shift, Alt). Regarding "other" three key combinations, the documentation currently states:

Combinations of three or more keys are not supported. Combinations which your keyboard hardware supports can usually be detected by using #If and GetKeyState, but the results may be inconsistent.

It goes on to give this example of how this last part might be accomplished:

; 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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy