title: Disabling jquery keypress when in input or textarea fields
body: <p>I'm trying to fire off an event when a certain key is pressed. It works fine with this code:</p>
  
  <pre><code>$(document).keypress(function(e){ 
      switch(e.which){ 
              case 96:$("a.quicklinks").trigger('click'); 
              break; 
      } 
  </code></pre>
  
  <p>But, if the user is in a form field, I'd like to disable this behavior. How do I test whether the user is typing in a form field to do this? Thanks.</p>