The default behavior for Command-Tab is to open all windows of the application that you select. Is there a way to only go to the most recent window?

For example, let's say I have a text editor open, and several instances of Terminal. The text editor is the active window currently, and takes up the full screen. I want to switch to the window of Terminal that I most recently used, and have my text editor keep the rest of my screen space. If I just Command-Tab, however, I end up with all of my Terminal windows showing up and completely obscuring my text editor.

The only way I have figured out to get to the point where I want is to drag the Terminal window that I care about off to the side of my text editor, and click it while the text editor is active. This is an incredible hassle though, so I'm looking for a more efficient way to pull this off.

Any thoughts?

5 Answers 5


Another option for those of you looking for a much faster window switcher, albeit not as feature-rich as something like witch, is contexts:

This is currently my task switcher, as the latency in witch drove me crazy.

  • After trying many others (Optimal Layout, Witch, etc.), I'm now using Contexts and loving it.
    – Trinition
    Dec 23, 2016 at 14:27
  • contexts is offline an no response from it's creator.
    – towry
    Jul 10, 2020 at 0:56

I think you really need to use a utility to do this. I have been using HyperSwitch for some time and it does the trick.

By default HyperSwitch allows you to switch between open windows using Option+Tab, and keeps Command+Tab the same, but you can always change that.

I was also looking at the app Witch, but I couldn't bear to spend $20 (now $14) on an Alt+Tab replacement.

  1. Free – HyperSwitch http://bahoom.com/hyperswitch

  2. Paid (free trial available) – Witch http://manytricks.com/witch/


You can for sure, but it entails some sacrifice... like the Function keys on the F1~F12 row. :)

Under System Preferences > Keyboard

First, disable function keys acting as system control shortcuts.

Disable Function Keys as shorcuts

Next go to the Keyboard Shortcuts tab, select "Keyboard and Screen Input". Check the "Move focus to active or next window" option, which by default uses CTRL-F4 as the keyboard shortcut, and is changeable (info thanks to Daniel Beck!)

Move focus to active or next window with CTRL-F4

Voila! Use CTRL-F4 to tab to the next window without showing the rest. I hardly use the shortcut keys anyway so this is my default setup for fast window(not application) switching.

  • You actually can change these entries' key combinations. Example.
    – Daniel Beck
    Apr 19, 2012 at 5:22
  • Oh you are right! Tried double clicking on the box but it didn't register, thus I assumed it was unchangeable. Thanks for the added info.
    – caliban
    Apr 19, 2012 at 5:38
  • The default actually appears to be Control-fn-F4, which works fine even with the shortcut keys still enabled. Thanks!
    – numegil
    Apr 19, 2012 at 6:30
  • This does not really replicate the behavior of <kbd>Cmd</kbd><kbd>Tab</kbd>, because it cycles through windows instead of switching back and forth. There are also problems with using this right after switching between desktops/spaces (see dtc's comment on the answer).
    – Luke Davis
    Sep 11, 2017 at 15:52

I actually wanted the exact same thing - essentially like a "previous" button on a TV remote. After a bunch of searching, here's a 2020 answer:

HyperSwitch, Witch, and Contexts are now all paid apps that I haven't used but they seem well-liked. I can't say for sure whether they have this specific functionality.

AltTab is a free switching app that imitates some functionality of the windows Alt-Tab command. It has other uses (and IMO is better than the osX Cmd-Tab), but it can be used specifically for what you're asking.

To set this up, just go to AltTab > Preferences > Controls > Show windows from and allow windows from all sources, set your shortcut (I like Cmd-;), then go to AltTab > Preferences > Appearance > Show on and select "Screen including menu bar". This second selection makes the shortcut consistently function as a "previous" button when used quickly (e.g. instead of Cmd-(hold); just Cmd-(tap);).

FWIW I'm unaffiliated with AltTab, and as far as I can tell they don't ask for or provide a means for financial contributions.


Light switch has this feature(among other features) but it is now discontinued

link: http://www.macupdate.com/app/mac/26812/lightswitch

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .