Here is what it takes:

First, here is a reminder of required actions to use the task switcher in a normal environment (ie with a simple keyboard)
- Press and hold the Windows key
Press the Tab key and release it. (this must be done once for each window you want to skip, while still holding the Windows Key)
Release the Windows key to activate selected window.
If you do, it presses Win key again (for the system, it is already down, so it doesn't matter), and press the Tab key again.
If you don't, it will release the Windows key, and the system will activate the chosen window.
So in shorter version:
Press the event button as many times you want. When the right window is selected, wait for 2 seconds, and Windows will activate that window.
Here is the code:
Code: Select all
<Folder Name="Win7 Task switcher" Expanded="True">
<Folder Name="Init switcher" Expanded="True">
<Macro Name="Script Python" id="852" Expanded="True">
<Event Name="PS3.Button.PS" />
<Action Name="Add your event here">
EventGhost.Comment()
</Action>
<Action>
EventGhost.PythonScript(u'import win32api\nwin32api.keybd_event(0x5b,0,0,0)\nwin32api.keybd_event(9,0,0,0)\nwin32api.keybd_event(9,0,2,0)\n')
</Action>
<Action>
EventGhost.JumpIfDoubleEvent(2.0, XmlIdLink(852))
</Action>
<Action>
EventGhost.TriggerEvent(u'TaskSwitch.end', 0.0)
</Action>
</Macro>
</Folder>
<Folder Name="End switcher" Expanded="True">
<Macro Name="Script Python" Expanded="True">
<Event Name="TaskSwitch.end" />
<Action>
EventGhost.PythonScript(u'import win32api\nwin32api.keybd_event(0x5b,0,2,0)\n')
</Action>
</Macro>
</Folder>
</Folder>
- The second comment in the sceenshot say nothing. I removed it in code above.
- PS3.Button.PS is the event i chose to use. Replace with whatever you want.
- This whole script refer to an item with id 852. If your current config already use this ID, search and replace 852 with something else.
- This will only work in one way, eg you can't go back to previous window with the approach i used. I guess it could be done, but it's beyond my current abilities (used EventGhost for about a week now)
- French fries are actually Belgian, not French. Deal with it.