Why didn't a jQuery trigger send some keydown events to an input element?
<p>I have tried the following in jQuery to trigger a keydown event into an input box:</p>

<p><a href="http://jsfiddle.net/W5fNh/8/" rel="nofollow">http://jsfiddle.net/W5fNh/8/</a></p>

<p>and wonder why no <code>keydown</code> event with <code>A</code> and <code>Enter</code> was triggered.  If I do type it in and press Enter myself, the form does get submitted.</p>

<p>The code:</p>

<pre><code>$(function () {

    $("#the-input").trigger("focus");

    $("#the-input").trigger(
        jQuery.Event('keydown', {
            keyCode: 65
    }));

    $("#the-input").trigger(
        jQuery.Event('keydown', {
            keyCode: 13
    }));

    $("#the-input").trigger(
        jQuery.Event('keydown', {
            which: 65
    }));

    $("#the-input").trigger(
        jQuery.Event('keydown', {
            which: 13
    }));

});
</code></pre>

<p>with html:</p>

<pre><code>&lt;form id="the-form" action="some.php" method="get"&gt;
    &lt;input id="the-input" type="text" name="var"&gt;
&lt;/form&gt;
</code></pre>
