coding freak coding freak - 6 months ago 21
HTML Question

Full list of Jquery keyboard character codes on keypress()

I know that 13 symbolizes

ENTER
. But I want to know which number is for A, B, C.. etc.. Does anyone know where I can find a full of list keyboard buttons for jquery keypress.

$(document).keypress(function (e) {
if (e.which == 13) {
$(".car").css("left", "+=25px");
}
});

Answer

A simple way of of checking out keycodes yourself you could do it like this:

$('input').on('keydown', function (e) {
    $('label').text(e.keyCode);
});

DEMO

Take a look at this for keycodes

javascript-key-codes