title: eventListener not catching keypress event with Javascript
body: <p>I've written some code to check if a user launches a search on Google (clicking on the Search button or typing Enter).</p>
  
  <p>My code works fine (it's a Firefox extension) except I can't get the code of the key pressed for an unknow reason.</p>
  
  <p>my code :</p>
  
  <pre><code>window.addEventListener("submit", function() { myExtension_with_click.init(); }, false);
  window.addEventListener("keypress", function() { myExtension_with_keypress.init(); }, false);
  
  var myExtension_with_click = {
      init: function() {          
           alert("This works");
      }
  }
  
  var myExtension_with_keypress = {
      init: function() {
               alert("This works")
               if (window.event.keyCode == 13) {
                   // This doesn't work
                   alert("This doesn't work");
               }
      }
  }
  </code></pre>