View Full Version : ASCII codes for numbers and space bar.

12-18-2003, 04:28 PM
Would anybody mind telling me the codes in ascii for the numbers and the space bar please?

12-18-2003, 04:30 PM
Numbers: 48-57
Space bar: 32

Hope that helps!

Happy coding! :)

12-18-2003, 05:22 PM
The keypad numbers are 96-105, by the way. If you want to use them, this snippet is handy:

var code = {event}.keyCode;
if (code <= 105 && code >= 96) {
code -= 48;

edit to add keyCode reference sheet (http://www.10mar2001.com/work/keyCodes.html) I made a while ago. Yeah, it's an export from Excel, but only because I wanted it to print nicely too. Which it does.