Hacker News new | past | comments | ask | show | jobs | submit login
Mac OS X: Sane way to switch between windows (tooling.tips)
44 points by a_alakkad on Aug 21, 2016 | hide | past | favorite | 60 comments

> You might come across a situation, where you want to switch to an application or open a new instance of it. You press (Command ⌘ + Tab) combination. and you don’t get your window, just the title in the menu bar!

If you're having that problem then you're not using the Minimize command correctly. Never use Minimize when you intend to switch between apps.

You only use Minimize when you explicitly do not want to see a window when its app is active. Typically, it's a rarely used command, but it can occasionally useful when you're working in an app that has a lot of windows open (like, say, Terminal) and you want to set some of the windows aside for awhile.

More often, you should use the Hide command. (Command+H, select "Hide" from the app menu, or Option+Click a dock icon.)

This will hide the active app and activate the next app in order. When you return to the hidden app via Command+Tab, the app and its windows will be restored just as you left it.

In the old NeXTSTEP days, the Hide and Quit commands were top-level menu buttons and always just a single click away. It's unfortunate that those commands were moved to a sub-menu in Mac OS X.

I actually wrote a little app that puts Quit and Hide buttons in the top left and right corners of the screen. It gets a lot of use.

I don't understand why everyone is talking about Cmd+Tab. If you're on OS X, you use Mission Control with a trackpad or a mouse. People coming from Windows who refuse to adapt to using Mission Control, and instead rely on Cmd+Tab like a Windows user that has no other option is sorely missing out.

The old Exposé was a hindrance due to lack of proper multi-monitor support. Honestly it was a disaster and mostly unusable. As of a couple versions ago, multi-monitor has worked flawlessly. Mission Control has become indispensable to my daily workflow. Aside from a proper terminal with tools like ssh (seriously, fuck cygwin or Putty as replacements), Mission Control is the reason why OS X is amazing to me, and I can't stand to use Windows which lacks any kind of proper window management. Alt+Tab and Win+Tab on Windows are a joke, and all of the third-party software packages that try to hack on multi-desktop, multi-monitor functionality are a mere shadow of a native implementation. Last time I was forced onto a Windows machine at work, Dexpot was the only software that was even remotely bearable to use, and even then required binding mouse gestures via an additional third-party tool.

If you are reading this and using Cmd+Tab on OS X, do yourself a favor and spend some time retraining yourself to use Mission Control. It will save you so much time hammering the Tab key.

Man it's not about coming from Windows, quite the opposite...using the mouse (trackpad) is too slow, many try to avoid it if possible, it's a liberating feeling really.

Personally I have 7 global shortcuts for the 7 major apps I use on Cmd+Shift+Number. And for frequent switching between only 2 apps Cmd+Tab. I'd be 10 times slower with the mission control, no doubt.

Thank you for this. Until now I had no idea how to explain the inconsistent behavior I saw with ⌘ + Tab, and it drove me crazy. It's one of a handful of things that triggered occasional (though short-lived) thoughts of going back to Windows.

I put a lot of effort into minimizing mouse usage via keyboard shortcuts. I've been using ⌘ + m consistently, not realizing I've been punching myself in the face the whole time, and thus gave up on ⌘ + Tab ages ago.

Looking forward to a bit more productivity.

Hiding a window doesn't mean I never want to switch back to it again. And, your complex situation for usage of Minimize isn't helping here. It actually proves the opposite point - Apple implemented the Minimize command incorrectly.

The bad window management isn't limited to the Minimize command though. Open any window from the menu-bar and you'll never be able to switch to it with the keyboard.

Try it out: Open "About this Mac" from the apple menu. Now switch to some other application (with the keyboard). Now try to switch back to "About this Mac" with your keyboard.

You can't.

I don't know what this person is talking about... maybe it's another version of OSX. On mine, you get this effect by pushing up arrow... you don't have to stop cmd-tab or do anything else, just hit up arrow and it shows you that window. not what you want? keep going with cmd-tab.

Once you've hit up arrow, it's like a mode switch, now you are in app window switching mode. Use use tilde (on english keyboards) instead of tab, and it will switch apps in this mode.

go back to tab, and you are back to icon switch mode.

This is on 10.11.6 anyway.

Edit: Oh, and while just playing around now, it appears instead of up arrow, you can hit cmd-1. So single handed, no gyrations.

