Home | History | Annotate | Download | only in resources

Lines Matching full:modifiers

117  * Returns a list of modifiers from the key event.
176 * modifiers.
178 function getKeyClasses(identifier, modifiers) {
180 for (var i = 0; i < modifiers.length; ++i) {
181 classes.push(MODIFIER_TO_CLASS[modifiers[i]]);
184 if ((identifier == '2A' && contains(modifiers, 'SHIFT')) ||
185 (identifier == '1D' && contains(modifiers, 'CTRL')) ||
186 (identifier == '38' && contains(modifiers, 'ALT'))) {
204 function getKeyLabel(keyData, modifiers) {
225 getShortcutData()[getAction(keyLabel, modifiers)]) {
236 * keycode: 'd', modifiers: ['CTRL', 'SHIFT'] => 'd<>CTRL<>SHIFT'
237 * keycode: 'alt', modifiers: ['ALT', 'SHIFT'] => 'ALT<>SHIFT'
239 function getAction(keycode, modifiers) {
243 if (keycode in modifiers) {
244 return modifiers.join(SEPARATOR);
246 var action = [keycode].concat(modifiers)
251 return [keycode].concat(modifiers).join(SEPARATOR);
278 function update(modifiers) {
280 if (modifiers.length == 0) {
292 var classes = getKeyClasses(identifier, modifiers, keyData);
293 var keyLabel = getKeyLabel(keyData, modifiers);
294 var shortcutId = shortcutData[getAction(keyLabel, modifiers)];
337 var modifiers = getModifiers(e);
341 update(modifiers);