Consistent Tab Navigation in OSX

Tab navigation is one area where the OSX user experience seriously lacks consistency. It seems like every application implements a different keyboard shortcut for 'next tab' and 'previous tab'. I am a person who uses lots of tabs in many different programs, and I prefer to do as much as possible from the keyboard. Reaching back and forth from keyboard to mouse is a pain. The fact that it's a different key combination in every application is a serious annoyance.

I've taken things into my own hands and tried to hack some consistency out of this keyboard jungle.

First, some examples of key combinations which navigate the the previous/next tab:

  • Terminal : command+{ and command+}
  • Adium : command+left-arrow and command+right-arrow
  • TextMate : option+command+left-arrow and option+command+right-arrow
  • Firefox : control+tab and control+shift+tab

Seriously. This is a bad joke. Tabs are a phenomenally useful feature, implemented in many many programs. There should be some unified way of interacting with them.

I normally think that customizing key combinations is a bad idea. When your normal work environment is heavily customized, it makes it that much more foreign when you have to work somewhere else. Or, when you upgrade your machine, it's that many more steps you have to try to remember to recreate what you customized. But, in this case, I've just had enough, and I'm customizing my key layout. Risks be damned!

My main weapon in this fight is the System Preferences > Keyboard & Mouse > Keyboard Shortcuts dialog. Here, you can define (or redefine) keyboard shortcuts for any menu item a program provides. Switch to the application you want to customize, browse through the menus until you find the command you want to create (or redefine) a shortcut for, and add this to the bottom of the dialog under 'All Applications'.

tab-shortcuts

Right now, I'm trying out option+left-arrow and option+right-arrow as my tab navigation keys. These combinations don't seem to already be in use in any of the applications I care about, they feel fairly intuitive, and they're easy to type. Leave me a comment if you have another scheme you prefer.

Firefox is a different animal. 'Next Tab' and 'Previous Tab' aren't exposed as menu items, so the strategy above won't work. The solution is to install the keyconfig extension. You can read all about it at http://kb.mozillazine.org/Keyconfig_extension. After installing the extension, restarting Firefox, and browsing to Tools > Keyconfig, you get a dialog like this :

firefox-keyconfig

Select 'Keyconfig' from the dropdown menu (which says 'Consistent Tab Navigation in OSX | Deanspot.org' in the screenshot). You will see an 'Add a new key' button. Click that, and give your new key a name. In the 'Code' section, use the following :

  • Previous Tab : gBrowser.mTabContainer.advanceSelectedTab( -1 );
  • Next Tab : gBrowser.mTabContainer.advanceSelectedTab( 1 );

Click 'OK' to save, and you've now created a new 'key'. All that remains is to assign a combination of keystrokes which activate this command. Click on your 'key', click in the input box below (which says 'Left Arrow' in my screen shot), and press the keys you want to use. Of course, I used the same combination I mentioned above.

So, no whales saved. Global warming not halted. George Lucas dialog-writing unfixed. But I now have eliminated one major reason to touch my mouse minute to minute, and that feels like a small victory.


You are absolutely right, major consistency annoyance. I was already giving up!
Thanks so much for pointing me to the custom keyboard shortcuts method.

Victory indeed!

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.