Even better heuristics for key event ignoring

use heuristics from mousetrap library (https://github.com/ccampbell/mousetrap):
* Also ignore keyboard events if in other types of input elements
* Ignore keyboard events if element's content is editable