MCPcopy Index your code
hub / github.com/CodeboxIDE/codebox / _eventModifiers

Function _eventModifiers

client/vendors/mousetrap.js:383–403  ·  view source on GitHub ↗

* takes a key event and figures out what the modifiers are * * @param {Event} e * @returns {Array}

(e)

Source from the content-addressed store, hash-verified

381 * @returns {Array}
382 */
383 function _eventModifiers(e) {
384 var modifiers = [];
385
386 if (e.shiftKey) {
387 modifiers.push('shift');
388 }
389
390 if (e.altKey) {
391 modifiers.push('alt');
392 }
393
394 if (e.ctrlKey) {
395 modifiers.push('ctrl');
396 }
397
398 if (e.metaKey) {
399 modifiers.push('meta');
400 }
401
402 return modifiers;
403 }
404
405 /**
406 * prevents default for this event

Callers 1

_handleKeyEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected