I want to map meh+i onto alt+tab in windows. (The meh-key is the combination alt+shift+ctrl).
Is this possible with Autohotkey v2?
Remarks:
As I understand the documentation, this is not possible using the
AltTab
action, as only 2-key-combinations can be mapped onto that action. Correct me if I'm wrong.This means, I need to build this the old way, simulating key presses and waiting for keys to be lifted, is that correct?
I found this old thread, and I've adapted it to what I assume is the correct syntax for v2:
#!^i:: { Send "{ALT DOWN}{TAB}" ; If i is down it invokes the menu for switching windows. KeyWait "i" ; Show menu for switching windows by keeping ALT down until user physically releases i. Send "{ALT UP}" ; If i is released release ALT key } return
However, this only works for "one press"; repeated presses of
i
do not move the selected window further.
I assume I have to build-in some loop that waits for a repeated press of the i
key, and that drops out of the loop as soon as any of the modifiers is released.
(Why want to do this remapping at all? I use meh+key for window management operations: move a window around, move focus to another window, move to another desktop, etc. Alt-tab belongs in that group, so I want to have the same "prefix" as the other operations.)