using F19/F20 to switch tabs in thunderbird 3

i just switched over from thunderbird 2 to the new sparkly thunderbird 3 — and i like it very much. particularly the tabbed user interface is quite nice but also lightning 1.0 seems to cope much better with those lotus notes generated calender invites :-)

what did bother me was that i couldn’t find an easy to use function for keyconfig to bind the page left and page right keys (aka F19 and F20) of my X200 keyboard to “previous tab” and “next tab”. after some digging i stumbled across the mozilla thunderbird 3 tabmail page which then allowed me to figure out how to create the code for keyconfig:

[sourcecode language=”javascript”] // next tab var windowManager = Components.classes[‘@mozilla.org/appshell/window-mediator;1’]. getService(Components.interfaces.nsIWindowMediator); var winId = windowManager.getMostRecentWindow("mail:3pane"); var tabmail = winId.document.getElementById(‘tabmail’) tabmail.switchToTab((tabmail.tabContainer.selectedIndex + 1) % tabmail.tabInfo.length) [/sourcecode] and [sourcecode language=”javascript”] // previous tab var windowManager = Components.classes[‘@mozilla.org/appshell/window-mediator;1’]. getService(Components.interfaces.nsIWindowMediator); var winId = windowManager.getMostRecentWindow("mail:3pane"); var tabmail = winId.document.getElementById(‘tabmail’) tabmail.switchToTab((tabmail.tabContainer.selectedIndex + tabmail.tabInfo.length - 1) % tabmail.tabInfo.length) [/sourcecode]

copy & paste the code snippets and use keyconfig’s “add key” feature to bind the code to whatever key you’d like to use.