DEV Community

Cover image for Killing Cmd-Tab. Your Path to Better Application Switching
Timothy Miller
Timothy Miller

Posted on • Originally published at timothymiller.dev

Killing Cmd-Tab. Your Path to Better Application Switching

This post was first published on timothymiller.dev

Last week we talked about creating our own keyboard shortcut "namespace" by creating a "Hyper" key. 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

A rough picture of the Mac cmd+tab app switcher.

This was the best screenshot I could get. It's surprisingly difficult!

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

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

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:

A screenshot of the required config for BTT.

Click to enlarge.

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.

Top comments (0)