Keyboard Keystroke

The goal of this example is to demonstrate how to use a generic button to trigger a single keyboard keystroke. This assumes that the reader is familiar with the basics of creating Building Blocks as shown in the Detailed Tutorial.

By default, the OS X built-in screenshot utility is triggered by pressing Command–Shift–3 on a keyboard. This utility creates an image containing the contents of the screen at the moment that it is triggered and saves the image to a file on the desktop.

To use ControllerMate to trigger this function from a generic button, two building blocks are needed: a Button building block that responds to the generic button, and a Single Key building block to generate the keystroke.

The Button building block in this example is configured to respond to Button #5 on a CH Products CH Pro Throttle USB. When the button is pressed, the output of the Button building block will turn ON. When the button is released, the output of the Button building block will turn OFF.

The Single Key building block is configured to generate the "3" key along with the "Command" and "Shift" modifier keys. While its input is ON, the building block will generate Command–Shift–3 on ControllerMate's virtual keyboard.

With building blocks configured in this manner, ControllerMate will trigger a screenshot when Button #5 on the CH Products CH Pro Throttle USB is pressed.