UNPKG

combokeys

Version:

Handles keyboard shortcuts in the browser

17 lines (16 loc) 348 B
/* eslint-env node, browser */ 'use strict' /** * 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 }