File: simple_example.html

Recommend this page to a friend!
  Classes of Arturs Sosins   Keyboard Shortcut   simple_example.html   Download  
File: simple_example.html
Role: Example script
Content type: text/plain
Description: Simple example of class usage
Class: Keyboard Shortcut
Invoke functions when multiple keys are pressed
Author: By
Last change:
Date: 13 years ago
Size: 906 bytes


Class file image Download
<!-- /************************************************************* * This script is developed by Arturs Sosins aka ar2rsawseen, * Feel free to distribute and modify code, but keep reference to its creator * * Keyboard shortcut class provides ability to bind functions * to custom key combinations. * * For more information, examples and online documentation visit: * **************************************************************/ --> <html> <head> </head> <body> <h1 style='text-align: center;'>Just try pressing Ctr+Alt+A</h1> <script type="text/javascript" src="./kb_shortcut.packed.js" ></script> <script type="text/javascript"> var kb = new kb_shortcut(); kb.add(["Ctrl", "Alt", "A"], function(){ alert("Key combination activated"); }) </script> </body> </html>