Answers for "how to catch escape key pressed event in javascript"

5

javascript detect escape key

document.addEventListener('keydown', function(event){
	if(event.key === "Escape"){
		//do something
	}
});
Posted by: Guest on November-12-2019

Code answers related to "how to catch escape key pressed event in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language