title: ie11 Detecting Enter Key pressed
body: <p>I have the following piece of code in an asp mvc page</p>
  <pre><code> $('#regForm').submit(function (event) {
              if (event.keyCode == '13') {
                  event.preventDefault();
              }
          });  
  </code></pre>
  <p>The aim is to prevent the form from submitting when enter is pressed.</p>
  <p>We have noticed that in ie 11, this is not working, and on stepping into the code via debug, <code>event.keycode</code> is <code>null</code>. I have been doing some researching on this, and it seems to be an issue because we have the IE-8 Compatibility Meta Tag present on the page, which means that <code>event.keyCode</code> (and <code>event.which</code>) returns <code>undefined</code> for the event, and so my form is always submitted.</p>
  <p>So how do I rewrite this to get round the issue?</p>