242

Is there any program or way to make Mac OS X's Tab(Command-Tab) behave like Windows' AltTab?

That is, instead of switching between applications, to switch between windows of all applications?

I do know there's a way to switch between windows of the same application using `, but that's not what I want either.

I'm not just trying to make Mac OS X behave like my recent former OS, I've been a Mac user for over two years and before that Ubuntu. After using Expose and Tab I think Windows' or Ubuntu's AltTab is better.

pkamb
  • 4,175
  • 3
  • 36
  • 48
Pablo Fernandez
  • 10,871
  • 23
  • 67
  • 100
  • Sorry Pablo. AFAIK you can't change that behavior. In the end we are talking about completely different operating systems here. Not every detail can be mimicked by the other vendors. I learned to live with Exposé. If this approach is better or not is arguable. ;-) – lajuette Sep 29 '10 at 07:51
  • 1
    I rarely use Exposé. ⌘-tab and ⌘` are good enough for me. Having said that, I've heard good things about Witch mentioned below. – fideli Sep 29 '10 at 12:37
  • 19
    Try this: switch between applications using Cmd-tab, but hold the Cmd key after you released the tab key, and while still holding the Cmd key, press up- or down arrow. This brings up Expose right from program switching. – Florenz Kley Oct 22 '12 at 21:08
  • 3
    +1 for this question, especially when using a non-US keyboard where the ` key is on the right side of the keyboard. – martin jakubik Jan 31 '13 at 09:56
  • 2
    Ignore first comment from lajuette. incorrect. Yes, there is a program which does this. 'Witch', see accepted answer. – malatio Jul 12 '13 at 18:29
  • You mean "behave like non MacOS' alt-tab". This `⌘` makes me sick. – Pierre de LESPINAY Aug 07 '13 at 08:18
  • Windows Emulator – Butzke Dec 18 '13 at 12:06
  • No program needed! - set the shortcut (settings->keyboard->shortcuts->keyboard-> "Move focus to active or next windows") - see @Sam Inverso answer below. – Jonathan Jul 20 '21 at 13:58
  • @Jonathan Wrong, that doesn‘t do LRU which is an important feature of how alt-tab works (command-tab does LRU correctly, just at the app level rather than window level. – binki Jul 20 '21 at 17:08
  • What is LRU? But for my purposes a built in shortcut to flip through windows is all i needed. – Jonathan Jul 20 '21 at 19:53
  • 1
    @Jonathan Least recently used. If I do alt-tab in Windows to switch from my browser to my text editor and then copy whatever is selected there, I can then use alt-tab to get back to my browser. With the keyboard shortcut you gave, pressing it a second time will go to a *different* app than the one you originally. In my case, if I have windows in Firefox, Safari, Terminal, TextEdit, System Preferences, and Finder open, I would have to press your shortcut many times to get back. As long as each app has exactly one window open, command-tab will return me to where I was correctly. – binki Jul 20 '21 at 21:38
  • Awe. I use shift opt tab to go back. – Jonathan Jul 20 '21 at 21:42
  • 1
    @Jonathan So if you have two windows which you need to switch between quickly from the same app but more than two windows open in that app, you’re willing to remember that the current window “in front of” or “behind” the other window and press the shortcut multiple times to complete a switch between the windows? Again, the point is that the built-in behaviors are very different from Windows’s alt-tab and people used to alt-tab want an equivalent. So your answer is not an answer ;-). – binki Jul 20 '21 at 21:48
  • @binki thanks - alt-tab (below) seems fantastic and, yeah, I forgot how nice LRU is. – Jonathan Jul 26 '21 at 17:39
  • 1
    Bad closure. Maybe this is a community wiki candidate? OSX being just bad at window switching is an evergreen issue. – mendota Jul 07 '22 at 21:46

10 Answers10

76

