JavaScript mendeteksi kunci pelarian
document.addEventListener('keydown', function(event){
if(event.key === "Escape"){
//do something
}
});
Friendly Hawk
document.addEventListener('keydown', function(event){
if(event.key === "Escape"){
//do something
}
});