title: Sending keydown to Angular directive with jQuery .trigger()
body: <p>I've created an edit directive to wrap an html input in a fancy frame.</p>
  
  <p>Now I'm creating a unit test to check that once I type in the input the dirty state of the form controller is set. </p>
  
  <p>I'm using jQuery.trigger() to simulate this, but I get nothing...</p>
  
  <pre><code>var input = $('input');
  var e = $.Event('keydown');
  e.which = 'x'.charCodeAt(0);
  e.keyCode = 'x'.charCodeAt(0);
  input[0].focus();
  input.trigger(e);
  </code></pre>
  
  <p>I have a plunker <a href="http://plnkr.co/edit/oeZeyq2i0KEPcyvGqWqT?p=preview" rel="nofollow">here</a></p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks!</p>