Opening contexts with keyboard maestro vs. Using spaces

I just read David’s blog post on his keyboard maestro webinar:

For some time now I’ve been trying to increasingly work with my technology in terms of contexts, not apps. I don’t want to open the Mail App to check email. Instead, I want to open the mail app to look at my legal inbox and nothing else. I don’t want to open Safari to a home page. Instead, I want to open Safari to the specific page on my learn.macsparky platform that lets me manage customer support issues.

This idea started for me on the iPhone and quickly found its way to the iPad, using Shortcuts. Over the last few months, I’ve implemented this context-based computing on my Mac and it’s glorious.

It then hit me that I’m already doing this but in a different way: I’m utilizing the Spaces / Desktop feature on Mac to achieve something similar. I have two category of apps:

  1. Apps that are assigned to all Desktops.
  2. Apps that are assigned to no Desktops (effectively meaning their windows will only show in one Desktop).

Then I use a combination of Magnet and Stay to keep a set of windows in the second category above across many desktops. So the contexts I need are always there when I need them. All I have to do is switch to the desktop on question (yes I use all 16 for work).

Additionally it’s actually possible to remap the keyboard shortcuts to switch to Desktop 1, Desktop 2 etc. to Fn+1, Fn+2 etc. It’s easier to hit on the keyboard and resolves some conflicts that the default Ctrl+1, Ctrl+2 etc. have with some complex apps such as programming IDEs.


  1. All context I need is just a quick shortcut away and always running (Fn+number).


  1. Higher RAM usage.
  2. Lower battery life on a MacBook Pro (iMac unaffected which is where I usually work).
  3. It can be a pain the restart the system. The app “Stay” mentioned above helps, but some apps will restore to the right Desktop after restart, others won’t. However I don’t restart so often.

There may be 3 cons above vs. 1 pro, but in my experience the pro is a big one if you do a lot of parallel work in many contexts.

I don’t think this workflow necessarily invalidates / replaces David’s Keyboard Maestro workflow completely, but could complement it by allowing you to take the most frequent contexts and putting them on their own desktop, always open and ready to use, and then gave Keyboard Maestro shortcuts for the lesser used contexts you perhaps don’t feel you need to have open all the time.

I work similarly to you but don’t use KM - I’ll just Command-Tab to pick the app I want to go to and that will send me to the Space it’s in.

I don’t use KM either :slight_smile: All I use is System Preferences -> Keyboard -> Shortcuts -> Mission Control, then customize the shortcuts for the spaces there.

The advantage of pressing a single key combination rather than alt-tabbing a variable number of times I think will be apparent to most if they try it for some time.

As a sidenote, sometimes I also don’t want to switch to a space of an app that I select, for example if I first want to select the app, then make a new window in the current space. This is possible with:

defaults write workspaces-auto-swoosh -bool false
killall Dock

And another one with true. I have made a couple of Alfred workflow that can do this by keyword.

1 Like