title: How to handle the ENTER keypressed to trigger an onBlur() event?
body: <p>I have an iPad webapp with a big <code>&lt;form&gt;</code> at some point. Every input in it has functions controlling the values, both on keyUp and Blur events.</p>
  
  <p>Thing is, if the user accidentaly hits the "GO" button while typing (considered as an "enter" keypress), the form is submitted. I would like to intercept this comportment and trigger the onBlur() event of the focused element instead.</p>
  
  <p>For now I have this:</p>
  
  <pre><code>load(){
    document.addEventListener("keydown",logPressedKeys,false);
  }
  /**
   * logs the keys hit in the console, will eventually trigger my onBlur event
   */
    function logPressedKeys(e) {
        console.log(e.keyCode);
        if (e.keyCode==13) {
        console.log('Enter spotted: prevent!');
        e.preventDefault();//Shall prevent submitting
        return false;//Hoping it prevents default if above fails
    }
  }
  </code></pre>
  
  <p>Do you guys have any advice/idea/improvement about that?</p>
  
  <p>Nota bene: There has to be at least one input focused for the iPad's keyboard to pop.</p>