UNPKG

combi

Version:

A tiny keyboard shortcut handling library

3 lines (2 loc) 398 B
module.exports=function(e,t){return void 0===t&&(t=!1),function(o){if(o){t&&o.preventDefault();var i=[o.ctrlKey?"ctrl":void 0,o.altKey?"alt":void 0,o.shiftKey?"shift":void 0,o.metaKey?"meta":void 0,["Shift","Meta","Control","Option","Alt"].indexOf(o.key)>=0?void 0:o.code.replace(/Key|Digit/,"")].filter(Boolean);i.length>=2&&e&&e(i.join("+").toLowerCase(),o)}}}; //# sourceMappingURL=combi.js.map