I am trying to disable all other characters from being entered in text input.
Since to get the $
you have to press the shift-key and the 4-key. I am not sure how you would get the keyCode for somthing like this?
key 13 keycode is for ENTER key.
Key codes are numeric values that correspond to physical keys on the keyboard but do not necessarily correspond to a particular character.
A key code is a series of alphanumeric characters used by locksmiths to create a key.
There is no onkeydown
keycode, as previously said by ngmiceli
Although, onkeypress
keycode exists and is equal to 36
.
JavaScript Event KeyCode Test Page
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With