CMD-TAB to bring up the icon switcher. Hit 1 while holding CMD, switch to window switcher. Hit Tilde while holding cmd, to switch apps in window switcher.

Edit2: It has its flaws. Doesn't show "full screen" apps, doesn't seem to work if you are viewing a full screen app.

I always stick with cmd-tab anyway, and for windowing I use BetterSnapTool. OSX needs a lot of help for that.

this is amazing, thank you. More hidden but incredibly useful features...

Yeah I agree, OSX, and iOS are suffering greatly from lack of discoverability of features.

This is interesting, though I'd be wary of calling it sane - you have to press cmd, then tab, release tab, then press option (without releasing cmd!).

What it appears to do it trigger the "reopen" command on an application, which tends to open a new window if one does not exist.

The "reopen" event is described here:


and here:


Thanks for explaining what it does, I couldn't figure it out at all from the article, and of course I tested it on apps that already had windows open, so nothing changed! The "open a new instance" phrasing is rather misleading: it's not opening a new instance of an application, it's opening a new window in an existing application.

Some other keys that work while using Cmd+Tab:

- Press "q" to quit the selected application

- Press "h" to toggle hiding the selected application

- Press "1" to show all open windows for the selected application

Does anyone know if there is a built-in way to only switch to the frontmost application window (by default Cmd+Tab puts all app windows in the foreground)? Sometimes I need to switch between two windows of different applications which I both want to keep visible on the screen, but switching to the destination app with Cmd+Tab ends up covering the entire screen because that application has other windows.

Command + ` (back-tick, right above your Tab key)

I need to switch between two windows of different applications. Cmd+` only switches within the same application.

As a long time user of both I don't think there's any doubt that OSX's window manager is inferior to Microsoft Windows'. Windows can handle things like multiple monitors and full screen modes much more seamlessly with less confusion. If it wasn't for the Unix layer, and the occasional need to open XCode, I personally would have ditched Macs.

the unix layer is (mostly) a non-issue now with the windows 10 anniversary update, though that doesn't help for xcode

personally i found exposé and spaces to be way ahead of windows a few years ago, but the new task view in windows 10 and multiple desktops have basically caught up, and i think combining them into mission control was actually a bit worse than just using the features separately

window management with aero snap and actual, real maximized windows was always better though

of course, all this and much much more have been possible on various linux desktop environments for a long time, if one doesn't run any critical windows-only (or mac-only) software

You clearly have not used OS X since at least a couple of versions ago. They finally fixed the multi-monitor and full-screen problems. Mission Control properly handles everything now, and is vastly superior to Windows in how it functions these days.

[Command + `] - a very useful shortcut in OS X for switching between windows of the same application.

"[Command + `] - a very useful shortcut in OS X for switching between windows of the same application."

Well, it would be a very useful shortcut if it behaved the same as Command+tab ... but it does not.

Command+tab behaves like every other "alt tab" you've ever used - no matter how far you alt-tab over, hitting alt-tab again brings you back to the just-previous application. This means you can go over to a new window and immediately toggle back and forth with alt-tab. Works great. Everyone loves it.

Commmand+tilde, however, has a totally weird memory to it - it sort of goes in a forced order, without having a memory at all, except that it (seemingly) switches directions after releasing the key combination ...

However it behaves, you can't pick two arbitrary app windows to start toggling back and forth between. If chrome window A is 5 spots over from chrome window B in "the list", you will always need to flip over 4-5 spots to toggle between them.

And that just sucks.

I wish it were so simple. Most apps implement tabs now too, so you also need to learn Cmd-Shift-[ and Cmd-Shift-] to get around with the keyboard.

