January 10th, 2008
I’m a big fan of Google Reader. Let’s just say I’m subscribed to more than a few feeds. I use the keyboard shortcuts to quickly read and scan through my reading list. To keep my pace I’ve come to open articles that I want to think about more, or ones that I want to read more in depth in background tabs. Usually this involves the laborious task of moving my hand from the keyboard and middle-clicking with the mouse. Painful. Time-wasting. Distracting.
All the hard work goes to Sunny Wu who provided the solution. I tweaked his version to use the “h” character instead of “v”.
I wasn’t sure what kind of event this handler receives and so I wasn’t sure how to determine that a “h” was pressed. Firebug to the rescue, I just added the following line to just print out the value to the Firebug console.
Sidenote: Ever wonder what event is sent for crazy modifiers like shift+3 or shift+s? I thought it might be something complicated—where you’d check if modifier keys were pressed on the keyboard event. I was thinking too much. Shift+3 ends up sending a #, shift+s sends a capital S. Who would have thought?!
Just change the first “if” to compare against 104 instead of 118 and h is the man.
I changed to h since, well, first, v currently opens the article in another tab that immediately takes focus—handy at times. Second, well, if I use h instead, I can navigate mostly with just my right hand :)