AltTab – Windows alt-tab on macOS
alt-tab-macos.netlify.app
alt-tab-macos.netlify.app
MacOS is app-centric, so you have a keystroke to switch between apps and a keystroke to switch through the windows of the app. Windows is window-centric rather than app-centric, with a unified window stack so a single keystroke (Alt-Tab) always takes you to the previous window, regardless of what app is responsible for that window. Repeated Alt-Tab's take you back through your most recently used windows, regardless of the Apps involved.
OSX users generally can't imagine not knowing what apps their windows are associated with, and Windows users generally can't imagine being expected to care what apps their windows are associated with.
The difference is largely a historical artifact of the Macintosh operating system not originally supporting "multitasking." When the Mac first came out, it could only run one application at a time. If you wanted to switch between a spreadsheet and a word processor you had to close one application and open the other. Then the concept of a "switcher" was invented, which gave you the sense that the Mac was running multiple applications because it could do app-to-app context switching behind the scenes to make it feel like you were running multiple applications simultaneously. All of this meant there was no OS-level concept of "the window stack" there was only an app-level concept of window history, and a separate OS-level concept of app history.
Windows launched after the Mac, into an era of slightly more powerful processors and better understanding of user behavior on truly multi-application devices. These differences led Microsoft to adopt an OS-level unified window history model. Apple undoubtedly discussed the idea, but even by the time Windows launched Mac users were fully accustomed to the Mac's windowing model and would have complained mightily at the conceptual switch had it been attempted then or at any other point in time.
The more time you spend in one ecosystem, the more natural its approach feels to you, because you adapt to your environment over time.
I hate to say, I’m still not following you :) I have spent plenty of time developing of both Mac & Windows systems. I still can’t think of any difference in behavior.
What you said In Windows ”with a unified window stack so a single keystroke (Alt-Tab) always takes you to the previous window”, this is the same on Mac. A single press of “Cmd-tab” always goes to the previous window. So if you press it, release & repeat, you will just keep toggling the same two windows. Same behavior.
Mac, as you mentioned gives you an extra layer, where you can cycle windows of the same App ‘type’ with “Cmd - `”. Which I find very useful, and actually miss when I’m on Windows.
What am I missing? “Alt - tab” & “Cmd - tab” have the same behavior, no? Then Mac gives you the extra “Cmd - `”. Why would I want them Windows behavior? Maybe I should just download it and try for myself haha.
Hold cmd and press tab on a Mac, notice that it doesn't even show windows, it shows app icons.
That’s a good example. So “Cmd - tab” brings all the windows of a particular app to the forefront, but shows the most recent, while the others are ‘buried’. Then requiring the “Cmd - `” to dig out the older ones.
Yeah it’s subtle, but I see the difference now, thanks for setting me straight!
Apart from when, due to a bug in recent macOS, it brings up a different window. Which is incredibly frustrating.
This is a nice story, but reading on it seems like you're saying that the way app switching works on Windows as the Obvious and Correct thing to do, and that the Macintosh way of doing things is nothing more than a choice that was made too long ago to change.
Honestly, that's absurd.
The Macintosh has a menu bar at the top of the screen which belongs to the foreground application. This is a reasonable place to put a menu bar, because it is easy to click on things which are at the edge or (better yet) corner of the screen. This is a perfectly reasonable justification for having a foreground application.
Windows places the menu bar inside each window. So there is no need for "foreground application", only foreground window.
That's all that you need in terms of explanation. The Mac puts its menu bar at the top of the screen, Windows puts it inside each window. There's no need to tell some story about how the Macintosh was created during a more primitive era of computing history, because that story has no explanatory power.
I have always been a windows user and my intuition was shaped accordingly. So to me that is the obvious and correct thing to do.
There are exceptions on both platforms, games being common because of how they grab input.
I've long since gotten in the habit of using the title bar or window-resizing area to safely activate a window .. when I'm using the mouse to change focus.
In Windows XP days the behavior was very different and could be argued to be similar to any or all of those macOS components as Explorer was all of those things under one process for efficiency reasons.
I think it's a lot more fair to say that other desktop environments lack an equivalent because they don't have a cohesive notion of "application" in the first place, though influence from OS X/macOS has been pushing other desktop environments in that direction (see eg. the evolution of the Windows taskbar)
I find it convenient to be able to have an application with no windows. The big reason is for applications with longer startup times—unfortunately, something we don’t have a good solution for. The other thing I like about it is that I can close a document and create a new document without figuring out if I need to reopen the application after closing a document. Closing a window only closes the application for cases where that makes sense (System Preferences).
The exception to this is applications which can only display one window, such as System Preferences. Close that one window and the application will also be quit. As a lifetime Apple user dating to before the Mac, it's no issue for me, and I can understand the interface logic in play there, but to common users that logic is not apparent. I've seen plenty of average users who switched to Mac from Windows and they are usually baffled because to them the idea of "Xing out the last window" should always means the application is now quit.
Except when you start having multiple monitors. Then it's an utter mess, and I have no idea how the Mac-enthusiasts are putting up with it. And as far as I'm aware, most actually kind of don't - the few mac-enthusiasts that I know all use their customized setup that heavily relies on third-party-tools.
The absurd thing to me is that macOS didn't adopt this simpler workflow model.
No one is trying to throw out the baby with the bathwater here. macOS is a very good OS. Windows does this one aspect better.
I may have chosen the applications on my machine for many reasons, but ultimately I want to switch between files/documents because they are the real context. The rest is noise.
Yet Microsoft seems to be walking away from this model.
The Windows Taskbar was built on that, but has since diverged quite a bit from that model. The Windows 95 taskbar originally showed one entry per Window, until Windows XP started grouping Windows together when the Taskbar gets too crowded. Then Windows 7 started hiding the labels and made the Taskbar into a combined program launcher/window switcher, which now made the behavior of clicking on the icon itself very inconsistent, depending on the state of the program:
- when no instance of the program is running - shows the launching program animation and launches the program and brings the window on top
- when program has one window minimized - shows the unminimizing animation and brings the window on top
- when has one window not in focus - brings the window on top
- When program has one window on top - shows the minimizing animation and minimizes the window
- When program has multiple windows - opens the Taskbar Live Preview
1: https://www.howtogeek.com/259378/how-to-quit-the-finder-in-o...
Only by a little bit of time in some regards; for Windows 1.0 Microsoft first presented it to the public on November 10, 1983. The first retail release, originally slated for release in April 1984, Windows 1.01, was instead released on November 20, 1985. System 1, the classic Macintosh System Software was released in January 1984.
Also, yes, the Lisa was arguably the first to ship with the Desktop graphical interface most like the Macintosh prior to that even.
I'd posit that both Windows and Macintosh graphical user interface designs started around the same time effectively due to the market and depending on whether you were in the education or business sector, you could perceive the pervasiveness of each wildly differently.
I personally believe the Macintosh designers' early choice to heavily lean on skeuomorphic designs and its popularity in the nascent Desktop computer publishing industry reinforced the architectural multi-tasking choices made early in its development.
I agree though that Windows probably hit its market stride around 3.x, especially with Windows for Workgroups which brought serious competition for Novell.
With multiple monitors more prevalent now, the application switching model is definitely broken. Command-tab raises all windows for an application across all monitors. This is super annoying.
I mean, even Gnome gets this wrong but at least there's a toggle to fix it. I hope Apple can come to terms with this and fix it some day.
It's pretty customizable, so everyone's experience and preferences will be different but here are some of mine.
1. Command + Tab > Cycle all windows, within all spaces, on active screen (rather than all screens).
2. Command + ` > Same as above, but only for the focused/active application.
3. Customized size of thumbnail, font, items per row, and overall screen real estate.
4. Mouse location = active screen
5. Hidden windows show at the end of the cycle
It looks like this tool just simplifies it and gets rid of the hierarchy, so you don’t have to remember which application owns the window you’re looking for.
I press command+tab, keep holding command, and then press up or down arrow, and the list of application icons just fades from view.
Any chance you could point me in the right direction?
Perfect example, I'm looking in Safari, and entering some numbers in Excel. I have multiple windows open for each app. I'm in Excel, and CMD+tab to switch to Safari, and all the Safari windows come forward, coving up my Excel window. CMD +` only cycles the windows of the current app. There is no easy way to bounce back and forth between a specific Excel window and a specific Safari window. Instead I have to Hide or rearrange my windows so that switch apps doesn't complete cover the windows I want to see
Instant app switching with rcmd + visual window switching for multi-window apps like Xcode, Sublime Text etc.
It’s similar to what I had on Windows with WinKey+number and their integrated AltTab thumbnails but better since I don’t have to count the apps in the taskbar to know which number to press, and I can AltTab only through the current app windows if I want.
Most people trying out rcmd tell me that in less than a day it has become something they can’t go back from so it feels pretty nice to know I’ve improved at least a few workflows ^_^
I use it to simply bind hotkeys to shell commands in a single config file.
Given the full power of the shell, you can even use AppleScript (through osascript) if you want to automate the UI/system like AutoHotkey does.
It can also send key events using the -k flag so you can remap keys to other key combinations.
It can even create simple and quite useful UIs, here’s an example of someone using it to create a stack visualizer for the yabai window manager: https://user-images.githubusercontent.com/1683979/90967233-0...
Anyone know of a way to get that behaviour in Windows?
I don’t have a solution for you, but if you used the complement feature cmd-` (switch between open windows of the currently focused app) I did implement that for Windows: https://neosmart.net/blog/2017/easy-window-switcher/
Pinning the app will assign it an index (the icon won't change position) so you can switch to windows of your editor with Win+2 and windows of file explorer with Win+1 without even looking at the taskbar, for example.
Here's a detailed description from HowToGeek[0]:
> Press the Windows key along with a number key to launch the corresponding app. On the taskbar above, for example, Windows+3 would launch Google Chrome, Windows+4 would launch Slack, and so on all the way up through Windows+0 for Outlook. Using these keyboard shortcuts on an app that’s already running will toggle the app between a minimized and maximized state.
> You can also hold down Shift while using those shortcuts to launch a new instance of an app that’s already running. In our example, pressing Shift+Windows+3 would open a new window for Chrome, even if Chrome is already open.
> Using the Ctrl key with those shortcuts displays the most recently launched instance of an app. For example, say you had three File Explorer windows open on your PC, and File Explorer was in the first position on your taskbar. Pressing Ctrl+Windows+1 would show you the File Explorer window you most recently opened.
[0]: https://www.howtogeek.com/276982/the-most-useful-keyboard-sh...
I've never actually needed to use it, but that sounds like the default can do this without taking your hands off the keyboard?
The other thing that works well with this for a life upgrade on a mac is finicky (GitHub.com/johnste/finicky )
I have Chrome as the first app in the dock, so it's Cmd+1. Slack is second and is Cmd+2.
It's so simple. I love it. I tried to achieve the same with Automator but it was unreliable.
press the up arrow
let go of command
press tab to cycle through windows in their size as they originally appeared, preview and all
option+< and option+> to resize window to left and right, and option+p to maximize. And also control+j and control+k to switch tabs in browsers and terminals.
Probably there are also native shortcuts for that, but I like how I can make mines consistent across all apps.
⌘ Command + ` to switch between windows of same program
It kind of works in the terminal, but only partially, and not in any other application.
Made the switch to alt-tab, and glad I did.
The AltTab thing here will switch between all windows of all apps.
I actually like having them separate like OSX does it, even though I'm generally a Windows guy.
It does not have a key command that is 100% identical in behavior to Alt-Tab.
That bugs some people, it seems.