
Mac OS X: Sane way to switch between windows - a_alakkad
https://tooling.tips/mac-os-x-sane-way-to-switch-between-windows-2853493b9a1e#.d5457u5ql
======
thought_alarm
_> 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.

~~~
developer2
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.

~~~
simo7
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.

------
DigitalJack
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.

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

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

------
mmastrac
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:

[https://developer.apple.com/library/mac/documentation/Cocoa/...](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/SAppsHandleAEs.html)

and here:

[https://developer.apple.com/library/mac/documentation/Cocoa/...](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/NSApplicationDelegate_Protocol/#//apple_ref/occ/intfm/NSApplicationDelegate/applicationShouldHandleReopen:hasVisibleWindows):

~~~
mikeash
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.

------
thomas-st
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.

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

~~~
thomas-st
I need to switch between two windows of _different_ applications. Cmd+` only
switches within the same application.

------
guelo
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.

~~~
dagwaging
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

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

~~~
wodenokoto
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.

~~~
rsync
... 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)

~~~
wodenokoto
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:

    
    
        [3,2,1,0] 
    

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

    
    
        [2,3,1,0]
    

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

    
    
        [1,2,3,0]
    

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

    
    
        [0,1,2,3]

~~~
rsync
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 ?

------
rbinv
I am a very happy user of HyperSwitch:
[https://bahoom.com/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.

~~~
nikmobi
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.

------
josefdlange
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.

~~~
c17r
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.

~~~
josefdlange
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.

------
blunte
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?

~~~
Aaargh20318
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.

~~~
WayneBro
> I'd hate for this behavior to change,

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

~~~
Aaargh20318
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.

~~~
WayneBro
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.

~~~
Aaargh20318
> 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.

~~~
WayneBro
> 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.

~~~
Aaargh20318
> 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.

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

------
Cyph0n
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.

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

~~~
adamnemecek
I use witch [https://manytricks.com/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.

------
rsync
All you need to know about the OSX UI is this: sometimes when you hit the
maximize button, the window _gets smaller_.

~~~
Alphasite_
Not as of (about) 4 years ago.

------
nextos
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.

------
Razengan
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.

------
Ezhik
I just use Expose to switch between windows.

------
zer0defex
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.

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

------
WayneBro
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.

------
kartiksibal
Or you could just press Command + N.

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

