🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

A jQuery plugin that allows the user to bind keyboard shortcut events to any element and when a key combination is pressed, an event is triggered following that keyboard shortcut.

Keyboard Shortcuts

Documentation

jQuery Keyboard Shortcuts

jQuery plugin that creates events triggered by keyboard combinations

Options

  • debug (boolean)
    • This option will log the keyboard shortcuts being executed in the console as they are triggered.

Install with Bower

bower install --save jquery-keyboard-shortcuts 

Install with NPM

npm i jquery-keyboard-shortcuts 

Get Started

Include jQuery

<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js"></script> 

Include Keyboard Shortcuts jQuery Plugin

<script type="text/javascript" src="js/jquery.keyboard-shortcuts.min.js"></script> 

Initialize

<script type="text/javascript"> $(window).initKeyboard(); </script> 

Add events

<script type="text/javascript"> $(window).on('Shift+â–¶', function(){     // Execute function here }); </script> 

You May Also Like