dmauro / Keypress

A keyboard input capturing utility in which any key can be a modifier key.
http://dmauro.github.io/Keypress/
Apache License 2.0
3.18k stars 313 forks source link

Sequences with repetition of a single character trigger on first press of charachter #120

Open zwalker opened 8 years ago

zwalker commented 8 years ago

var keypressListener = new window.keypress.Listener();

// Will print "uh oh" on the first press of the "a" key //Should wait until third press of "a" keypressListener.sequence_combo("a a a", function (e, combo) { console.log('uh oh") });

// Will print "uh oh" on the first press of the "b" key //Should wait until second press of "b" keypressListener.sequence_combo("a b b", function (e, combo) { console.log('uh oh") });

dmauro commented 8 years ago

Nice catch, thanks!