Keymap is a lightweight jQuery plugin that creates your own key map to display your program’s key bindings using jQuery.
javascript trigger keyboard shortcut, jquery map key value, create keyboard shortcuts in html, javascript map key value
How to make use of it:
1. Create a container for the keymap.
<div class="keymap"></div>
2. Create links to add shortcuts on the key map.
<ul> <li><a class="up">Up</a></li> <li><a class="down">Save</a></li> <li><a class="shoot">Shoot</a></li> </ul>
3. Load the latest jQuery javascript library and jQuery keymap plugin into your document.
<script src="//code.jquery.com/jquery-latest.min.js"></script> <script src="keymap.js"></script>
4. Javascript code.
<script> $(document).ready(function(){ $('.keymap').keymap({"css": {"key": {"background": "black", "color": "white"}}}); $('.up').createShortcut('.keymap', ["up"], {},":first"); $('.down').createShortcut('.keymap', ["ctrl", "s"], {}, ":first"); $('.shoot').createShortcut('.keymap', [17, 68], {}, ":first"); }); </script>
jquery based key map for displaying shortcuts, Keymap Plugin/Github
See Demo And Download
Official Website(Andr3as): Click Here
This superior jQuery/javascript plugin is developed by Andr3as. For extra advanced usage, please go to the official website.