{"id":963,"date":"2015-06-20T11:32:12","date_gmt":"2015-06-20T15:32:12","guid":{"rendered":"http:\/\/blog.alanporter.com\/?p=963"},"modified":"2015-06-20T11:32:12","modified_gmt":"2015-06-20T15:32:12","slug":"thunderbird-keyboard-hack","status":"publish","type":"post","link":"https:\/\/alanporter.com\/blog\/2015\/06\/20\/thunderbird-keyboard-hack\/","title":{"rendered":"Thunderbird keyboard hack"},"content":{"rendered":"<p>I&#8217;ve used Mozilla Thunderbird to read my email for years, and for the most part, I think it&#8217;s a pretty nice email client. But lately I&#8217;ve developed an itch that really needed scratching.<\/p>\n<p>I tend to use the keyboard to navigate around through applications, and so in Thunderbird, I find myself using TAB to switch between the list of mail folders on the left and the list of messages on the right.\u00a0 The problem is that a few years back, when they added tabbed views, they changed the way that the TAB key works.\u00a0 (I&#8217;ll try to be clear about the tabbed views and the TAB key, which unfortunately share the same name).\u00a0 After the addition of tabbed views, the TAB key no longer toggled between just the (1) folders pane and (2) messages pane, but now it toggled between (1) folders pane (2) messages pane (3) tab selector widget.\u00a0 So that means I had to re-train myself to press the TAB key once to go from folders to messages, and twice to go from messages back to folders.\u00a0 But it got worse.\u00a0 If you turn on something like the Quick Filter, the TAB key toggles between (1) folder pane (2) messages pane (3) tab selector widget (4) the Quick Filter.<\/p>\n<p>Basically, the TAB key works like it does in a web browser, which is pretty much useless when there are so many widgets that can accept focus.<\/p>\n<p>Today I discovered that what I was really looking for was the F6 key.\u00a0 It strictly changes focus among the visible window panes.\u00a0 For me, most of the time, that&#8217;s (1) folder pane (2) messages pane, but if I turn on message previews (rarely), it expands to (1) folder pane (2) messages pane (3) preview pane.<\/p>\n<p>THIS MAKES SENSE.\u00a0 Within the main window (tab) that I am looking at, the F6 key moves between the major window panes.\u00a0 Awesome.<\/p>\n<p>However, wouldn&#8217;t it be cool if I could use the TAB key to do this focus-switching, instead of lifting my fingers off of their pseudo-home position to get way up to F6 (which I can&#8217;t find just by feel &#8212; I have to look down at it)?<\/p>\n<p>A little bit of searching led me to extensions, such as the very old but still usable &#8220;keyconfig&#8221;.\u00a0 This is a pretty opaque tool that lets you insert some sort of arcane code into the <code>prefs.js<\/code> file.\u00a0 Basically, it did not help me do anything, but it did help me understand how keys are mapped.\u00a0 Deeper searches led me to the &#8220;DOM Inspector&#8221;, which lets you view the document that is being rendered (apparently, views in Thunderbird are pretty much HTML documents, which I suppose was hip at the time).\u00a0 That led me to some of the arcane codes that are mapped to certain keys.<\/p>\n<p>So here&#8217;s what I tried.\u00a0 I looked at the arcane code that is mapped to F6, and I looked at the way &#8220;keyconfig&#8221; inserted some mappings of key names and their arcane codes. And I mimicked it.\u00a0 I just added this line to <code>prefs.js<\/code>:<\/p>\n<pre>user_pref(\"keyconfig.main.xxx_key75_SwitchPaneFocus(event);\", \"][][VK_TAB][SwitchPaneFocus(event);][\");<\/pre>\n<p>And wouldn&#8217;t you know&#8230; it worked!  Now the TAB key does what the F6 key normally does&#8230; it switches focus among the main window panes in the active tabbed view.  Yay, lazy fingers cheer!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve used Mozilla Thunderbird to read my email for years, and for the most part, I think it&#8217;s a pretty nice email client. But lately I&#8217;ve developed an itch that really needed scratching. I tend to use the keyboard to navigate around through applications, and so in Thunderbird, I find myself using TAB to switch [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,5,15],"tags":[],"class_list":["post-963","post","type-post","status-publish","format-standard","hentry","category-software","category-geek","category-tips-tricks","count-0","even alt","author-alan","last"],"_links":{"self":[{"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/posts\/963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/comments?post=963"}],"version-history":[{"count":0,"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/posts\/963\/revisions"}],"wp:attachment":[{"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/media?parent=963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/categories?post=963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/tags?post=963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}