How to stop a jQuery function being run on keydown when Tab key is pressed
<p>I am new to jQuery and haven't been able to find a solution to this.</p>

<p>I have this HTML:</p>

<pre><code>&lt;input type="text" id="Box1" /&gt;&lt;br /&gt;
&lt;input type="text" id="Box2" /&gt;
</code></pre>

<p>And jQuery:</p>

<pre><code>$("#Box1").keydown(function () {
    $("#Box2").val("");
});
$("#Box2").keydown(function () {
    $("#Box1").val("");
});
</code></pre>

<p>Example here: <a href="http://jsfiddle.net/tv4my/" rel="nofollow">http://jsfiddle.net/tv4my/</a></p>

<p>When you type in "Box1" then start typing in "Box2", Box1's content is cleared. This is good, however I don't want this function to run if the Tab key is pressed, i.e. I don't want Box1 to be cleared if I press the Tab key inside Box2. How do I write this in jQuery?</p>
