the keydown event is not allowing typing the in the textarea?
<p>Using the logic below I can't type information in the textarea</p>

<pre><code>     $(document).keydown(function(event)
     {
          var key = event.keyCode || event.which;

          if(key == tab)
          {
          } else if(key == rightArrow)
          {
          } else if(key == leftArrow)
          {
          }else
          {
          }
     });
</code></pre>

<p>But using this logic below, I'm able to type information into the textarea but the tab and rightArrow and leftArrow is not working.</p>

<pre><code>     $(document).keydown(function(event)
     {
          var key = event.keyCode || event.which;

          if(key == tab)
          {
          } else if(key == rightArrow)
          {
          } else if(key == leftArrow)
          {
          }else
          {
              $(document).unbind('keydown');
          }
     });
</code></pre>
