Non capito esattamente cosa intendi cmq questo mostra un alert alla pressione dei tasti.
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Pagina senza titolo</title>
<script language="JavaScript" type="text/javascript">
function TastoPremuto(tasto)
{
alert("tasto premuto "+tasto)
}
</script>
</head>
<body>
<form action="" method="get">
<input name="testo" type="text" onkeyup="TastoPremuto(this.value);" /></form>
</body>
</html>