1.1.0 • Published 9 years ago
keyboardeasy v1.1.0
Keyboard Easy
Is a library for capturing keystrokes
Installation
bower install keyboard-easy --saveAdd dependencies to the section of your main html:
<script src="bower_components/keyboard-easy/dist/keyboard.min.js"></script>Basic usage
KeyboardEasy.watchKeys(['KeyName', 'KeyName'], function (evt) {
console.log('Keys Pressed!!!', evt);
});Configure options
KeyboardEasy.setConfigurations({
showNameKeyPressed : true, // Default: false - Informs the name of the key pressed
ignoreCase: true, // Default: false - ignore case sensitive
keepOrderPressed: true // Default: true - respect order of keys pressed
})Example
KeyboardEasy.watchKeys(['a', 'b'], function (evt, keys) {
console.log('Last event:'+evt)
console.log('Keys Pressed:'+keys)
});Installation of dependencies for use or development
npm installTasks
Run the task 'gulp' for generating the minified file.
1.1.0
9 years ago