Automating your Mac with Keyboard Maestro

Automating your Mac with Keyboard Maestro

Keyboard Maestro
Keyboard Maestro

As regular readers will know, I’m a big fan of automation; specifically I’m a fan of automating my computer to streamline my workflows for efficiency. One of the newer tools I’m using on my Mac is Keyboard Maestro.

I’d originally used KM years ago and gave it up because of its then-limited functionality. It automated a few of the interface functions of particular software, but I couldn’t fit it in my way of working. But after hearing a recent episode of the Mac Power Users podcast in which they talked about all that KM could do today, I determined to give another try. I’m glad I did.

At it’s essence, KM waits for a particular condition to occur, or trigger and then takes an action or series of actions and this combination of trigger and action is called a macro.

The variety of possible triggers is astonishing.

  • Hot Key: for example, ⌘A
  • String of text: for example, any time you type, “Dom is awesome”.
  • A specific application launches, quits, is brought to the front
  • When you login or logout
  • When the computer wakes
  • On a timer or at a specific time
  • When a volume (hard disk, USB stick, CD/DVD, network drive, etc.) is mounted or unmounted
  • When a particular USB device is connected (or powered up) or disconnected (or powered down)
  • When connecting to a particular WiFi network
  • Even if you play a particular key on a MIDI keyboard
  • And more!

The variety of actions is even more impressive and I won’t go into all of them because it would take too much space. It would be better to give examples of the macros I’ve created. But first, to round out the basic feature set, KM makes it easy for you to share and get new macros from others. You can export and import individual macros or a whole macro library, which is a brilliant marketing move on Stairways Software’s part because it has created a rabid community of online users finding ever more amazing ways to use their product.

Examples

My personal macros range from the simple to the complex. One of the simplest is a macro that is triggered at the same time each morning to eject all my hard drives connected to my MacBook Pro before I leave for work. I have several drives for backups, clones, and network storage and it can be time consuming selecting each one and ejecting it and waiting for the computer to do its thing. Instead, about 15 minutes before I need to leave, the computer takes care of this for me. Likewise, at work, near the end of the day, all the drives I have there are automatically ejected.

I call another macro “Hotspot mode”. When I’m away from home or the office and I want to connect to the Internet through the hotpost feature of my phone, I don’t want to waste my data allowances on data transfers that can wait, like Backblaze backups, Dropbox updates, and the like. So I have a macro that detects when I connect to the wireless network called iPhone and then quits Dropbox, Tweetbot, Creative Cloud, Amazon Cloud Drive, Google Drive, Transporter Desktop, and Backblaze. Then when the wireless network is disconnected, it restarts them all up again.

Another simple macro detects when my document scanner is turned on and then launches the scanner software. It quits the software when the scanner is turned off. Another detects when I’ve connected to the wireless network in the radio studio and mutes my Mac. There’s one that appends whatever I have selected anywhere on my computer into the currently selected Evernote note, very useful when I’m doing research.

I often use two different browsers, Safari and Chrome, and would like to see the current page in the other browser. I hit a keystroke combination and the currently open web page opens in the other browser.

Sometimes applications hide useful functions deep in the menus without keyboard shortcuts. KM lets me quickly create shortcuts. And if I’d like to combine the function of two different menu items, I can create a macro that does that.

Another useful aspect is that you can limit macros to only activate inside certain applications so you can use one key combination in, say, Mail, and the same combination in Safari to do two different things. It’s really very flexible and powerful you’re mainly limited by your imagination.

Resources

There are some very active communities of Keyboard Maestro users online. The first is KM’s own official Yahoo group, but my preferred is the slightly broader focused Mac Automator community on Google+. If you have questions or an idea, post it there and you’re sure to get some help or encouragement.

Keyboard Maestro is a powerful tool and it can be a bit confusing to learn at first. Don McAllister offers a screencast video that walks you through the interface and shows the basics of how to create a macro. Or you can find several more videos by others on YouTube as well.

Share:FacebookX
2 comments
  • I have been tempted to get this because of the Mac Power Users show. If I used a laptop between home and work it would be a no brainer, but use desktop macs at both locations. Still it sounds like something I would enjoy, but the price keeps it from being an impulse buy.

    Still I am am to cobble together some of the features with other programs, just not as elegant.

    One thing I have been using is a Hyper Key where you override the caps lock key to make keyboard shortcuts. This is pretty awesome. The steps required in Bratt Terpstra post using various freeware is involved, but worthwhile. http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/

    • Oh yeah, I’ve been using the Hyper Key trick along with Keyboard Maestro. Now I use Hyper-O to create a new Omnifocus task, Hyper-C to open the current Safari tab in Chrome, Hyper-S to open the current Chrome tab in Safari, and Hyper-5 to bring up Skitch and activate crosshair screenshot mode. Terprstra is kind of a genius with this stuff.

Archives

Categories