keycomb

0.1.3 • Public • Published

keycomb Build Status

Key combinations parser

Install

npm install --save keycomb
component install andrepolischuk/keycomb

Usage

var keycomb = require('keycomb');

keycomb('alt+a+m'); // {altKey: true, ctrlKey: false, shiftKey: false, keyCode: [65, 77]}
keycomb({ctrlKey: true, keyCode: 67}); // ['ctrl', 'c']

API

keycomb(string)

keycomb(array)

Return combination object

keycomb('alt+a+m');
keycomb(['ctrl', 'c']);

keycomb(object)

Return combination array

keycomb({altKey: true, keyCode: [65, 77]});
keycomb({ctrlKey: true, keyCode: 67});

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    39
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    39
  • 0.1.2
    1
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i keycomb

Weekly Downloads

40

Version

0.1.3

License

MIT

Last publish

Collaborators

  • andrepolischuk