I use ctrl-tab and ctrl-shift-tab. Works out of the box in Safari (and customizable for apps where it doesn't).

My big grief with that is that it implements a different ordering logic than cmd+tab does.

cmd+tab orders by last active application, while cmd+` orders by last window created.

Which is bad enough by itself, but if you are using multiple monitors/workspace CMD+` will only switch between windows of that application that are on the same workspace.

... and not even that ... it changes direction every time you use it and it even very slightly reorders things in a way I still can't predict.

(see my other comment above)

You are right. It reassess the order of windows when you change application. And here I just thought I was bad at keeping track of my windows.

Another thing I noticed just now is you can browse to no-window-selected using cmd+`

As far as I can tell, the logic is the following, with numbers representing order of creation, with 0 being no window:

If you switch app with window 3 selected, the order is maintained. If you switch with window 2 selected, the new order will be

if you switch with window 1 selected, the new order will be

If you switch with window 0 (no window) selected the new order will be


The amazing thing is, there is an entire company (Apple Computer) full of thousands of people that have to use this every single day ... what the fuck ?

How do they manage to not fix this ? How do they live/cope with this ?

One theory is that there are no power users at apple computer - just a bunch of people mouse-mouse-mousing around their computer all day, every day. I think that's unlikely.

OSX power users that actually work at apple ... why don't you get this fixed ? I live with this pain because I have no way to do anything about it ... why do you live with this pain ?

Less useful on non-US keyboards, unfortunately, may require three keys in combination.

You can configure that shortcut in the Keyboard System Preferences.

Oh my god, this changes everything! CMD-tab focus to the wrong window has driven me nuts for ten years and this fixes it. I've just binded it to cmd-e since the ´´´ shortcut doesn't work on non-us keyboards

I would use this, but after trying iTerm2's drop-down terminal which uses the same combination I can't go back.

I am a very happy user of HyperSwitch: https://bahoom.com/hyperswitch

Allows tabbing through individual windows (one icon per window, not just one per app) and doesn't have the problem of not showing anything after the selection. Downside: it does not include minimized windows.

Although it seems to have been in "beta" since forever, I've never really encountered any problems.

Coming from Linux/Windows, I was always slightly annoyed that you could only command+tab through a single window for each application, but now that I'm used to it and have grown accustomed to command+tilda to switch between windows of the same app I find it nice.

I have literally never encountered this specific UX issue. Having using OS X and macOS for just about its entire fifteen year lifespan, I don't even know how or why it would happen, to be honest.

The only issue I encounter here and there is if I have windows scattered across spaces and full-screen windows, switching just to the app usually picks the wrong window, and then because of the full-screen window complications, I can't simple Command+` around, I need to use Spaces shortcuts to navigate to the left or right.

Edit: I think I understand the scenario after thinking a few more minutes: you've closed all the windows of an application, but you have not exited the application entirely. I agree with the existing behavior. I don't want apps spawning new windows every time I go to them. If I want the window later, I don't close it. If I just don't want to see it, I hide the app -- but not minimizing it in the Dock either. Hiding it is like turning the other way, minimizing is like folding it up and putting it in my pocket. If I just hid it, I can just turn back to it when I want it. If I folded it up, I have to go through the "pain" of unfolding.

Open Chrome with a single window. Minimize the window. Then try to Command-Tab to it. It'll bring Chrome to the fore-front, as your menubar will tell you, but the window stays minimized on the Dock.

Thanks for the info -- I think that's covered in what I describe in my edit, though likely not as directly as this. In my edit I realized that an open app with no open windows causes this behavior; a window being confined in the Dock must behave the same way.

Steve Jobs is dead. Can we finally fix this? Or can someone convince me that the behavior we have suffered through for ages has more value than frustration?

You are used to the Windows/Linux concept of a desktop, that's all.

Look at it like this: the windows on your desktop are the things you are working on. Usually they will be documents or other kinds of content. In OSX the desktop metaphor works a little different than on Windows. In Windows a window represents an application. In OSX a window (usually) represents a piece of content, e.g. document in Pages. When you minimize a window you're not minimizing the app, you're putting a piece of content out of the way because you don't need it at the moment. Think of it like stashing something away in a place you can easily reach it if you need it. Cmd-tab doesn't switch between windows (pieces of content) but between applications.

I'd hate for this behavior to change, it would break my workflow horribly and is one of the reasons I can't stand Windows. It is perfect for multitasking. I have a lot of stuff open I don't currently need. Say I'm working on some code; I'd usually have an IDE, browser terminal, calculator and a whole bunch of text document (for note taking) open. The things I don't need I minimize. When you cmd-tab between apps you only switch between the things you're working on at that moment. Basically the whole point of minimizing is so it doesn't switch to those windows. If you need it, keep it on your desktop, thats what it is for, if you don't you close the document. Minimizing is a bit like a halfway point between that: I don't want with this document on my desktop right now but I might need it in a bit so I'll just stash it in the dock.

> I'd hate for this behavior to change,

So, how about an option for the rest of us who like the Windows way better?

You can switch to Windows.

There should not be an option, that would almost be worse. If you start messing with the fundamental concept of how the desktop works things become a mess. Options just mean the developer is too afraid to make a choice.

I have to use both.

There should be an option, for the simple reason that I and many, many others like me want one.

And I can also use trite phrases to prove my point: One size does not fit all.

> If you start messing with the fundamental concept of how the desktop works things become a mess.

No, they don't. It means there's an option to change something to the way the user wants it to be.

> Options just mean the developer is too afraid to make a choice.

No, it doesn't. Options mean that the developer lives in reality. The reality again is: One size does not fit all.

Furthermore, the numerous third party tools that actually add this option haven't made OS X fall apart or stop operating. It doesn't stop me from doing one single thing. It changes the one behavior that I wanted changed. The only problem with third party tools is that they're third party and they don't have all the API access that Apple has. So empirically, you're wrong.

Your sense of aesthetic is also way off if you think OS X has got window management right. Numerous hard core Mac fans disagree with you on that one and everybody else in the world using Windows likes it just the way it is. I think the only facet of the Mac OS that is decried even more than the bad window management is the Finder.

> And I can also use trite phrases to prove my point: One size does not fit all.

That doesn't matter. Conceptual integrity is more important than you having to relearn some habits.

> No, they don't. It means there's an option to change something to the way the user wants it to be.

No, it means breaking the conceptual integrity of the desktop as it implemented on OS X. Once you start mixing things up ,that's when it gets confusing. Unlearn your Windows habits.

> That doesn't matter.

Yes, it does.

> Conceptual integrity is more important than you having to relearn some habits.

It's not about habits at all. I haven't made that argument once, you're assuming that is the case here. Stop doing that. It's a really, really weak argument and an obvious straw-man.

Conceptual integrity is important, but OS X doesn't have any conceptual integrity in the area of window management. It's absolutely and totally illogical.

> Unlearn your Windows habits.

There is no habit here. Windows window management is logical, consistent and generally preferred by most people over the way OS X does things.

You need to learn how to think about things more logically.

> Conceptual integrity is important, but OS X doesn't have any conceptual integrity in the area of window management. It's absolutely and totally illogical.

Just because you don't understand it doesn't mean it's illogical, it just means you don't understand it. Learn.

Obviously you think it's hard to understand, so I guess I win.

This happens a lot with Mail.app. What I do now is just use Cmd+0 to show the main Mail window, or Cmd+1 for other apps - Evernote and Skype come to mind.

Another thing that annoys me to no end: alt-tabbing to Finder takes you to an open window in another desktop! I want to open a new window on this desktop. I guess the linked trick may help with this behaviour.

Edit: Found a solution. Alt+Cmd+Space brings up a Finder search window on your current desktop. Good enough.

All I want from OSX is to be able to alt-tab between windows, not apps. Is this possible?

I use witch https://manytricks.com/witch/

It's a must have app for me. I actually cannot use other people's laptops if they don't have it.

Try cmd + ` (backtick)

System Preferences > Keyboard > Shortcuts > Keyboard > Move focus to active or next window

You can with HyperSwitch: https://bahoom.com/hyperswitch

Command + Tilde.

⌘ + ~

All you need to know about the OSX UI is this: sometimes when you hit the maximize button, the window gets smaller.

Not as of (about) 4 years ago.

The slightly confusing window manager was one of my reasons to switch back from Mac OS to Linux 6 years ago. With a tiling window manager I never looked back. Everything can be customised to match your workflow. Regular setups with floating windows feel awkward now.

I gotta say, most of these things complaining about macOS UI read like people expecting it to behave exactly like Windows, rather than any objective flaws in how it works.

I just use Expose to switch between windows.

I love all of the advanced functionality hidden just beneath OSX's user-friendly veneer. Sadly, it's been one of the first casualties in the post-Jobs Apple. Every new release of OSX along with Apple's own apps, the first thing I check is holding down the alt/option key while clicking the various menu items to see what nuggets of alternate functionality appear. Every day, every release - less and less, if any at all. So sad.

Pressing a modifier key to see alternate options is further "down" than "just beneath"?

The simple fact that there are NUMEROUS third party solutions to make OS X window management more like Windows and that there are NONE that try to make Windows or Linux window management more like OS X speaks volumes.

Apple got it wrong.

Or you could just press Command + N.

Or you could just press Command + N, and open a new window.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact