camdez.com

Rule #1: There are no rules.

Keyboard Shortcuts for Octopress Sites

| Comments

Nerds love Octopress. Nerds love keyboard shortcuts. …need I say more?


I added mutt / Gmail-style shortcuts to Octopress and I think it turned out pretty well. Go ahead and try out some of these shortcuts (but be aware that some of them only function within the context of a list of posts—like the homepage):

jNext article
kPrevious article
^First article
$Last article
RETView full article
rComment on article (“reply”)
iGo to the index
pPrevious page (older articles)
nNext page (newer articles)
lScroll to selected article
/Search
?Help

I don’t know what the odds are of getting this merged into the Octopress trunk given that it introduces a dependency on jQuery, but it would be pretty damn cool to be able to navigate any Octopress site this way.

For the moment, if you’d like to get this running on your own site, you can grab the code from my Octopress fork on GitHub. It has a couple rough edges—particularly the styling on the Archive page and the crappy help alert (a lightbox-style page would be nice)—but I’d love to hear your thoughts on the rest.

Comments