(function($){
  var SELECTED_FILE_ELEM = null;

  $(document).keydown(function(event) {
    var selection = SELECTED_FILE_ELEM;
    switch (event.keyCode) {
      case 74: // j
        if (selection == null) {
          selection = $('#f0');
        } else {
          do {
            selection = selection.next();
          } while (selection.length > 0 && selection.css('display') == 'none');
        }
        break;
      case 75: // k
        if (selection == null) {
          selection = $('#f0');
        } else {
          do {
            selection = selection.prev();
          } while (selection.length > 0 && selection.css('display') == 'none');
        }
        break;
      case 13: // Enter
      case 79: // o
        if (selection != null) {
          var expander = selection.find('.expander');
          if (expander.length > 0) {
            expander.click();
          } else {
            window.location = selection.find('a.file').attr('href');
          }
        }
        return false;
        break;
      default:
        return true;
    }
    if (selection.length > 0) {
      if (SELECTED_FILE_ELEM != null)
        SELECTED_FILE_ELEM.removeClass('focus');
      selection.addClass('focus');
      SELECTED_FILE_ELEM = selection;
    }
    return false;
  });
})(jQuery);

@@ -39,16 +39,45 @@
  = null;
+%0A  var ENABLE_KEY_NAV = true;
 %0A%0A  $(do
@@ -106,24 +106,68 @@
 on(event) %7B%0A
+    if (!ENABLE_KEY_NAV)%0A      return true;%0A
     var sele
@@ -1359,16 +1359,223 @@
 e;%0A  %7D);
+%0A%0A  $(function() %7B%0A    $('a,input,select,textarea,button')%0A      .focus(function(event) %7B%0A        ENABLE_KEY_NAV = false;%0A      %7D)%0A      .blur(function(event) %7B%0A        ENABLE_KEY_NAV = true;%0A      %7D);%0A  %7D);
 %0A%7D)(jQue

stop browser keyboard nav from interfering with text input elsewhere on the page