jQuery Plugin To Create Keyboard Shortcuts For Website - Visual Keys

jQuery Plugin To Create Keyboard Shortcuts For Website - Visual Keys
File Size: 14.5 KB
Views Total: 469
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Visual Keys is an extremely light-weight jQuery plugin for creating custom keyboard shortcuts that will call specified functions on your website when pressed.

Basic usage:

1. Include the required visualkeys.css for the basic styles of the shortcut menu that will appear at the bottom of the webpage as your hit Ctrl + Space.

<link href="visualkeys.css" rel="stylesheet">

2. Include the JavaScript file visualkeys.js after jQuery JavaScript library.

<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="src/visualkeys.js"></script>

3. Bind custom functions to a keyboard shortcut. You can find all JavaScript key code here.

'65' : {

  // text to show on shortcut menu
  text : 'a: This will be hidden because "hide" returns true',

  // fired when key is pressed
  exec : function(){},

  // hide this menu item if this returns true
  hide : function() {}
  
},

This awesome jQuery plugin is developed by fermads. For more Advanced Usages, please check the demo page or visit the official website.