B2G/gecko/browser/components/tabview/search.js
// Handles all keydown before the search interface is brought up.
Handles all keydown before the search interface is brought up.
Handles all keydown before the search interface is brought up .
function Search__beforeSearchKeyHandler(event) {
    if (event.altKey || event.ctrlKey || event.metaKey)
      return;
    if ((event.keyCode > 0 && event.keyCode <= event.DOM_VK_DELETE) ||
        event.keyCode == event.DOM_VK_CONTEXT_MENU ||
        event.keyCode == event.DOM_VK_SLEEP ||
        (event.keyCode >= event.DOM_VK_F1 &&
         event.keyCode <= event.DOM_VK_SCROLL_LOCK) ||
        event.keyCode == event.DOM_VK_META ||
        event.keyCode == 91 || 
        event.keyCode == 92 || 
        (!event.keyCode && !event.charCode)) {
      return;
    }
    if (event.target.nodeName == "INPUT")
      return;
    if (event.keyCode == KeyEvent.DOM_VK_SLASH) {
      event.stopPropagation();
      event.preventDefault();
    }
    this.switchToInMode();
    this._initiatedBy = "keydown";
    this.ensureShown(true);
  }
function Search__beforeSearchKeyHandler ( event ) { if ( event . altKey || event . ctrlKey || event . metaKey ) return ; if ( ( event . keyCode > 0 && event . keyCode <= event . DOM_VK_DELETE ) || event . keyCode == event . DOM_VK_CONTEXT_MENU || event . keyCode == event . DOM_VK_SLEEP || ( event . keyCode >= event . DOM_VK_F1 && event . keyCode <= event . DOM_VK_SCROLL_LOCK ) || event . keyCode == event . DOM_VK_META || event . keyCode == 91 || event . keyCode == 92 || ( ! event . keyCode && ! event . charCode ) ) { return ; } if ( event . target . nodeName == "INPUT" ) return ; if ( event . keyCode == KeyEvent . DOM_VK_SLASH ) { event . stopPropagation ( ) ; event . preventDefault ( ) ; } this . switchToInMode ( ) ; this . _initiatedBy = "keydown" ; this . ensureShown ( true ) ; }
Handles all keydown before the search interface is brought up.
Handles all keydown before the search interface is brought up .
// Only match reasonable text-like characters for quick search. // 91 = left windows key // 92 = right windows key // If we are already in an input field, allow typing as normal. // / is used to activate the search feature so the key shouldn't be entered  // into the search box.