Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

keydown event

document.addEventListener("keydown", function(e) {
	e = e || window.event;
	// Add scripts here
	e.keyCode; // -> returns the keycode of the key that triggered the event
	e.key.toString(); // -> returns the ASCII character of the key that triggered the event
});
Source by matt-destroyer.github.io #
 
PREVIOUS NEXT
Tagged: #keydown #event
ADD COMMENT
Topic
Name
2+6 =