seedling

Plebeian Programming with Keyboard Maestro

How to write macros without touching the terminal

There are some of us who believe digital life should be lived through a series of keyboard shortcuts. There is nothing quite as satisfying as making one quick keyboard gesture and watching a whole cascade of events unfold before you. This is the definition of programmatic magic.

I’m not just talking about vanilla hotkeys like Cmd + S or Cmd + Q that save a file or quit an application.

Any hotkey that triggers a single action like copying text to your clipboard is equally capable of performing multiple actions in quick succession; opening a specific set of files, launching multiple applications, pasting a pre-written string of text, playing a particular song in Spotify, starting a countdown timer, and arranging your desktop windows just the way you want them.

Anything you can manually do on your machine with your two hands can be wrapped up into a programmatic sequence and performed by the machine without you touching it.

These sequences are called macros and you don’t need to know how to programme to create them. Programmatic plebs (like me) can build powerful automations without needing to write a bunch of BASH commands in the Terminal. Programmers traditionally write macro scripts in a language like Bash or Python using the Terminal – an application you already have on your machine that allows you to control your computer with text-based commands.

The exact kind of programming gibberish you will not be writing
The exact kind of programming gibberish you will not be writing

You do need a macro application with a user-friendly interface though. IMHO Keyboard Maestro is one of the best designed and easiest to use options. Now is the time to diclose that Keyboard Maestro have not paid, bribed, or manipulated me to write this post, and the link above is not an affiliate link. Doing this is all my choice as a KM enthusiast. It’s a Mac app (sorry Windows users) that allows you to visually compose small sequences of actions that you can easily trigger at any time.

The Keyboard Maestro main window
The Keyboard Maestro main window

There are alternative (Windows-compatible) macro applications that can do similar things: AutoHotKey , Automator , and Macro Recorder . However, I haven’t personally used these and will only be singing the praises of Keyboard Maestro from here on out.

This isn’t going to be a beginner’s guide to using Keyboard Maestro (hereafter known as KM), so I suggest you take a look at this YouTube playlist and this TutsPlus article series if that’s what you need. If you want to get extra intense about learning KM, David Sparks has created a very comprehensive course that covers everything under the macro sun. There is also an official wiki you can reference, but it throws you into the technical weeds a lot.

Rather than giving you I’m going to jump into the ways I use KM and the particular macros I find useful on a daily basis. By seeing some very tangible examples of what KM can do, perhaps you’ll be intruiged and get ideas for what you might want to automate.

Workflow Macros

One of the most basic groups of macros I rely on are what I call workflow macros.

Coming Soon

Feel free to bug me on Bluesky to finish writing this.

Triggers can of course be hotkeys, but you can also use certain times of day, trackpad gestures, or typed strings of text as triggers. You can also use computational events as triggers: your machine waking up, a certain application launching, or connecting to a certain wifi network.

These actions can do anything you can do through manual interaction on your machine – type text, copy/paste from the clipboard, open menus, click buttons, launch applications, navigate to websites. It’s a programmatic version of you that you write instructions for ahead of time.