Saturday, April 30, 2005

Firefox 1.0+ Tab Switching

If you miss switching tabs with CTRL+1, CTRL+2 ... CTRL+N key combinations from Firefox Keyconfig extension. It lets you modify some (not all) default key bindings. It is also possible to create new keybindings. You can create new keybindings from the Keyconfig dialog (Tools->Keyconfig). Then enter the following code in the code box. After that press CTRL+1 in the key capture textbox.

/* CODE */
gBrowser.mTabContainer.selectedIndex=0;

This will let you switch to Tab 1 by pressing CTRL+1. For Tab 2 do the same with selectedIndex value set to 1 and so on.