Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

handling event changes

<p>Press Control-Space to continue.</p>
<script>
  window.addEventListener("keydown", event => {
    if (event.key == " " && event.ctrlKey) {
      console.log("Continuing!");
    }
  });
</script>
Source by eloquentjavascript.net #
 
PREVIOUS NEXT
Tagged: #handling #event
ADD COMMENT
Topic
Name
8+8 =