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

prevent_default shouldn't stopPropagation, or at least offer a way to cancel it #125

Open iMoses opened 8 years ago

iMoses commented 8 years ago

I have a use case in which I'm using React and Keypress together. I want Keypress to catch all special keys, such as backspace and tab, prevent their default and do something else instead.

My problem is that React events suddenly stop working because they are all attached to the document and Keypress uses stopPropagation inside '_prevent_default'.

I think it would be great if this functionality was separated or at least to offer an option to disable it.