I’m always amazed when I see someone who considers themselves a Macintosh power user not using a macro utility like Keyboard Maestro. After all, computers excel at performing boring, repetitive, and tedious tasks perfectly each time, and do so far faster than we could do them ourselves manually. Don’t assume that such automation requires programming, though, at least beyond the most obvious of levels in which you tell the computer to perform Action A, followed by Action B, and so on.
In fact, many of my macros are utterly simple and obvious — I could type “cheers... -Adam” at the end of every email message I send, or I could press Control-period. Just because I’m saving only a few seconds doesn’t mean that it’s not worthwhile, when added up over tens of thousands of messages. Similarly, as much as I love LaunchBar, opening BBEdit with the F1 key triggering a Keyboard Maestro macro is a third of the work of LaunchBar’s Command-Space, B, Return. Those infinitesimal bits of time are like the energy drain from glowing lights on otherwise inactive electronics — meaningless in the individual instance, but vast in their overall impact.
Other macros do non-trivial bits of work for me and tie together multiple programs, often in ways that aren’t possible with AppleScript or Automator. For instance, one macro expertly alternates between simulating Tab and Command-C in Firefox to copy specific fields from a Web page used to build pages on the Take Control site. Another macro juggles that copied text and pastes it into the associated fields in the iTunes Producer app for submission to the iBookstore. It’s just copying and pasting between two apps, but Keyboard Maestro turns an annoying and error-prone task into an entirely accurate set of steps that takes only seconds.
So, point one: Keyboard Maestro rocks, and if you’re not using it, I can guarantee you’re wasting time (Keyboard Maestro even estimates how much time you’re saving — I’m up to 880 hours since the calculation appeared in 2008). Point two: Keyboard Maestro 6.0 is now out for OS X 10.8 Mountain Lion, and Peter Lewis of Stairways Software has added a cornucopia of welcome new features, some of which simply make Keyboard Maestro easier to use, whereas others extend its capabilities.
More Powerful -- Here’s where the macro rubber meets the road — Keyboard Maestro’s triggers and actions. In short, an action is something Keyboard Maestro can do (type text, switch applications, change the sound volume), and you combine actions together into macros. You invoke them with triggers, the most common of which is the simple hotkey trigger composed of a normal key plus one or more of the Command, Control, Option, and Shift modifier keys. Keyboard Maestro has around 200 actions and 16 triggers, and version 6 introduces important new entries for both.
There are four new triggers that will have long-time Keyboard Maestro users immediately pondering new possibilities. You can now invoke macros when a USB device is attached or detached — imagine having certain software launch when you turn on your scanner or plug in a Garmin GPS. And what about when a wireless network is connected or disconnected? That trigger lets you detect location changes, so when you connect to your office network, Keyboard Maestro automatically sets your network location (a new action!) and mounts the shared file server. Other new triggers can fire macros when a volume is mounted or unmounted and at the launch of Keyboard Maestro’s background engine process.
In terms of actions, new ones include the capability to show a menu, search through a variable or named clipboard using regular expressions, copy named clipboards, display notifications in Notification Center, access keychain passwords, sleep and wake screens, and more. If there’s an action you want that’s not available, you (or someone with scripting skills) can create it as a Plug In Action, which is basically an AppleScript or shell script. Previously, Keyboard Maestro has let you embed AppleScript or shell scripts in macros, but Plug In Actions are more powerful and convenient, and can be contributed back to the community.
I mentioned named clipboards briefly a moment ago, which might have been confusing unless you know that Keyboard Maestro is also a powerful multiple-clipboard utility, and it enables you to create and work with named clipboards that don’t lose their contents as soon as something new is copied, as does the main system clipboard. I adore Keyboard Maestro’s clipboard history, which lets me go back in time to access data that I copied previously, and I’ve even made a macro that simply pastes the second-to-last item on the clipboard, since I find I often need not just the last thing I copied, but the thing before that. Keyboard Maestro 6 extends clipboard functionality largely in terms of supporting styled text, which is now preserved when working with clipboard contents.
Easier to Use -- The hardest part of building complex macros is working your way through each step, making sure it does the right thing (you can have Keyboard Maestro record your actions, but it tends to rely too heavily on brittle mouse clicks and keystrokes). New in Keyboard Maestro 6 is a macro debugger — choose Start Debugging from the Keyboard Maestro menu bar icon — that enables you to step through your entire macro, one action at a time. That’s huge, and was something I used a lot while creating Automator workflows, but missed until now in Keyboard Maestro. There are also debugger actions that can be worked into macros as you’re feeling your way into building them.
When you become dependent on your Keyboard Maestro macros, there’s nothing more annoying than using a system that doesn’t support them (the lack of my Control-period signature nags me whenever I use the Chromebook Pixel to write email — alas, Chrome OS has nothing comparable to Keyboard Maestro). And even on my MacBook Air, having my macros out of sync causes frustration, so I’m particularly happy that Keyboard Maestro 6 adds macro
syncing via Dropbox (or any other file-sharing service that can make a single file available to multiple Macs). I put mine in
~/Dropbox/Application Support/Keyboard Maestro to match BBEdit’s use of an Application Support folder in Dropbox. Macro syncing is trivial to turn on — just select Sync Macros in the General pane of Keyboard Maestro’s Preferences window, and then choose either to create a new sync file (which you’d do from your main Mac) or open an existing one, overwriting any previous macros (which you’d do from a secondary Mac). After that, it just works, with changes on either automatically reflected in both places.
Another pain point for heavy Keyboard Maestro users is coming up with memorable hotkey triggers. It’s all too easy to have Control-C, and Command-Control-C, and Command-Control-Option-C, and so on. Keyboard Maestro 6 addresses this with the new Trigger by Name palette, and with an improved Conflict palette. For the former, just press a hotkey (it’s just another macro) and Keyboard Maestro displays a palette with a text entry field. Type a few characters and Keyboard Maestro shows just the macros whose names match. Select one and press Return to activate it. It’s a little like LaunchBar, without the learned abbreviations. (That’s a good idea for a future version of LaunchBar — invoking Keyboard Maestro macros!) The Conflict palette works similarly — assign the same hotkey trigger to multiple macros and when you invoke it, the Conflict palette lets you filter the list by pressing highlighted keys and then executes either the last one showing or one you click.
Finally, Keyboard Maestro 6 offers several aesthetic improvements. Most notably, a new Icon Chooser (available from Window > Icon Chooser while viewing the Keyboard Maestro Editor window) lets you pick and create new icons for macros and macro groups. It’s almost overkill for a utility you interact with visually so infrequently, though the icons do appear in the Keyboard Maestro Editor and in all palettes (apart from the built-in palettes discussed just above, you can create macros that are invoked only by a click in a custom floating palette). Especially clever is the way you can create your own icons by choosing a shape and embedding some text or an emoji picture in it. One last note — for those using Retina display-equipped Macs, Keyboard Maestro now has Retina-friendly graphics, but even Peter Lewis likens Retina support in Keyboard Maestro to putting lipstick on a pig.
Give It a Try -- Seriously, there are few programs I recommend as strongly as I do Keyboard Maestro, because nearly every Mac user I’ve ever watched could use it. I know not everyone is as concerned about speed and efficiency as I am, much as it pains me to say that, but along with the satisfaction of knowing that I’m not wasting time working for my Mac, there’s a certain joy in feeling as though I’m conducting an orchestra of apps, with the overall macro performance being greater than the sum of each mundane action.
So give Keyboard Maestro a try, if you can think of anything you do that seems tiresome or unnecessary. Even one of our staff members, who shall remain nameless, immediately installed Keyboard Maestro 6 after Tonya mentioned in our internal discussion that she had made macros for accepting changes in a selection in Pages, for creating a new comment and arrowing down to avoid deleting the timestamp, and for inserting a new comment with boilerplate text that reminds her to return to that spot later. You undoubtedly won’t want the same macros we do, but if any of the examples I’ve strewn throughout this article resonate with you, perhaps Keyboard Maestro can earn a spot on your hard disk as well.
There’s a demo version of Keyboard Maestro you can test out, and if you decide to buy, new copies are only $36 (with 20 percent off for TidBITS members), and you can use it on up to five of your own Macs. Upgrades from copies of Keyboard Maestro 5 purchased after 1 October 2012 are free; if you purchased before October 2012, the upgrade costs $18 through 31 July 2013 and $25 after that. Upgrades from previous versions of Keyboard Maestro are all $25. Because Apple’s sandboxing requirements would render Keyboard Maestro powerless, it isn’t available in the Mac App Store, but before Apple got all retentive about such things, it was, and if you purchased Keyboard Maestro 5 through the Mac App Store, you can convert to a direct license and upgrade by clicking the Mac App Store Version text in Keyboard Maestro’s About dialog. Keyboard Maestro 6 does require OS X 10.8 Mountain Lion; older versions remain available and version 6 licenses work with version 5.
[Disclaimer: I designed the Mac EPUB reader Bookle with Peter Lewis of Stairways Software, and although we share in the proceeds from that program, I have no financial interest in any other Stairways applications, including Keyboard Maestro. Peter’s need to focus on Keyboard Maestro stalled further work on Bookle; if anyone knows of a developer interested in taking over Bookle development, let me know. -Adam]