Use ⌘ Command+Tab to switch between different open applications and ⌘ Command+` (backtick) to switch between multiple open windows of a single program.

iono
  • 381
  • 3
  • 9
Krishna
  • 857
  • 6
  • 2
  • 3
    that's not Cmd-~ but Cmd-` (and like that it's also described in the documentation). Cmd-~ does not exist, If it was a shortcut, it would be described as Cmd-Shift-` – Florenz Kley Oct 22 '12 at 18:33
  • 5
    This would be great if it worked for switching between windows of the same app while one of those windows is in a different space (or fullscreen). Sadly it doesn't... – Power-coder Aug 12 '15 at 18:23
  • 6
    Also those functions have very different behavior. Cmd-Tab lets you switch back and forth between two windows of different apps in addition to cycling. Cmd-` cycles through windows of an app, and does NOT give the ability to switch back and forth between two windows, which is why I never use it. – kitti Nov 22 '16 at 17:47
  • This is actually the most time saving and useful thing to know here, and in my view is THE ONLY REASON why expose is not complete junkware. I can't believe I've been using a mac for 4 years and this has not come up. I can move my finger 1cm and solve the problem? Conversation closed (for me). – Tim Ogilvy Jun 27 '17 at 01:00
  • This is perhaps valid for US layout. To use backtick I'd have to use two hands on my Swedish layout. – VonSchnauzer Jun 04 '18 at 08:40
  • 12
    Distinctly not what was asked, question author directly stated that he knew how to switch between windows of a single application already. – derekv Jan 11 '19 at 17:15
73

You can get Witch which makes alt-tab work like Windows switching between windows not apps. However see This question if there are alternatives.

The Apple way is exposé but does require a different way of thinking.

mmmmmm
  • 6,013
  • 29
  • 32
  • 55
    I did use "thinking differently" for over two years, it tires my finger. Thanks for the recommendations, looks like they are exactly what I was looking for. – Pablo Fernandez Sep 30 '10 at 08:39
  • Wouldn't tabbing through all windows rather than just applications tire your finger more? Confused. – ghoppe Oct 02 '10 at 01:24
  • 50
    @ghoppe The order of tabs in windows-style alt-tab is dependent on the order of when the windows were last visited. Therefore, if you know you need to get to the last window you were looking at, a single alt-tab is all you need, as opposed to having to locate the window in expose – Matt Oct 06 '10 at 15:30
  • @Matt This is the way OS X works too. Single command-tab goes to the last application and window that had focus, single command-\` goes to the last window that had focus. In fact, they're reverse ordered as well. Open 4 windows up in the browser, visit them in sequence, command-` reverses the visit order. – ghoppe Oct 06 '10 at 23:17
  • @ghoppe Though that should work in practice, in actuality there are some annoying "glitches". Such as switching between two chrome windows, if you were focused on a youtube/flash video, the command-` shortcut sometimes doesn't even work even though command-tab does. "Witch" ignores that glitch or "feature" of mac os x – victoroux Jul 20 '12 at 13:25
  • @ghoppe The Command-Tab does NOT visit last application (i.e. MRU). Not clear how the app is actually chosen – WestCoastProjects Sep 28 '13 at 14:23
  • @javadbanote that ghoppe says alt-tab not command tab. alt-ta is what Witch uses and the list of windows is (or can be configured to be) in order of last use. Apple's cmd0tab does appear to be in LRU order as well – mmmmmm Sep 28 '13 at 14:26
  • 1
    @javadba Um, yes it does. If it doesn't on your machine, you must have a non-standard setup or extension installed. I'm using it now. If you still don't believe me, [here's an article](http://reviews.cnet.com/8301-13727_7-10330319-263.html) explaining the behaviour: "`Command-Tab`: This activates the menu and switches through applications in order of when they were last accessed. The foremost application will be on the left, and repeatedly pressing the Tab key will go through each application you have open." – ghoppe Sep 28 '13 at 17:52
  • @ghoppe Ah i see now. But the problem is: the highlight is on the MIDDLE app, not the LEFT most app. So then what .. I have to hit left arrow a few times to get over to the leftmost one. – WestCoastProjects Sep 28 '13 at 19:45
  • @Mark The command-tab does work -according to its own design. But the highlighted app is in the middle while the MRU is at the left. How to make the MRU the default/highlighted one? – WestCoastProjects Sep 28 '13 at 19:48
  • @javadba the MRU is at the left for me – mmmmmm Sep 28 '13 at 19:49
  • @Mark Yes likewise. But the "cursor" is in the middle so I have to hit left arrow key a few times. Any idea how to either have MRU in middle or to have cursor start on the left? – WestCoastProjects Sep 28 '13 at 20:17
  • Cursor is on left unless before you hot cmd-tab it is on the screen where the list of icons will bw – mmmmmm Sep 28 '13 at 20:19
  • @Mark Pls clarify last comment "on the screen where list of icons will be". In my case the cursor is NEVER on the left – WestCoastProjects Sep 28 '13 at 20:25
  • 31
    The real problem for me is that I do not want ALL my terminal windows popping up and covering over my browser with the command I want to type and my code that I'm referencing.. I want just the last terminal window from a different application and NOT all of them. – Damon Sep 19 '14 at 21:56
  • This is what alt-tab does in Witch – mmmmmm Sep 20 '14 at 19:48
  • 3
    This (Witch) allows you to access your minimised windows with the keyboard. Why thus can't usually be done is beyond me. – apg Nov 19 '16 at 03:13
  • Magnet($1.99) is a cheaper than Witch ($13.99). It does not do the same thing, but it is enough for me if I: 1) Never maximize windows, and set Magnet Full Screen to respond to F5 instead (and then use only F5). 2) Do the Alt+Tab + Alt+` thing. Disadvantage: Not quite the same as Alt+Tab. Advantage: price and excellent windows like Magnet functionality. – Lucio Aug 19 '19 at 18:30
  • @Lucio That should be an answer – mmmmmm Aug 19 '19 at 18:38
  • @Lucio `Alt` + `Tab` functionality is worth the extra cash! :-) – mal Mar 02 '22 at 10:28
