Reputation: 23297
Where should I begin if I want users to be able to use keyboard shortcuts on a site. I'm currently using php and jquery to create site. How will I be able to add keyboard shortcuts aside from the usual point and click method. Links to site where I could begin will do. Thanks.
Upvotes: 10
Views: 22129
Reputation: 8612
As a starter: http://plugins.jquery.com/project/hotkeys
[Edit 1/14/14: Dead link. See the Github page instead]
Upvotes: 9
Reputation: 41
Try this plugin http://www.mattytemple.com/projects/shortcut-js/. It is simplistic in purpose and handles single combinations effectively.
If you need better implementation with more flexibility go for Mousetrap Plugin as specified by @craig in the previous answer.
Upvotes: 0
Reputation: 2704
Take a look at Mousetrap as well.
It supports all types of key events as well as combinations and sequences.
Upvotes: 4
Reputation: 222158
I've used jQuery.hotkeys by John Resig, and it works pretty well with the latest jQuery. Have a look at the static page samples on the github page.
Upvotes: 2