* takes a key event and figures out what the modifiers are * * @param {Event} e * @returns {Array}
(e)
| 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 |