title: keydown only when input is not in focus
body: <p>Currently I've setup a function to go forward and back when pressing the left and right arrow keys in pages using this:</p>
  
  <pre><code>$(document).keydown(function (e) {
      if ($(e.target).is('input')) { return false
      } else if (e.keyCode == 37) {
          $(".pageback").click();
          return false;
      }
      if (e.keyCode == 39) {
          $(".pagenext").click();
          return false;
      }
  });
  </code></pre>
  
  <p>This allows the arrow keys to be used to browse back and forth, but when a textbox is encountered, the arrow keys are still active.</p>
  
  <p>Although this stops the keydown functions when the textbox is in focus, it also does not allow anything at all to be typed into the input area.</p>
  
  <p>HELP!</p>
  
  <p>Thanks</p>