0.1.3 • Published 9 years ago

keycomb v0.1.3

Weekly downloads
67
License
MIT
Repository
github
Last release
9 years ago

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