keyup
Ver originalwindow.addEventListener("keyup", function(event){ if (event.keyUp == 27){ //Cierras tu ventana }}, false);