keybinder - Simple Javascript Keybinder
Installation
npm i keybinder --save
To Use
;
The arguments for the keybinder are:
-
Selector (String): The DOM selector for elements that you want to bind the keys to.
-
keys (Array): Array of key combinations to listen to.
-
callback (function): The callback function to run when the specified key combinations are pressed. This is automatically bound to the element selected.
Sample Code:
Contributing
Is there something you think it is missing? Great!
- Fork this repo
- Make changes, write tests
- Send a pull request
License
Keybinder is licensed under the MIT License