Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mateusmirandaalmeida/keyboard-easy
A library for handling keyboard shortcuts in Javascript.
https://github.com/mateusmirandaalmeida/keyboard-easy
keyboard keyboard-control user-keyboard
Last synced: 30 days ago
JSON representation
A library for handling keyboard shortcuts in Javascript.
- Host: GitHub
- URL: https://github.com/mateusmirandaalmeida/keyboard-easy
- Owner: mateusmirandaalmeida
- Created: 2016-11-22T11:00:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-22T16:30:38.000Z (about 8 years ago)
- Last Synced: 2024-12-02T07:19:55.639Z (about 1 month ago)
- Topics: keyboard, keyboard-control, user-keyboard
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Keyboard Easy
Is a library for capturing keystrokes
## Installation
```
bower install keyboard-easy --save
```## Add dependencies to the section of your main html:
``````
## 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 install
```
## Tasks
Run the task 'gulp' for generating the minified file.