Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the JavaScript KeyCodes? [closed]

What keycodes are available for JavaScript? If they're not the same for all browsers, please list the keycodes for each browser.

like image 781
Web_Designer Avatar asked Apr 09 '11 06:04

Web_Designer


2 Answers

keyCodes are different from the ASCII values. For a complete keyCode reference, see http://unixpapa.com/js/key.html

For example, Numpad numbers have keyCodes 96 - 105, which corresponds to the beginning of lowercase alphabet in ASCII. This could lead to problems in validating numeric input.

like image 167
user736373 Avatar answered Sep 17 '22 13:09

user736373


Followed @pimvdb's advice, and created my own:

http://daniel-hug.github.io/characters/

Be patient, as it takes a few seconds to generate an element for each of the 65536 characters that have a JavaScript keycode.

like image 22
Web_Designer Avatar answered Sep 17 '22 13:09

Web_Designer