What are the key codes for the right and left arrow keys?
Asked
Active
Viewed 2.2k times
23
-
the right and left navigation key...u know..u got up, left, right, down on your keyboard – ajsie Feb 09 '10 at 13:33
-
"arrow" was the word you were looking for. – T.J. Crowder Feb 09 '10 at 13:33
-
haha .. sorry didnt know the word "pile" wasnt english...its translated to arrow i think.. – ajsie Feb 09 '10 at 13:34
-
I've fixed it. (What language is "pile"? I know it's "batteries" in Italian, but that's about it...) – T.J. Crowder Feb 09 '10 at 13:35
-
http://stackoverflow.com/questions/492865/jquery-keypress-event-not-firing – zapping Feb 09 '10 at 13:36
-
1[See this please](http://www.cambiaresearch.com/c4/702b8cd1-e5b0-42e6-83ac-25f0306e3e25/Javascript-Char-Codes-Key-Codes.aspx) – Sarfraz Feb 09 '10 at 13:33
-
If the answer helped, maybe mark it as accepted? – mikemaccana Jun 19 '18 at 21:11
2 Answers
38
Left: 37, Right: 39.
Discovery of other keycodes can be done with the following code:
$('body').keyup(function (event) {
console.log(event.keyCode);
});
Which will output the keycode to the console when you press any key.

Sampson
- 265,109
- 74
- 539
- 565