Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Mac is the only thing where alt-tab falls on its face. Even if you remind yourself that you're on Mac and use cmd-tab...

But alt on a Windows keyboard layout and and command on a Mac keyboard layout are the same key location, so I don't understand how you can be confused by this... maybe stop looking at the keyboard?



Mac differs between switching windows and applications.

So if you work in an IDE, keep reading docs in one Firefox window and test your application in another Firefox window then in KDE or XFCE or another sane windowing system[1] - even Windows - you just use alt - tab.

On Mac you have to stop an think: Should I switch to another browser Window? Ok, that is CMD - backtick. Switch to or from IDE? That is CMD - tab.

Press the wrong combination? Now Cyberduck has entered the mix.

[1]:I was about to write Windows or Linux but starting with Unity and now also Gnome has copied this to be bug comptible with Mac


Also the whole paradigm breaks down on macos if you have multiple desktops. Suppose you have one terminal open on desktop 1, and a browser and terminal on desktop 2. From the browser, if you cmd tab to switch to terminal, it will never go to the terminal on desktop 1, even if that was the last window in focus.


Personally i like how Window Maker does it: you can switch between all windows like in Windows, KDE, XFCE and most other floating window managers (by default on Alt+Tab) but you can also switch only between the windows of the current group (usually all windows of an application belong to the same group) or quickly toggle between the last two workspaces (what WM calls virtual desktops). The last two aren't bound to keys by default, but personally i have those set to Alt+` (sort of taken from when i used a Mac for a while) and Win+Tab respectively.

The only annoyance is that it doesn't seem to distinguish between window types so, e.g., in GIMP in multiple window mode it also cycles between utility windows like the toolbar, options, etc instead of only the image windows - though some applications do not even bother providing window hints about their window types.


> but starting with Unity and now also Gnome has copied this to be bug comptible with Mac

This is simultaneously one of the saddest and funniest things I've read about GNOME in a while (which has a surprisingly high bar on both accounts)


Here's how to fix it in Gnome :)

Settings -> Keyboard -> View and Customize Shortcuts -> Switch windows -> Alt + Tab


And for completeness, on the command line

gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"

gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']"

gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]"

gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "[]"


The bigger issue is that command-tab switches between apps, not windows, and command-` switches between windows in the same app, and neither work across spaces.

I ended up installing https://alt-tab-macos.netlify.app/ which adds a keystroke that will cycle through all windows in all apps on all spaces. It's a huge improvement.


Command left/right arrow, for example, switches between terminal windows in different spaces, and to terminal windows within the same space as well. Press the shift key as well to shift between tabs. (At least on my MacBook Pro's Japanese keyboard.) I don't recall have modded this behavior.


That's definitely better than command-`, thanks.

It's still not as nice as alt-tab, though. Frequently most of my windows are a mix of terminals and browser windows. I may be using several web apps and several command-line tools. Having to think about whether the application I want to switch to happens to be using the same "shell" application is not helpful.

I just want to be able to use one key to cycle through all windows in all spaces, and which lets me easily flip between the two most recent windows. Windows (and virtually every Linux DE) has had this for decades. It amazes me that macOS only recently got this, and only because of a third-party tool.


Yes, Alt-Tab is a HUGE improvement over Apple's implementation because it not only restores minimized apps as it should, but can also create a window for a running app that lacks one (with Finder being a critical example).


Hold option as you release cmd and it will behave as you describe (opening the default window for an app with no open windows, restoring minimized apps… it’s equivalent to clicking the Dock icon for that app)


If you use the same keyboard for both, by default they end up in different places. The Mac treats the Windows key as the Command key, and the Alt key as the Option key.

(You can tweak this, if you need to, in System Preferences, Keyboard section, Keyboard tab, Modifier Keys... button.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: