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!

  • 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 -- store.apple.com/ca/product/MB110C/A
    – Arjan
    Nov 19 '09 at 9:37

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

  • 11
    I 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!
    – user18604
    Nov 19 '09 at 10:21
  • 2
    Try command-shift-`. Feb 19 '10 at 19:34

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.


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

  • 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
    Nov 19 '09 at 9:39
  • 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.
    – user18604
    Nov 19 '09 at 10:24
  • 2
    By Command-~, he means Command-Shift-` I think.
    – MJeffryes
    Nov 19 '09 at 13:35
  • 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!
    – user18604
    Nov 20 '09 at 11:25
  • Sorry, looks like this system uses (removed) character for text formatting! I was trying to type what Ziggamorph shows above. The latter one.
    – user18604
    Nov 20 '09 at 11:28

Hyperswitch (free) and Witch ($14, though more configurable) allow doing this.

  • Awesome, that's exactly what I needed and also what the author needed! May 2 '21 at 13:48

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


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy