Reputation: 579
How can I use a hotkey that responds to pressing F24 & Shift D, for example? I want to press a function key (F#, not the key that is labeled "fn"), a modifier key, and a letter.
I am using a mouse with multiple side buttons; I'm using G Hub to send F24 when one of the mouse buttons is pressed. So I'm trying to have that mouse button act as another modifier key.
I'm able to do assign a hotkey with only F24 and a letter key. But I no matter what I try, I cannot do this with an added modifier key. When I try to run the script, I get the error "invalid key." I have tried this with the Shift key and with the Alt key, and neither will work.
This works:
F24 & D::MsgBox, hello
I've tried every alternat syntax shown in the documentation, but none of the following work.
F24 & {Alt} & D::MsgBox, hello
!{F42}D::
!{F42} & D::
F24 & ! & D::
{Alt} {F24} D::
F24 & +D::
Upvotes: 0
Views: 1017
Reputation: 6314
Combinations of 3 or more hotkeys are not supported as described in the documentation you can use #if
and GetKeyState
I don't know how are you generating F24 the following will work if you first press shift and then F12 and d if your keyboard generates F24 just replace F12 with F24
#if GetKeyState("Shift", "P")
F12 & d::MsgBox works
#If
Upvotes: 3