Skip to content

Commit

Permalink
Remove reset timer
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan committed Apr 29, 2018
1 parent 9e09702 commit 72a56bd
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions mousetrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,6 @@
*/
var _sequenceLevels = {};

/**
* variable to store the setTimeout call
*
* @type {null|number}
*/
var _resetTimer;

/**
* temporary state where we will ignore the next keyup
*
Expand Down Expand Up @@ -751,19 +744,6 @@
self.handleKey(character, _eventModifiers(e), e);
}

/**
* called to set a 1 second timeout on the specified sequence
*
* this is so after each key press in the sequence you have 1 second
* to press the next key before you have to start over
*
* @returns void
*/
function _resetSequenceTimer() {
clearTimeout(_resetTimer);
_resetTimer = setTimeout(_resetSequences, 1000);
}

/**
* binds a key sequence to an event
*
Expand Down Expand Up @@ -791,7 +771,6 @@
return function() {
_nextExpectedAction = nextAction;
++_sequenceLevels[combo];
_resetSequenceTimer();
};
}

Expand Down

0 comments on commit 72a56bd

Please sign in to comment.