58

Hyperswitch is another application to switch between all open windows of all open applications like in Windows/Linux. It defaults to using alt+tab so that you can still use the default ⌘ command+tab switching, but you have the option of overriding that and can set it to use ⌘ command+tab to replace the default functionality.

It is currently free while it is in beta.

Otherwise you have to do ⌘ command+tab to get to your application, let go of the tab and press 1 to activate the windows of your application, then use the arrow keys (or the mouse) to select the window you want.

Or control+F4 but that doesn't give you the previews - it just cycles open windows.

opticyclic
  • 1,549
  • 1
  • 14
  • 21
  • 2
    Hyperswitch is the best one I've used. Closest to the Windows native alt-tab format I'm used to. – Eric Warnke Jun 08 '15 at 19:45
  • Awesome tool! Definitely mimics the Windows experience I'm so used to. – Elad Nava Feb 03 '16 at 19:29
  • Awesome! Also stops OSX from raising every f*n Chrome window on every monitor when I Cmd-Tab to one. – kitti Nov 22 '16 at 17:55
  • 2
    `1` is perfect solution for me – resting Aug 30 '19 at 17:30
  • This is so great, so much better than Which, thank you. – Darian Moody Nov 13 '19 at 21:50
  • The app isn't signed, so you have to jump through some hoops to install it - I gave up trying to find a good virus scanner. But there are enough positive reviews on Stack Exchange that it seems legit. Works great. – Brian Burns Apr 23 '20 at 04:18
  • Seems to work well. Hopefully once it moves out of beta, the cost will be trivial. – Otheus Nov 10 '20 at 21:19
  • control + F4 only cycles forward and does not go back to the most recently used window like ALT + TAB does on Windows. – Niels Brinch Mar 18 '21 at 13:06
  • FWIW - I don't recommend running this program. I did not / would not because the app is not signed (meaning the developer is not registered with Apple), the source code is not available, and it's not offered by a reputable company. There are safer options below. – Jonathan Jul 26 '21 at 17:43
  • It now says trial expired when you try to use it. – miguel Aug 12 '21 at 19:17
  • Yeah the "beta bug" thing is still an issue despite the release notes saying it's fixed at https://bahoom.com/hyperswitch/get to get past the "trial version expired thing" . You'll need to enable Hyperswitch and a few permissions through "Security and Privacy" setting to get it working. You'll also probably want to "include windows from other spaces/screens" in the settings (these are off by default) to make it work the way you expect. – Peter Jul 15 '22 at 15:46
52

Alt-Tab

Alt-Tab is a free solution that has been in my toolkit for a few years now.

The project page includes a comparison between the popular projects.

Download it from the homepage or alternatively from homebrew:

brew install --cask alt-tab

It's free software! Also it has a good amount of customisability and allows to recreate your favourite experience. The settings page should give you an idea about the range of possible options:

Preferences

