AutoHotkey script triggered by Shift + g + AppsKey

397 views Asked by At

I want to trigger a script by pressing Shift + g + AppsKey at the same time. I tried

AppsKey & +g::

and

AppsKey & + & g

but both don't seem to work.

AppsKey & g

works but doesn't require the shift key. How do I include the shift key into the hotkey?

2

There are 2 answers

0
fri On BEST ANSWER

You're trying to make a three-key combination, which isn't supported by this short syntax. Making such a hotkey requires an additional if-statement.

You need to choose two keys that will enter the function, let's say Apps+g, and then use GetKeyState for the third key. So, the solution is as follows:

AppsKey & G::
    If GetKeyState("Shift", "P")
        Send hello
return
2
phil294 On

Alternative:

#if GetKeyState("Shift")
~a & b::msgbox
#if