Switching to OS X, Obstacle 2: Switching between windows
In OS X, Cmd-Tab switches between applications, and not between windows as under Windows or most Linuxes. That’s OK, in fact, I think I like it (I’m note quite sure yet).
However, I of course also want to switch amongst the windows within an application, using the keyboard. And here is where it gets tricky. Because whoever decided on the keys for that did something immensly stupid. He (or possibly she) decided to use Cmd+`. Yes, the grave accent key. This is fantastically stupid, because that is not a control key, and hence it moves around. It also means that switching the other way around is Cmd+~. Tilde. Many non-US keyboards doesn’t even have these keys, and they sure aren’t placed in a handy way. With the Swedish keyboard I could use the rather unpractical Cmd+Shift+´ (which is up by the backspace key) one way but the Cmd+Alt+¨ (by the enter key) does not work to switch the other way. Not very handy. I would like Alt+Tab or something reasonable like that.
I tried various ways of fixing this. You can set up Keyboard Shortcuts in the System Preferences, but it can’t map combinations of control keys the tab key, so my preference of using Alt-Tab wouldn’t work, and it also can only map keys to menu commands, and there is no menu command for switching windows in most applications. So that failed for two reasons.
I downloaded Ukulele, which is a cool app, and fiddled round with it. But although you can remap control keys, you can’t map combinations of control keys, and you can only map them to other control keys. I’ve been looking for a keyboard remapper for Unix that can do what Ukulele can, because I want to create a more programmer friendly keyboard that till has Swedish characters, so I will probably use Ukelele anyway, but in this case it didn’t help.
I found a script to help change the idiotic Mac behavior of Home+End of moving to the start end end of the document, to normal sane behaviour of moving to the start and end of the line. That doesn’t help me at the moment as I don’t actually have Home+End keys, but I thought the same technique might work for remapping the window switching. But no, as you can see in this overview there simply is no command to switch windows. This technique only works for text editing stuff (and not always that either, but that is another topic).
Finally I then discovered Witch, a utility to set up window switching in a quite flexible way. Currently I retain the Mac style application switching on Cmd+Tab, and have Witch set up to switch the windows within an application with Alt+Tab. If you want to remap Cmd+Tab to switch between all windows, then haha, you can’t, OS X doesn’t allow that, unlesss, you use another tool, called PullTab, which in turn requires a framework called APE to be installed. With this Cmd+Tab gets available for remapping by Witch as well.
Now, if you come from a Unix world you might expect all this to be open source and for free, but this is not Unix, it’s Apple. APE is free to use, but the SDK costs money, so if you want to make your own enhancements with APE it’ll cost you $100. Witch is shareware, but the registered price of €9.95 is well worth it, IMO. PullTab is free, though, so having sane application switching in OS X will cost you only ten euros. It’s well worth it, but wasn’t Mac supposed to be fantastically useable and have a well throught out UI, from the start?
On the other hand, all the companies and websites involved in this has such lovely names, like “Many Tricks”, “Raging Menace” and “Unsanity” that at least the community keeps you giggling through the troubles.
So, now the keyboard troubles are finally over, right? Wrong!