Kos
  • 853
  • 10
  • 21
  • 4
    Switched to Alt-Tab after hyperswitch started behaving odd - never been happier !! – Neeraj Sep 23 '20 at 16:39
  • homebrew has gone the lazy route and prevents this from working on El Capitan, despite the software itself retaining compatibility. If someone knows how to use brew to install this on El Capitan, I'll be highly appreciative. – Otheus Nov 10 '20 at 21:20
  • Thank you! This is exactly the right answer. – Théophile Aug 27 '21 at 02:35
  • This app does exactly what I was looking for! Ex-Windows users, good news! this app will save you! – Riccardo Nov 24 '21 at 22:41
  • 1
    This is great, thanks @kos! Also, consider putting that brew command above your screenshot in your answer! I love that you say it's free, Free, and has the comparison. I loved reading the comparison. – Nick Dec 09 '21 at 22:07
  • Has anyone else had trouble with previews for the Preview app (the default pdf viewer on MacOS)? – John D Mar 23 '22 at 23:47
  • the problem with alt-tab is that it shows either all the apps or only the active windows (usually one) forgetting all the other open windows ... – jjrr Jul 11 '22 at 10:22
  • This app is continuously updating and on every update it is broking some things. Bcs of that this isn't stable. – kodmanyagha Sep 22 '22 at 21:00
  • @kodmanyagha You can find the previous versions in the [releases](https://github.com/lwouis/alt-tab-macos/releases) section in Github. Also I encourage you to help by reporting new issues or adding additional information to existing open issues. – Kos Sep 27 '22 at 08:02
  • @Kos https://github.com/lwouis/alt-tab-macos/issues/533 https://github.com/lwouis/alt-tab-macos/issues/510 https://github.com/lwouis/alt-tab-macos/issues/643 All of these issues are mine. There are lots of unresolved issues too. – kodmanyagha Sep 27 '22 at 11:54
  • I almost gave up using mac just for this functionality and no exact equivalent of notepad++. Thanks. – Hem Feb 15 '23 at 18:32
7

Another option is to 'hide' the application using ⌘(command) + H rather than minimizing it. This way you can use ⌘(command)+tab to select the application and bring it to focus like Windows.

Chris
  • 213
  • 2
  • 3
  • 5
    Windows has a window-based switcher, while OS X has an application based switcher. Your answer does not seem to address that fundamental difference. – Daniel Beck Jul 25 '12 at 11:48
  • 1
    That's true it doesn't, but the high level question is also how to make the Mac 'behave' more like Windows alt-tab. As you say the biggest difference is the window vs application behaviour but another key difference in the behaviour is that in Windows when a window is selected with alt-tab it is maximized even if it had been previously minimized, this doesn't happen in the Mac. Using ⌘(command) + H rather than minimizing means that when an application is later selected with ⌘-tab it is automatically brought to the front and I see this as behaving more like Windows. – Chris Jul 25 '12 at 12:32
  • After googling like a madman for a simple answer, this is the best one I found. Instead of the CMD+M I'll use CMD+H and that's that. Thanks a lot. – PatrickT Nov 10 '13 at 09:01
5

For me the best option is contexts. Just check their site, app is amazing and beat all other solutions (and believe my, I try almost all of them). It's not yet perfect, but for me, competition is miles behind.

SuitUp
  • 548
  • 2
  • 7
  • 17
5

As a user with the same need, so far Witch is really the best answer. It provides a recent window switch behavior very much like Windows/UNIX.

The one drawback I've experienced, is that when you close a window in MacOS, it brings the next window from that application forward -- very annoying behavior when you expected to get back to the window from the OTHER application underneath. I'm doubtful there will be a way to fix this behavior.

For users who don't understand why Command-Tab is not a viable alternative.... Command-Tab brings ALL of an application's windows forward, which is not the desired behavior. Switching quickly between 2-4 recently used windows without disturbing any other windows is very easy with windows-style alt-tab, and very hard with mac Command-tab command-tilde.

David Jeske
  • 231
  • 3
  • 3
  • @SuitUp Change what where? Not sure if you are referring to OSX or Which. Can you elaborate? Thanks! – Lee May 03 '16 at 17:46
4

You may want to try Optimal Layout as well: it combines powerful application and window switching with instant preview of window content + grid based window resizing and layout if needed.

Philippe
  • 41
  • 1
4

Option + Tab switches between windows like Windows. Shift + Option + Tab to reverse cycle.

If it's not working check Keyboard Shortcuts Move focus to active or next windows and set to Option + Tab.

Sam Inverso
  • 267
  • 2
  • 4
  • 1
    This worked for me. Default was ^F4. – dokkaebi Sep 05 '13 at 00:44
  • 2
    This is not exactly like windows: it doesn't implement a stack, so Option +Tab, Option + Tab doesn't take you back to the window you started at. Still a useful addition though thanks. – ahcox Oct 04 '17 at 17:22
  • Pointed out elsewhere - without LRU (see parent question discussion) the OSX built in system lacks. Especially when switching between two windows to copy/paste data - ex from an email to a spreadsheet both in chrome - keeping the fingers on alt tab and flip/flopping is great. – Jonathan Jul 26 '21 at 17:45
-1

I just found that there's another alternative, that I'm using on my Ubuntu machine: there I switch between applications using Alt-Tab and between their windows using Alt-^ (which is the button on the top left corner on a German keyboard layout; on US keyboards it's actually ~ as Krishna pointed out). This way you only have to lift your finger a little higher when you want to switch windows of the current application.

To set that shortcut change Settings > Keyboard > Move focus to next window to -~ (DE: -^)

Stefan
  • 99
  • 2