ddhr.org | 2006 | 07 | 07 about | archives | comments | rss

Website keyboard shortcuts Fri, Jul 07, 2006
I'm a huge fan of websites that use keyboard shortcuts/hotkeys, like Gmail and Bloglines.  These shortcuts are made possible with some relatively simple javascript.  I've been thinking about adding shortcuts to my site for a while, but I'm really not a fan of javascript:  It slows things down, it doesn't always work, and I'd have to learn it. 

But then I learned about accesskeys (actually I saw it on Mark Pilgrim's site first).  It's pretty simple:  Just add accesskey="[key]" onto any A, AREA, BUTTON, INPUT, LABEL, LEGEND, or TEXTAREA.  Then the user can press ALT+accesskey (CTRL+accesskey on Mac) to use the shortcut.  So far, I've setup ALT+1 to go to the homepage.  Perhaps there will be more to follow. 

Update (2006-07-08 8:20am):  This works fine in Firefox.  But in Internet Explorer, the user needs to press enter after the accesskey combo. #technology


← older post 739 of 3123 newer →