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

Issues with reinitializing 'listen' #110

Closed cclemensen closed 8 years ago

cclemensen commented 8 years ago

I'm trying to get a simple modal activated, key strokes sitting in the background should stop listening to specific keys after it's opened. And start listening once it's closed. Any thoughts on the below structure?

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

listener.simple_combo("j", function() { $("#jumper").modal({onShow: function (dialog) { listener.stop_listening(); }}); });

dmauro commented 8 years ago

That makes sense, where is the code that is telling the listener to start listening again?