December 9, 2009
filed in the early evening by DrScofield in: hacking, linux
technorati tags:
QR code for this entry · average time to read 0:57 minutes

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:

// 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)
and
// 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)

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

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.