For the true geeks among you, you can now scroll through comments and posts on this site by using keyboard shortcuts — pressing ‘.’ (the period key) scrolls forward, and pressing ‘,’ (the comma key) scrolls backward. Thanks to Sam Ruby for inspiring me (and for the Javascript that I used as the basis for my resultant scripts), and to MetaFilter for being a good testing sandbox.

(For those who are interested, the choice in keys comes from reBlog, the web-based syndication aggregator I use. I’ve gotten so used to scrolling between posts with the period and comma keys that I started to unconsciously use them on other sites; that’s when I knew that I should look into how to set up the shortcuts here at home. Convincing Matt to give ‘em a whirl over at MetaFilter wasn’t too hard… seeing as he was the one that turned me onto reBlog!)

Comments

Notice that in Opera, the ‘.’ and ‘,’ keys are used for find-as-you-type and find links, respectively, and so the script won’t work out of the box.

• Posted by: Arve Bersvendsen on Apr 26, 2006, 9:40 AM

Very cool!

• Posted by: minda25 on Apr 26, 2006, 4:42 PM

Doesn’t appear to work too well in Camino. Pressing these keys finds instance os . and , on the page but it doesn;t “scroll” as you suggestl it jumps to the next period or comma in the page.

• Posted by: Cameron Barrett on Apr 26, 2006, 5:11 PM

Alas, you’re getting hit by Camino’s Find-as-you-Type functionality, which is overriding any keyhandlers on the page. Just curious: does it also override the keyhandlers for GMail or for Bloglines?

Interestingly, I just downloaded Camino, and don’t have this problem, so Find-as-you-Type isn’t enabled by default. In any event, you can turn off Find-as-you-Type using a hidden pref, it appears.

• Posted by: Jason on Apr 26, 2006, 5:16 PM

Mike Frumin (co-author of reBlog here). First off — sick!!!

With firefox’s Find-as-you-Type turned on, the ‘.’ and ‘,’ don’t work for me, but they work when I turn it off. However, in reBlog they do work even with f-a-y-t turned on.

maybe dig into reblog and see how we solved that (as if I remember!!!)

• Posted by: mfrumin [TypeKey Profile Page] on Apr 27, 2006, 11:05 AM

Mike, thanks for the info! It’s nice to know that it’s possible to override that. Looking into your code, it appears that the way to do it is just to return false after handling a specific key press — that way, the browser doesn’t complete its own processing of the key press. I just implemented that here and it looks like it works perfectly… but of course, “perfectly” is a word that implies that I *should* be overriding the browser’s processing of keys. I’m still undecided on that… I’ll see how this goes for a little while.

• Posted by: Jason on Apr 27, 2006, 4:26 PM
Please note that comments automatically close after 60 days; the comment spammers love to use the older, rarely-viewed pages to work their magic. If comments are closed and you want to let me know something, feel free to use the contact page!