make-short

1.0.4 • Public • Published

Make Keyboard Shortcut

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>

Thankyou

Package Sidebar

Install

npm i make-short

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

2.86 kB

Total Files

4

Last publish

Collaborators

  • musarrat