$(document).keydown(function (event)
{
alert(event.which);
});
For a semicolon key, ;this gives 59 in Firefox and 186 in Chrome. However, the jQuery help page for the keydown event says:
"While browsers use different properties to store this information, jQuery normalizes the .which property so that you can reliably use it to extract the key code. This code corresponds to a key on the keyboard, including codes for special keys such as arrows."
Did I miss something?
source
share