I believe keypress is deprecated now. You can check in the Dom Level 3 Spec. Using keydown or keyup should work. The spec also recommends that you should use beforeinput instead of keypress but I’m not sure what the support of this is.
More Related Contents:
- jQuery Event Keypress: Which key was pressed?
- Definitive way to trigger keypress events with jQuery
- How to detect a textbox’s content has changed
- Capture key press (or keydown) event on DIV element
- Detect multiple keys on single keypress event in jQuery
- Detecting touch screen devices with Javascript
- Capture keys typed on android virtual keyboard using javascript
- Changing the keypress
- jQuery Keypress Arrow Keys
- Detect Android phone via Javascript / jQuery
- How do I capture a key press (or keydown) event on a div element?
- Disable zoom on input focus in Android webpage
- Force hide address bar in Chrome on Android
- jquery keypress event object keyCode for firefox problem?
- How to focus an input field on Android browser through javascript or jquery
- How to bind both Mousedown and Touchstart, but not respond to both? Android, JQuery
- Can I conditionally change the character entered into an input on keypress?
- jQuery .animate function not responding properly
- Assign click handlers in for loop
- Reload an iframe with jQuery
- How to build simple jQuery image slider with sliding or opacity effect?
- How to check if the URL contains a given string?
- keycode and charcode
- Debounce function in jQuery
- SVG – click is not a function [duplicate]
- Close a div by clicking outside
- jQuery Datepicker “After Update” Event or equivalent
- Changing cursor to waiting in javascript/jquery
- Bootstrap modal hide is not working
- A non-nested animation sequence in jQuery?