What are the Javascript event keycodes for characters Plus, Minus, Asterisk, Slash, Equal sign, Backslash, Colon, Semicolor, Question mark, Exclamation, Single quotes, Double quotes, Percent sign, Dollar sign, Ampersand, Underscore and Dash ?
Hi,
It might be not reliable to assign the javascript keycodes to those characters, because there are many keyboard layouts internationally, that include different characters or have the standard characters located in different positions. For example there are different keycodes for semicolon on English keyboard and German keyboard.
In case of standard English keyboard layout, the javascript keycodes are:
Key | Code | Shift key use |
Plus | 187 | yes |
Minus | 189 | no |
Asterisk | 56 | yes |
Slash | 191 | no |
Plus - numeric keyboard | 107 | no |
Minus - numeric keyboard | 109 | no |
Asterisk - numeric keyboard | 106 | no |
Slash - numeric keyboard | 111 | no |
Equal sign | 187 | no |
Backslash | 220 | no |
Colon | 186 | yes |
Semicolor | 186 | no |
Question mark | 191 | yes |
Exclamation | 49 | yes |
Single quote | 192 | no |
Double quotes | 192 | yes |
Percent sign | 53 | yes |
Dollar sign | 52 | yes |
Ampersand | 55 | yes |
Underscore | 189 | yes |
Dash | 189 | no |