Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the key codes for the right and left arrow keys?

Tags:

What are the key codes for the right and left arrow keys?

like image 472
ajsie Avatar asked Feb 09 '10 13:02

ajsie


People also ask

What is e keycode === 13?

key 13 keycode is for ENTER key.

What key is left arrow?

Alternatively referred to as cursor keys, direction keys, and navigation keys, the arrow keys are usually located between the standard section and the numeric pad on computer keyboards. It is made up of four keys: the left arrow (back arrow), up arrow, down arrow, and the right arrow (forward arrow).


2 Answers

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.

like image 183
Sampson Avatar answered Oct 08 '22 07:10

Sampson


left key - 37

right key - 39

like image 29
rahul Avatar answered Oct 08 '22 05:10

rahul