(+84) 463.28.7979

jQuery Keyboard


This script allows you to track keyboard key combinations and execute some action. The home page of the project is http://code.google.com/p/jquerykeyboard/

JavaScript
We should include jQuery framework and jquery.keyboard.js by pointing src attribute in the script tag to those .js files.

jQuery keyboard

The below code we should insert between the tags in the body section. There we specify the key combination to track down and create a function which contains the action to execute:

jQuery keyboard 2

+ (plus) sign between the keys means that they should be pressed together;
, (comma) – this key pressed or this;
(space) – keys can be pressed in any order.

Keyboard button indexes can be found here http://code.google.com/p/jquerykeyboard/wiki/Indexes

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>