Killing Cmd-Tab. Your Path to Better Application Switching
Tags: productivity, mac, macbook, tools
Published: 2020-01-10 15:38:40

**This post was first published on [timothymiller.dev](https://timothymiller.dev/posts/2020/killing-cmd-tab/)**

Last week we talked about creating our own keyboard shortcut "namespace" by [creating a "Hyper" key](https://dev.to/webinspectinc/creating-worry-free-keyboard-shortcuts-with-the-hyper-key-3m52). The hyper key doesn't actually exist on Macs, but we were able to fabricate it by using other modifiers that _are_ supported by the OS.

This gave us a whole keyboard of shortcuts all to ourselves, and now we just have to figure out what to do with it.

One of my favorite uses for the Hyper key is what I call painless application switching. What do I mean by "painless"? Why is regular app switching "painful"? Let me explain.

There are essentially three ways to change applications built in to the Mac operating system: Cmd+Tab, Mission Control, and the Dock. Let's talk about each of them.

#### Cmd+Tab

<img src="https://thepracticaldev.s3.amazonaws.com/i/42vppskw8yctk2s59w3o.png" alt="A rough picture of the Mac cmd+tab app switcher." />

<small>This was the best screenshot I could get. It's surprisingly difficult!</small>

Cmd-tab is a very finicky way to swap applications. It isn't consistent. The order of the applications changes all the time depending on what app you used most recently. This means that there are only two ways to use the tool: either _remember_ what order you last used your apps at all times, so you can switch without looking. OR you can press cmd+tab, wait for a second, look at the UI, and then continue tabbing until you reach the desired application. _Both_ of these methods use more of your brain than they should, and the second method is also _slow_ and breaks you out of your flow.

Cmd+Tab works well if you're only using two applications. Beyond that, it breaks. I stopped using cmd+tab when I became a professional developer, because it wasn't a good enough tool for the job. I needed something better.

#### Mission Control

<img src="https://thepracticaldev.s3.amazonaws.com/i/b1p4o5pehte0kqm21wo8.png" alt="A screenshot of the Mac Mission Control interface." />

For many years I used Mission Control instead. Mission Control is okay, I would say it requires less thought than cmd+tab in general. But it too has a fatal flaw: it isn't keyboard driven. Mouse driven productivity tools can be helpful, but they're never going to have the pure speed that a keyboard driven solution has. Mission Control is useful in a pinch, but not a reliable productivity tool.

#### Dock

<img src="https://thepracticaldev.s3.amazonaws.com/i/t5cs3u6ttfo3b2gxqha8.png" alt="A screenshot of the default Mac dock." />

You all know the dock. For most of us it sits at the bottom of our screen, with all the currently running apps, and possibly others of our choosing. The dock has many virtues: it is more consistent than cmd+tab, and has many more actions available than either of the previous solutions. But again, it is not keyboard driven. It’s a good tool to have, but not fast or efficient when it comes to swapping back and forth between applications.

### There Has to be A Better Way

Back to the Hyper key. Thanks to having this key available to us, we can now set up  _truly_ fast and predictable application switching. The concept is simple: take your most recently used apps, and assign memorable shortcuts to them using BetterTouchTool, or your application of choice.

For me, here's my short list of apps I swap between frequently, and my chosen shortcuts:

* Firefox: hyper+f
* Mail: hyper+m
* Safari: hyper+s
* Sublime Text: hyper+c
* OmniFocus: hyper+o

The beauty of this approach is its simplicity. You can assign apps as you need them, and give them the most obvious shortcut you can think of. This makes the change to your process small, and the benefits substantial.

In BetterTouchTool,  here's what that configuration looks like:

<img src="https://thepracticaldev.s3.amazonaws.com/i/kdd6yo1j8t386je6hvw5.png" alt="A screenshot of the required config for BTT." />

<small>Click to enlarge.</small>

Setting it up is pretty intuitive. Go to "keyboard shortcuts", add a new shortcut of your choosing, pick the "Launch Application" action, and choose the application you want to launch/switch to. Then rinse and repeat as needed.

One perk to doing this with BTT is that it will also _launch_ the app if it isn't already open. Not only better app switching, but better app _launching_ too.

There is much more we can do with the Hyper key and BTT, but this is one of my favorite uses. Next week we will talk about window management, which has been a thorn in my side for many years until recently.