0.1.3 • Published 15 days ago

keyboard-shortcut-listener-helper v0.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
15 days ago

keyboard-shortcut-listener-helper

A utility library for easily listening to complex keyboard shortcuts in web applications.

Installation

Install keyboard-shortcut-listener-helper using npm:

npm install keyboard-shortcut-listener-helper

Usage

To use this library, first import and instantiate KeyboardShortcutListenerHelper, then use registerShortcut to listen for specific keyboard shortcuts.

const KeyboardShortcutListenerHelper = require('keyboard-shortcut-listener-helper');
const listener = new KeyboardShortcutListenerHelper();

// Register a shortcut: Ctrl+Shift+A
listener.registerShortcut('ctrl+shift+a', () => {
  console.log('Shortcut Ctrl+Shift+A was pressed!');
});

Dependencies

  • lodash: A modern JavaScript utility library delivering modularity, performance & extras.
  • eventemitter3: A high performance EventEmitter.
0.1.3

15 days ago

0.1.2

1 month ago

0.1.1

1 month ago

0.0.1

2 months ago