Why we do not see the alert (the result of the alert function in Chrome) when you press the space bar, as opposed to pressing other keys, which gave us the alert.
<input type=text onKeyPress="my_keypress($event);">
function my_keypress($event) {
var x = ($event.keyCode || $event.which);
var x_char = String.fromCharCode(x);
alert(
'x: '+x + '\n' +
'x_char: ' + x_char + '\n' +
'altKey: ' + $event.altKey + ' ' +
'ctrlKey: ' + $event.ctrlKey + ' ' +
'shiftKey: ' + $event.shiftKey
);
}