Js does not recognize accented characters onclick
I have an input element that has an onkeyUp binding. The problem I'm running into is that when the user enters the accented characters, ie: Ä ä Ö ö Ü ü JS does not fire the onkeyup event / function. it works fine on regular characters. Also, if I enter an accented char and a regular char (Ös), bind recognizes both charecters and fires the event / function. Also, copy-pasting an accented char works great. Any ideas?
source to share
I am using a Swiss keyboard and you are correct: the event keyup
returns the same value for characters é
and ö
that are provided from the same key ( ö
activated shift
).
You can use event keypress
to catch all keyboard events including special keys: http://api.jquery.com/keypress/
source to share