Switch Between Files of Different Applications (Windows-Style Alt-Tab)

Hi, I'm trying to switch between a given file in one application (say a specific browser window), and into a file in another application like a text editing file. I'm basically looking for the same behavior as windows "alt + tab". There was a previous question in the forum but no advice on how to set up a macro to do this (Windows command tab equivalent). Has anyone set up a macro to do this type of app/file switch?

⌘Tab ?

While you are holding down ⌘ in macOS you can move between app icons with Tab (and tap Q to close any of them, or release ⌘ to switch to the selected app).

Relatedly, if you're holding down Command while an app is selected in the Command-Tab application switcher, pressing the Up or Down Arrow key will show all windows for the selected app. From that presentation, arrow keys can be used to highlight a window and Space Bar will select the highlighted one.

@sottovoce
None of that is the same as the all-windows style of the Windows Alt-Tab switcher, but it's close, and kind of intentionally different since Mac operating systems are application-focused and Windows systems are, well, windows-focused. There have been Mac apps which replicate the all-windows style of the Windows switcher. For example, this app called AltTab:

https://alt-tab-macos.netlify.app

The other option to note is Mission Control for getting a display of all app windows. On my system it's set to Control-Up Arrow, but I'm not certain if that's the default or a custom shortcut. The system setting is shown in System Preferences > Keyboard > Shortcuts > Mission Control. It can also be invoked with an Apple Trackpad gesture if you have a notebook or external trackpad.

1 Like

@NaOH, I appreciate the help. I've downloaded the the alt-tab utility and so far so good -- I think it will do what I need. The alt-tab muscle memory is just too strong from years of working on a Windows machine. Thank you also for the tip about Mission Control -- I set up the same shortcut as you but it seems that navigating between windows requires a mouse so I probably won't use it much.

Just to make certain you know this since people coming from Windows often don't learn of it quickly, obviously Command-Tab switches between Mac apps. Command-Tilde (the key above Tab) switches between windows within the app that's at the front.

1 Like

The details of that one may depend on:

  • locale variations in keyboard layouts (backtick and tilde are not always above tab)
  • a setting in System Preferences > Keyboard > Shortcuts

In the region from which I am writing, for example it is defined as command backtick, and needs to be explicitly enabled:

(and as it happens, local hardware here places the backtick above ctrl, rather than tab)

1 Like

I should have said Back Tick like you described as Tilde would actually require the Shift key on a US English keyboard like I use.

Thanks for sharing that. All these years of using CMD-TAB, I never knew that.
For the last year or so I've been using the KM Application Switcher, which unfortunately does not support the window switching. @peternlewis, maybe an enhancement could be done?

Here's another, similar one that's not well known. Using Mission Control to display all windows of the frontmost application, following that by pressing Tab switches through the all-window display for each running application. Caveats:

  1. On my system, invoking that Mission Control view is Control-Down Arrow but I'm not certain if that's the default shortcut (or what the Trackpad gesture is), and
  2. it's possible anything described here has changed since I run an older OS (10.11.6).

Once the windows for an app are shown, it's possible to arrow through them to select one (it gets the highlight ring around it), then press Space to bring it forward, though on my system bringing it forward does not mean active; it requires being clicked on.

Correction/Addition: Arrow keys give a window the highlight ring, Space brings the highlighted window forward, and Return or Enter will make the highlighted window active.

I use HyperSwitch (free) to switch between the "Current App's windows" using Option+Tab (and use the default OSX Command+Tab for switching between windows from different apps).

I recommend the incredibly powerful and sleek Witch (https://manytricks.com/witch/) to switch fluidly between apps and windows!