MCPcopy
hub / github.com/textAngular/textAngular / _mapKeys

Function _mapKeys

src/taBind.js:134–149  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

132 }
133 ];
134 function _mapKeys(event) {
135 var specialKey;
136 _keyMappings.forEach(function (map){
137 if (map.keyCode === event.keyCode) {
138 var netModifiers = (event.metaKey ? _META_KEY: 0) +
139 (event.ctrlKey ? _CTRL_KEY: 0) +
140 (event.shiftKey ? _SHIFT_KEY: 0) +
141 (event.altKey ? _ALT_KEY: 0);
142 if (map.forbiddenModifiers & netModifiers) return;
143 if (map.mustHaveModifiers.every(function (modifier) { return netModifiers & modifier; })){
144 specialKey = map.specialKey;
145 }
146 }
147 });
148 return specialKey;
149 }
150
151 // set the default to be a paragraph value
152 if(attrs.taDefaultWrap === undefined) attrs.taDefaultWrap = 'p';

Callers 1

taBind.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected