Make keyboard shortcut for your website just in one function call
Install
npm i make-short
syntex
makeShortcut('<button-name>', function() {
// write your action here
});
-
<button-name>
keyboard button name. -
function()
function to call after button press.
Example
<script src="./node_module/keypress.js"></script>
<script>
makeShortcut('m', function() {
alert('m is pressed');
});
</script>