title: how to prevent youtube player from Keypressing ( rewind , forward or pause the video )?
body: <p>I'm trying to create a <strong>youtube Extension</strong> ( not the youtube api ) and I require to prevent all the <code>keypress</code> events from happening during the <code>playback</code> </p>
  
  <blockquote>
    <p><strong>for example</strong> : <a href="https://www.youtube.com/watch?v=(ANY_VIDEO" rel="nofollow noreferrer">https://www.youtube.com/watch?v=(ANY_VIDEO</a> )</p>
  </blockquote>
  
  <p>so far I've tried the following :</p>
  
  <pre><code>document.addEventListener('keydown', e =&gt; console.log(e));
  </code></pre>
  
  <p>just to get some clues which kinda helped </p>
  
  <p>then I've tried : </p>
  
  <pre><code>document.removeEventListener('keydown');
  </code></pre>
  
  <p>didnt work ,it has removed the <code>keydown</code> from the entire dom but not from the player for example i couldn't refresh the page using <code>f5</code></p>
  
  <p>as i can see on console under target i can see <code>div</code> of <code>id = movie_player</code> so i assumed that this is what I should remove the event from , but I've no clue what the handler of the function is , it's really hard to inspect it .</p>
  
  <p>I can see from googleing that some other extention have had this feature in it but it  was way more complicated that youtube itself .
  <a href="https://www.reddit.com/r/youtube/comments/ae3vja/how_to_disable_keyboard_shortcuts/" rel="nofollow noreferrer">How to disable keyboard shortcuts using - uBlockOrigin Extension  </a></p>