Current User: guest
<
Blog
Welcome to the Blog
This is the new SOSensible site blog. We hope you find stuff worthy of your visit!

Hot Keys with jQuery

(Posted on 16-Jul-08)

This is rated to work in Safari, Opera, IE and FF.

jQuery.Hotkeys plugin lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. It takes one line of code to bind/unbind a hot key combination.

Hot Keys Project Home

Example:

Binding 'Ctrl+c'

jQuery.hotkeys.add('Ctrl+c', function(){ alert('copy anyone?');});

Unbinding 'Ctrl+c'

jQuery.hotkeys.remove('Ctrl+c');

NOTE: This project is now at version 0.5 if you don't have the latest.