ccampbell / mousetrap

Simple library for handling keyboard shortcuts in Javascript
https://craig.is/killing/mice
Apache License 2.0
11.66k stars 968 forks source link

Customizable sequence timeout #472

Open DmitryShashkov opened 4 years ago

DmitryShashkov commented 4 years ago

Hi!

First of all, let me thank you for creating such a great lib! Keep up the good work!

Now, to my request. When registering sequences, Mousetrap gives user 1 second of time to press the next button, and this value is hardcoded. What I propose, is to make this setting customizable. So that you cound write in your code:

Mousetrap.resetSequenceTimeout = 2000;

Currently I need such an option in my project, and I believe it would be helpful for many other people as well.