* wraps the specified callback inside of another function in order * to reset all sequence counters as soon as this sequence is done * * @param {Event} e * @returns void
(e)
| 683 | * @returns void |
| 684 | */ |
| 685 | function _callbackAndReset(e) { |
| 686 | _fireCallback(callback, e, combo); |
| 687 | |
| 688 | // we should ignore the next key up if the action is key down |
| 689 | // or keypress. this is so if you finish a sequence and |
| 690 | // release the key the final key will not trigger a keyup |
| 691 | if (action !== 'keyup') { |
| 692 | _ignoreNextKeyup = _characterFromEvent(e); |
| 693 | } |
| 694 | |
| 695 | // weird race condition if a sequence ends with the key |
| 696 | // another sequence begins with |
| 697 | setTimeout(_resetSequences, 10); |
| 698 | } |
| 699 | |
| 700 | // loop through keys one at a time and bind the appropriate callback |
| 701 | // function. for any key leading up to the final one it should |
nothing calls this directly
no test coverage detected