
ShortcutsJS is a small JavaScript library that listens for keypress events and binds custom keypress events using the CustomEvent API.
How to use it:
Import the minified version of the ShortcutsJS library into the document.
<script src="shortcuts.js"></script>
Specify the element where you want to listen for the keypress events.
<input type="text" id="demo">
var inputShortcut = new Shortcuts(document.getElementById('inp'));Bind a custom Keyboard Combination (shortcut) event to the input field when typed.
document.getElementById('inp').addEventListener('Ctrl+R', function(){
alert('done');
});






