Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

detect letter ketcode

document.addEventListener("keydown", (event) => {
    if (event.code === "Space") {
    	// Spacebar was pressed, do something
    }
});
// Other keyCodes ->
// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
 
PREVIOUS NEXT
Tagged: #detect #letter #ketcode
ADD COMMENT
Topic
Name
7+4 =