* reverses the map lookup so that we can look for specific keys * to see what can and can't use keypress * * @return {Object}
()
| 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 |