I’m trying to add some keyboard support for a website I’m working on and I found these plugins for jQuery: shortKeys and jquery.hotkeys (can’t post link because i’m a new user). The thing is I want to make it so that when a user presses “j”, for example, to go to a different page, “about.html”, for example, but, I don’t know how to make that happen. Any suggestions?
Share
You don’t need any jquery plugin for this purpose, following piece of code should suffice:
You can find keycodes of all keys here http://www.cambiaresearch.com/c4/702b8cd1-e5b0-42e6-83ac-25f0306e3e25/Javascript-Char-Codes-Key-Codes.aspx