Using the following statement,
F1 & F9:: Msgbox, Got F1+F9
I can successfully use F1 as a prefix hotkey, quite a useful feature. However, I quickly find that Ctrl+F1, Shift+F1 etc lose their functionality, i.e. application cannot detect them.
I tried to add a tilde,
~F1 & F9:: Msgbox, Got F1+F9
but this always trigger F1 for application before I have the chance to press F9 -- not what I want.
How to achieve the desired result?
BTW: I can totally accept the minor side effect of firing F1, Ctrl+F1 or Shift+F1 when F1 is released.
Autohotkey 1.1.13.1
Answer
I figure it out myself.
F1 & F9:: MsgBox, F1+F9
*F1 up:: Send {Blind}{F1 down}{F1 up}
The {Blind}
is important. Without it, pressing Shift+F1 will(may) cause application to get only F1. In my actual case, my application is EmEditor v14, and I have successfully achieve:
- F1+F9 or F1+F10 to quickly switch between first row tabs.
- F2+F9 or F2+F10 to quickly switch between second row tabs.
- F3+F9 or F3+F10 to quickly switch between third row tabs.
- F4+F9 or F4+F10 to quickly switch between fourth row tabs.
- use **F5+...* if desired
I do this because EmEditor, although great at many other aspects, does not provide a quick way to switch document tabs by keyboard.
If you're interested, I can post my whole script later, about 30 lines.
No comments:
Post a Comment