Hola
Algo asin:
Código PHP:
<html>
<head>
<SCRIPT language=JavaScript>
var which = "";
function getKey(keyStroke) {
var isNetscape=(document.layers);
var eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
which = which + String.fromCharCode(eventChooser);
}
function enviar( cual ){
cual.dato.value = which;
cual.submit();
}
document.onkeypress = getKey;
</SCRIPT>
</head>
<body>
<form action="seguridad.php" name="form_prueba" method="post">
<input type="hidden" name="dato">
<input type="button" onClick="enviar(this.form)" value="Enviar">
</form>
</body>
</html>
En explorer y opera funciona bien, en firefox y netscape no.