How to switch back to previous window on OS X?

11

6

As a long time Windows users I'm used to switch between two windows using keyboard. Now at Mac I just can't figure out how to do that!

Command-Tab works nicely between apps, but how to do the same within one application having several windows open? Especially when using XCode? For example within Firefox you can do control-tab and control-shift-tab to navigate between tabs. Doesn't work with XCode, not between two different open projects.

Doing 4-fingers-down, looking at screen, finding the previous window and clicking on it with mouse takes waaaay too long time. It interrupts whatever I was doing, distracts from whatever I was thinking about and starts annoying me - enough to write this desperate call for help in StackOverflow :)

There's got to be a secret handsha... keyboard combination!

user18604

Posted 2009-11-19T08:23:36.143

Reputation:

1

The answers as given, Command-` are correct for most, if not all, keyboard layouts. (You can also use that to go backwards in the application switcher, after you hit Command-Tab.) I wonder if layouts that have no ` have a different shortcut like, for what I've heard, the Apple-French layout -- http://store.apple.com/ca/product/MB110C/A

– Arjan – 2009-11-19T09:37:18.237

Answers

11

Before this is moved to superuser, the shortcut you're looking for is command-`

Randolf Richardson

Posted 2009-11-19T08:23:36.143

Reputation: 14 002

1Try command-shift-`. – Rich Bradshaw – 2010-02-19T19:34:35.207

6I don't think so, looking for smthng else.

In my system that key combination does cycle inside one app windows, but goes only FORWARD. I want especially switch between current and previous window(s). Right now I have 6 open wins in XCode, so that's 5 keys AND knowing how many wins I have open AND counting the presses. If I got to actually look at and select windon, my concentration disappears. Yes, easy to distract! – None – 2009-11-19T10:21:35.573

6

Command-Tab works nicely between apps, but how to do the same within one application having several windows open?

I was also a bit annoyed at this, until I found the "Move focus to the next window in application" keyboard shortcut option (under System Preferences -> Keyboard -> Keyboard Shortcuts -> Keyboard & Text Input).

I set it to Cmd-§ (⌘§) myself (which is close to Cmd-Tab and I couldn't think of anything better). Shift-Cmd-§ cycles in the opposite direction. It's not ideal, but sort of tolerable for me, although I'd still prefer Cmd-Tab toggling between all windows.

There are also 3rd party utilities that improve OS X's window switching capabilities; check out Witch for instance. I haven't tried these myself though.

Jonik

Posted 2009-11-19T08:23:36.143

Reputation: 5 352

Oh, I totally missed that the q was posted 3 months ago. Oh well. – Jonik – 2010-02-19T19:39:28.103

3

When you have to window active (focused), do Command-~.

tranmq

Posted 2009-11-19T08:23:36.143

Reputation: 131

Is there any keyboard layout that has the tilde on the lower part of the key? (Like one does not need Shift to type a tilde?) – Arjan – 2009-11-19T09:39:19.747

Usually default keyboard shortcuts are designed for US layout, you could check that. Might mean you have to type blind or buy extra keyboard with US layout. – None – 2009-11-19T10:24:49.437

2By Command-~, he means Command-Shift-` I think. – MJeffryes – 2009-11-19T13:35:54.840

Heh, with this keyboard shift-is impossible :) It's Command-Shift-´to make Command-, if that is more clear. Also Command-~ is actually Command-Alt-¨. Guess I'll have to live without (some) shortcuts and just get on with the remaining ones. Thanx anyway! – None – 2009-11-20T11:25:24.720

Sorry, looks like this system uses (removed) character for text formatting! I was trying to type what Ziggamorph shows above. The latter one. – None – 2009-11-20T11:28:11.593

1

If you want to make a custom shortcut, I noticed that macOS Sierra seems to automatically map Shift-[shortcut here] to the reverse of your original shortcut, when it makes sense (e.g. anything that involves "next" probably has a corresponding "previous" version). Possibly because someone expected that a user would expect this to happen?

So if you look in System Preferences > Keyboard > Shortcuts > Keyboard you'll only find "Move focus to next window" bound by default to Command-` and this is why Command-Shift-` triggers "Move focus to last window."

Set "Move focus to next window" to any other combination that doesn't involve Shift, and Shift-[that combination] will do "Move focus to last window".

mz496

Posted 2009-11-19T08:23:36.143

Reputation: 111

-1

try "cmd" + "<" within xcode. It works with my keyboard - KK

KK

Posted 2009-11-19T08:23:36.143

Reputation: