views:

95

answers:

2

I'm really curious how Google (and now Facebook in the photo galleries) implemented shortcut keys such as J/K or Left/Right arrows. I'm afraid I don't have many details because I can't figure out by inspecting the source which piece makes those buttons 'tic', so to speak. What I'm specifically looking for is a way to bind buttons to Javascript functions - from there, it's obviously fairly easy.

+7  A: 
David Dorward
That is a useful tip.
Rich Bradshaw
+1  A: 

I'd recommend using js-hotkeys (jQuery plugin).

I've used this plugin before in a production environment, so I tested it across all the a-grade browsers before I implemented it.. This was about three months ago.

roosteronacid