MCPcopy Create free account
hub / github.com/CodeboxIDE/codebox / _getReverseMap

Function _getReverseMap

client/vendors/mousetrap.js:605–622  ·  view source on GitHub ↗

* reverses the map lookup so that we can look for specific keys * to see what can and can't use keypress * * @return {Object}

()

Source from the content-addressed store, hash-verified

603 * @return {Object}
604 */
605 function _getReverseMap() {
606 if (!_REVERSE_MAP) {
607 _REVERSE_MAP = {};
608 for (var key in _MAP) {
609
610 // pull out the numeric keypad from here cause keypress should
611 // be able to detect the keys from the character
612 if (key > 95 && key < 112) {
613 continue;
614 }
615
616 if (_MAP.hasOwnProperty(key)) {
617 _REVERSE_MAP[_MAP[key]] = key;
618 }
619 }
620 }
621 return _REVERSE_MAP;
622 }
623
624 /**
625 * picks the best action based on the key combination

Callers 1

_pickBestActionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected