The javascript event object offers keyCode() and charCode() methods such that charCode() returns 0 for keys that don’t cause a character to be displayed like enter, key up, key down, delete, backspace, etc.
I want to check for exactly these characters inside a jQuery keypress event callback, but the jQuery event object doesn’t give me access to the mentioned methods.
Can I retrieve the js event object from the jQuery one ?
Explorer doesn’t fire the keypress event for delete, end, enter, escape, function keys, home, insert, pageUp/Down and tab.
If you need to detect these keys, do yourself a favour and search for their keyCode onkeydown/up, and ignore both onkeypress and charCode.