Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return cacheGetEventData(event, 'DEFAULT_SHORT_COMMAND', () => {
let e = event.rawEvent;
let key =
// Need to check ALT key to be false since in some language (e.g. Polski) uses AltGr to input some special charactors
// In that case, ctrlKey and altKey are both true in Edge, but we should not trigger any shortcut function here
event.eventType == PluginEventType.KeyDown && !e.altKey
? e.which |
(e.metaKey && Keys.Meta) |
(e.shiftKey && Keys.Shift) |
(e.ctrlKey && Keys.Ctrl)
: 0;
return key && commands.filter(cmd => (Browser.isMac ? cmd.macKey : cmd.winKey) == key)[0];
});
}