Window switching in OS X: It’s fast.

The move from Mac OS 9 to Mac OS X brought about a big change in terms of switching between programs: clicking on one window of a program no longer brought all of that program’s windows to the front. This took the Mac OS a little closer to the traditional MS Windows model of program switching rather than the traditional Macintosh implementation — the difference in switching model can be summarised as window-based in Windows (appropriately) and application-based on Mac OS 9.

Interestingly, at around the same time as the OS X change, Microsoft also made a small move away from their traditional model in Windows XP. In XP, when the task bar becomes full, windows belonging to the same program become grouped together and are represented by only one tab in the task bar — in much the same way as the application-centric OS X Dock, but conditional upon available space.

However, OS X didn’t lose all of OS 9’s application-based heritage. Clicking on a program’s Dock icon still brings all of its windows to the front, as does command-tabbing to a different program. Then, of course, there’s Exposé and a host of keyboard modifiers for each method that just make the whole operation really slick. I think part of that slickness stems from the combination of app-centric and window-centric switching… Anyhow, for reasons I’ll explain at the end, I thought I’d just run through some hints and tips for switching between programs and windows on Mac OS X (which are especially recommended for newcomers to the platform):

The Dock (application-centric)

The Dock is the most obvious way to switch between programs on Mac OS X, but even it has a couple of useful keyboard-modifiers to smooth things along:

  • alt (⌥) clicking on a program switches to it, while simultaneously hiding every other program
  • command (⌘) clicking on a program reveals its location in the Finder.

⌘ tab (application-centric)

Pressing command-tab brings up a semi-transparent head-up display with the icons of all currently running applications. There are a handful of keyboard shortcuts that can be used after releasing the tab key, but with ⌘ still held down:

  • H: hides the currently selected application (with the white border around it)
  • Q: quits the currently selected application
  • Tab: cycles forwards through open applications
  • ~: cycles backwards through open applications (shift-tab also does this, but I find ~ much easier to press)
  • The left and right arrow keys, and indeed the mouse, also allow selection of the program.

When you actually want to switch to the selected program, simply release the command key (or click on the program with the mouse).

Exposé (window-centric)

Exposé allows you to see all open windows simultaneously by pressing F9 (or whatever you have assigned to it in the Dashboard and Exposé preferences pane). Alternatively, you can see just the windows of the current application by pressing F10. Or finally, you can temporarily reveal the Desktop by pressing F11. There are a couple of interesting tips regarding Exposé:

  • You can switch from All windows mode to Application windows mode by either (as you might expect) pressing F10 or by pressing tab. Subsequent presses of tab move through all open applications in Application windows mode. Nifty. Shift-tab moves through in the reverse order.
  • In All windows mode, you can move around the windows using the arrow keys.

⌘ ~ (window-centric)

Finally, this is a great one: press ⌘~ in any program with more than one window open and it’ll switch between the open windows belonging to that program.

So that’s that. Now, you might be asking yourself why I’ve only just written this when all these features have been available since Panther at the latest… Well, my main reason is that last week a Windows-using friend was watching me produce a document in Pages, all the while switching back-and-forth between Safari, Mail, Aperture, Photoshop and Finder using a combination of the above methods. They were clearly so impressed that they felt the need to comment on how quickly I was managing to piece together the various parts of the document.

This made me realise that the combination of Exposé, command-tab and the Dock allows for a huge amount of flexibility in how you move around the OS X interface and, as noted by my fellow student last week, these choices clearly have a huge beneficial effect on productivity. For that reason I, for one, am definitely looking forward to spaces in Leopard…

Improving the Dock (a little bit)

As Bruce Tognazinni rightly points out, “Apple Sales is in love with the Dock”. He points out many (specifically 9) problems with the OS X Dock but, contrary to his original stance, believes that the Dock should be kept in place, but supplemented with “serious, information-dense tools”. I do agree with the Tog, but at least there is the consolation that at least a few third parties stepped in to help out.

Anyway, I was thinking about how Apple could possibly add functionality to the Dock, but at the same time keep Apple Sales happy and leave the Dock with its current simplicity and aesthetic appeal. And here are a couple of my ideas (excuse the abysmal Photoshopping):


This shows a sub-menu of the window menu item in Safari’s Dock menu. I’ve always thought of tabs as sub-windows and I think it’s a shame they’re not treated as such by Exposé and the Dock. Programs that currently use tabs include pretty much every web browser, Adium, TextMate, iTerm, Preview1 and Pathfinder.

Pre-release screenshots of Leopard show that both iChat and Terminal will join this ensemble in the coming months. So maybe it would make sense for Apple to have a bit of a think about tabs and produce some crazy mash up of NSTabView and NSWindow, such that each instance of “NSTabViewWindow” could advertise its tabs to Exposé and the Dock. I don’t know – I’m not a programmer. But I am a user, and I think this would be a sweet bit of functionality for OS X to gain.

A similar menu could appear when a user right-clicked a tabbed, minimised window. Possibly even showing a graphical representation of the contents of each tab, which leads me neatly on to my next idea…


I think this one’s pretty self-explanatory. This window selection interface would appear upon mousing over the Dock icon of a running program, revealing all of its available windows in a ⌘-tab-style interface. Clicking on one would bring it to the front, un-hiding the application if necessary.

So that’s all the images for now. However, I would also like to add two extra features to the Dock that I didn’t feel required a illustration:

1. Allow minimised windows to be closed through their contextual menus (in programs other than the Finder!)
2. Allow for persistent app-specific contextual menu items (e.g. it would be nice if the list of Pref panes in System Preference’s context menu were still there even when System Preferences wasn’t open)

I’m sure there are many many other enhancements (including spring loaded folders – apparently coming in Leopard) that could be made, but I reckon these would be a great start.

1Kind of. If you open multiple images in Preview at the same time, they are “quasi-tabbed” in the drawer at the side of the Preview window.

Exposé “Bring All to Front”

This only just occurred to me: If you have just one window of an app in the foreground, all other open windows for that app can be brought to the front by a quick F10 double-tap, effectively providing a shortcut for “Bring All to Front” in the Window menu. I always found it a little odd that there was no universal shortcut for that command, especially considering OS 9’s application-based (rather than window-based) window management.

Also, as an extra hint (although I think this is quite widely known): if you tap F10, you can then press tab repeatedly to switch through open applications (in F10 exposé mode). If you overshoot, press the ` key (to the right of left shift, also the tilde key) to go through apps in the reverse direction.