javascript - Keypress event not triggered sometimes -


when hit ~ , other punctuation keys ('``´) , keypress event not triggered.

this makes attempt keycode , string.fromcharcode fail , validation fails well. need return false when script detects these chars

is there way work? there workaround?

obs: i'm using chromium on ubuntu

usually use keydown this

you can know more here : https://api.jquery.com/keydown/

$("#id").keydown(function(ev){ console.log(ev); }); 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -