OS X includes all kinds of tools to help speed up your Mac's workflow — scripting, keyboard shortcuts, and Automator among them. But the venerable utility Keyboard Maestro can be more useful, in more different ways, than any of those built-in tools.
Keyboard Maestro is a strange beast. At first glance, many people think it's just a more advanced version of OS X's built-in text replacements, a competitor to TextExpander and Typinator. But if you dig just a bit deeper, you'll find it's really more of an alternative to automation tools like Applescript or Automator, with the ability to launch all kinds of actions with a variety of triggers (not just from the keyboard).
In concept, the app is pretty simple: You pick a triggering event and set one or more actions that will take effect when triggered. Those actions can be as simple as opening a particular app or inserting some text when a key combination is pressed — but that would hardly make the app worth its $36 price tag. Where Keyboard Maestro really earns its keep is when you use triggers other than keyboard shortcuts (there are 16 different types), and when you define actions conditionally, so the action taken depends on specific circumstances.
I've come up with eight examples of the kind of non-obvious things Keyboard Maestro can do, which beginners to the app often overlook or don't imagine. It's not a complete list by any stretch, but it'll give you an idea of what the app can do.
Open an app when inserting a USB device
Whenever you connect a specific USB accessory to your Mac, Keyboard Maestro can detect it and do whatever you want as a consequence.
To start, create a new macro (use the Global macro group so it will work in any app). Choose USB Device Trigger from the list of available triggers, and select This USB device. Plug the device in question in and Keyboard Maestro should automatically add its name to the device name field.
The action could depend on the type of device you're dealing with.
So, for example, you could create a macro that launches your scanner software whenever you plug in the scanner. Follow the steps above and click on New Action at the bottom of the new entry. Pick Open, then Open a File, Folder or Application from the action selection interface, and locate your scanner app.
Or, if you regularly back up your Mac using a disk-cloning app like Carbon Copy Cloner or Superduper!, you could set Keyboard Maestro to launch that app when you insert your clone disk, and even set it to start the cloning.
Sign up for Computerworld eNewsletters.