Hola
Algo así
Código Javascript
:
Ver originalfunction keyPressed(e){
thisKey= (document.all)?e.keyCode: e.which; // ASCII
if (thisKey==49){ document.location.href='verde.htm'; return false;} // 1
if (thisKey==50){ document.location.href='rojo.htm'; return false;} // 2
........
alert("Ha pulsado la tecla "+thisKey+", escriba el código para manejar esa tecla");
}
Suerte