Application Switcher #2

The goal of this example is to demonstrate how to use generic buttons to trigger the OS X Application Switcher. This assumes that the reader is familiar with the basics of creating Building Blocks as shown in the Detailed Tutorial.

The Application Switcher requires some interesting logic because of the unusual way that it reacts to the keyboard. The Application Switcher is initiated by pressing Command-Tab or Command-Shift-Tab on the keyboard to change to the next or previous application. While the Command key is held, the Application Switcher remains active. Moving the cursor to an application’s icon will highlight that application. When the Command key is finally released, the Application Switcher disappears and the new application becomes active.

ControllerMate’s building blocks can be used to configure a button to toggle the Application Switcher on and off. In order to do so, ControllerMate must be configured to generate a Command-Tab keystroke, and then hold the Command key but not the Tab key. One solution is to use one Keystrokes building block for the Command key and another for the Tab key, each must be configured differently.

The first Keystrokes block turns ON when the output of the Toggle building block turns ON. This building block presses the Command key and holds it. When the output of the Toggle block turns OFF, then the Command key will be released.


The second Keystrokes block presses and immediately releases the Tab key when it turns ON.


When taken all together, pressing Button #5 on the CH Pro Throttle USB once causes the Toggle block to turn ON. This toggle block turns ON the Keystrokes blocks which press the Command key, press the Tab key, and release the Tab key. While the Toggle block remains ON, the Command key remains pressed. When Button #5 is pressed again, the Toggle block turns OFF the Keystrokes blocks which releases the Command key.