Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js key is pressed

// You can use window.addEventListener or document.addEventListener
window.addEventListener("keydown", function(event) {
    if (event.key == "key Name"){
        // Do Stuff
    }
});
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #js #key #pressed
ADD COMMENT
Topic
Name
2+5 =