combokeys
Version:
Handles keyboard shortcuts in the browser
17 lines (16 loc) • 348 B
JavaScript
/* eslint-env node, browser */
/**
* triggers an event that has already been bound
*
* @param {string} keys
* @param {string=} action
* @returns void
*/
module.exports = function (keys, action) {
var self = this
if (self.directMap[keys + ':' + action]) {
self.directMap[keys + ':' + action]({}, keys)
}
return this
}