/ best free open source web resources /

Graphic Resources

Bind a Hot Key Combination with jQuery Hotkeys

Posted · Category: Code, MIT License

Sometimes when we are developing web applications, we would like to allow users using hotkeys to trigger some functions (e.g. Alt-d to delete a record). How can we achieve it easily? 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. And it works with Safari, Opera, Firefox and IE.

Bind a Hot Key Combination with jQuery Hotkeys

Requirements:jQuery Framework
Demo: http://jshotkeys.googlepages.com/test-static.html
License: MIT License

  • James

    This is very nice, I can see myself using this for those apps where users use the app day in and out. The problem with hotkeys is if you don’t use them regularly you forget them.

  • This can be used without jQuery – try the base script for this plugin.

  • Nice, but functional keys are still working in IE as they meant to, e.g. F5 reloads a page.

  • Alex: Rebinding keys that users already expect to do something (e.g. F5 to refresh) is a SUPER bad idea from a usability perspective, for about a million reasons.

  • Cool write up, I wrote something similar but made it a jQuery event that you can bind.

  • Interesting, will have to try it in action

Supported By


Web Browsers Icon Set
Food Icon Set
Flat Icon Set

Flat Icon Set

100 icons