Javascript Keycode for a: 65 or 97? -
i'm working javascript (on macbook pro osx 10.11.x, not sure if matters) using chrome browser. im using function:
window.onkeypress = function(e) { var key = e.keycode ? e.keycode : e.which; console.log("keypressed = " + key); }
when press 'a' key on keyboard, logs 97, not correspond other keycode list find on internet, states 'a' 65.
this same other keys well, example, 's' me 115, else states 's' 83.
is there dependency i'm missing? if fire event assuming == 95, work on other browsers?
thanks.
so found capital a
indeed, 65.
a lowercase a
97
please see chart:
chart original location: http://www.asciitable.com/
Comments
Post a Comment