Minimal Keyboard Binding JavaScript Library – hotkeys.js

Category: Javascript | June 1, 2017
Author: raphaeladrien
Views Total: 1,493
Official Page: Go to website
Last Update: June 1, 2017
License: MIT

Preview:

Minimal Keyboard Binding JavaScript Library – hotkeys.js

Description:

hotkeys.js is a really small JavaScript library to bind specific keypress events that support modifier keys.

How to use it:

Install the hotkeys.js into your web project and you’re ready to go.

<script src="hotkeys.js"></script>

Create your own keyboard combinations as follows:

( function(window) {
  
  hotkeys( ALT,'m', function(){ alert('alt+m'); });
  hotkeys( CTRL_ALT,'d', function(){ alert('ctrl+alt+d'); });
  
})(window, document);

You Might Be Interested In:


Leave a Reply