jQuery : trouble with Shift+Tab onkeydown
<p>The scenario:</p>

<p>We have 3 boxes that can receive any letter or number combinations as input.  The first box can have a max of 3 characters, the second box must be exactly 7 and the last needs to be 2.</p>

<p>I was trying to get a jQuery function in place to take the user from the first box to the second once they'd typed 3 characters and then from the 2nd to the 3rd after 7 characters and then from the 3rd on to the button after 2 characters.  I also want this function to be fairly generic so that I can use it from other controls so I set up the following:</p>

<pre><code>function moveOn(e, objID, nextID, howLong) {
        if (!(e.keyCode == 9)) {
            if ($(objID).val().length &gt;= (howLong)) {
                $(nextID).select();
            }
        }
    }
</code></pre>

<p>What is causing me fits is Shift+Tab.  I'm trying to catch it with that if(keyCode == 9) check but because it's keyup, the shift key could come up a split second before the Tab in which case the event triggers on the Shift key (16) instead of the Tab (9).  I can't ignore all Shift catches since the user will most likely be using capital letters in at least one of the fields.</p>

<p>Shift+Tab is coming into play when they type in the first value and then realize they made a mistake so they want to go back.  Our workforce is very keyboard-driven so they will almost always use Shift+Tab to try to go back and fix that.</p>

<p>Is there some trick I'm missing for making this work fluidly?</p>

<p>TIA.</p>
