title: How to play music when "tab key" is pressed in HTML
body: <p>I want to be able to play a mp3 file when the tab key is pressed on a keyboard.</p>
  
  <p>I am making a number system for a restaurant and when a number is entered and <kbd>tab</kbd> is pressed, it will make a noise which will draw attention to the numbers.</p>
  
  <p>Thanks!</p>
  
  <p>My current code is this. It doesn't work... Please correct me!</p>
  
  <pre><code>    &lt;script&gt;
        window.addEventListener("keydown", checkKeyPressed, false);
  
        function checkKeyPressed(e) {
          if (e.keyCode == "9") {
            //Play Music
            document.getElementById('aud').play()
          } 
        }
      &lt;/script&gt;
      &lt;audio src="music.mp3" id="aud"&gt;
        &lt;p&gt;Your browser does not support the audio element.&lt;/p&gt;
      &lt;/audio&gt;
  </code></pre>
  
  <p>I also made it hidden in css and the music file is in the same folder... It is not working...</p>