Introducing mapKey
I’ve been seeing more and more websites offering great navigation with the keyboard, and I started wondering how i’d put it to use in my own work. That gave me an idea to make a jQuery plugin to make it super easy for anyone to add keyboard navigation to their site. I love keyboard navigation a lot, so please use this plugin!
mapKey lets you simply target any link on your site or call a function with a keyboard character. Using it is pretty simple:
$("a#next-page").mapKey("right");
Or, to call a function:
$.mapKey("left", function(){
alert("you hit the left button!");
});
$.mapKey(“right”, rightFunction);
Check out the demo, download it, or view the source on GitHub.



2 comments
Gill
Mar 16, 2010Sounds useful - I´ll try it out.
Thx
Emran Hasan
Jun 22, 2010Great plugin !