rafonets,
На всякий случай ....
<html>
<head>
<title>charCode example</title>
<script type="text/javascript">
function showChar(e)
{
e = (e) ? e : window.event;
var keycode = e.charCode||e.keyCode;
alert("Key Pressed: " + String.fromCharCode(keycode) + "\n"
+ "charCode: " + (keycode));
}
</script>
</head>
<body onkeypress="showChar(event);">
<p>Press any 'character' type key.</p>
</body>
</html>