resources/www/scripts/explorer.js
function(event) {
      if (event.keyCode === KEY.ESCAPE) {
        if (!Explorer.walker) return;
        Explorer.RemoveHook();
        Explorer.DeactivateWalker();
        FALSE(event);
        return;
      }
      // If walker is active we redirect there.
      if (Explorer.walker && Explorer.walker.isActive()) {
        if (typeof(Explorer.walker.modifier) !== 'undefined') {
          Explorer.walker.modifier = event.shiftKey;
        }
        var move = Explorer.walker.move(event.keyCode);
        if (move === null) return;
        if (move) {
          if (Explorer.walker.moved === 'expand') {
            Explorer.expanded = Explorer.walker.node.id;
            // This sometimes blurs in Edge and sometimes it does not.
            if (MathJax.Hub.Browser.isEdge) {
              Explorer.ignoreFocusOut = true;
              Explorer.DeactivateWalker();
              return;
            }
            // This does not blur in FF, IE.
            if (MathJax.Hub.Browser.isFirefox || MathJax.Hub.Browser.isMSIE) {
              Explorer.DeactivateWalker();
              return;
            }
          }
          Explorer.liveRegion.Update(Explorer.walker.speech());
          Explorer.Highlight();
        } else {
          Explorer.PlayEarcon();
        }
        FALSE(event);
        return;
      }
      var math = event.target;
      if (event.keyCode === KEY.SPACE) {
        if (event.shiftKey && Assistive.hook) {
          var jax = MathJax.Hub.getJaxFor(math);
          Explorer.ActivateWalker(math, jax);
          Explorer.AddHook(jax);
        } else {
          MathJax.Extension.MathEvents.Event.ContextMenu(event, math);
        }
        FALSE(event);
        return;
      }
    }
function(event) {
      if (event.keyCode === KEY.ESCAPE) {
        if (!Explorer.walker) return;
        Explorer.RemoveHook();
        Explorer.DeactivateWalker();
        FALSE(event);
        return;
      }
      // If walker is active we redirect there.
      if (Explorer.walker && Explorer.walker.isActive()) {
        if (typeof(Explorer.walker.modifier) !== 'undefined') {
          Explorer.walker.modifier = event.shiftKey;
        }
        var move = Explorer.walker.move(event.keyCode);
        if (move === null) return;
        if (move) {
          if (Explorer.walker.moved === 'expand') {
            Explorer.expanded = Explorer.walker.node.id;
            // This sometimes blurs in Edge and sometimes it does not.
            if (MathJax.Hub.Browser.isEdge) {
              Explorer.ignoreFocusOut = true;
              Explorer.DeactivateWalker();
              return;
            }
            // This does not blur in FF, IE.
            if (MathJax.Hub.Browser.isFirefox || MathJax.Hub.Browser.isMSIE) {
              Explorer.DeactivateWalker();
              return;
            }
          }
          Explorer.liveRegion.Update(Explorer.walker.speech());
          Explorer.Highlight();
        } else {
          Explorer.PlayEarcon();
        }
        FALSE(event);
        return;
      }
      var math = event.target;
      if (event.keyCode === KEY.SPACE) {
        if (event.shiftKey && Assistive.hook) {
          var jax = MathJax.Hub.getJaxFor(math);
          Explorer.ActivateWalker(math, jax);
          Explorer.AddHook(jax);
        } else {
          MathJax.Extension.MathEvents.Event.ContextMenu(event, math);
        }
        FALSE(event);
        return;
      }
    }
function ( event ) { if ( event . keyCode === KEY . ESCAPE ) { if ( ! Explorer . walker ) return ; Explorer . RemoveHook ( ) ; Explorer . DeactivateWalker ( ) ; FALSE ( event ) ; return ; } // If walker is active we redirect there. if ( Explorer . walker && Explorer . walker . isActive ( ) ) { if ( typeof ( Explorer . walker . modifier ) !== 'undefined' ) { Explorer . walker . modifier = event . shiftKey ; } var move = Explorer . walker . move ( event . keyCode ) ; if ( move === null ) return ; if ( move ) { if ( Explorer . walker . moved === 'expand' ) { Explorer . expanded = Explorer . walker . node . id ; // This sometimes blurs in Edge and sometimes it does not. if ( MathJax . Hub . Browser . isEdge ) { Explorer . ignoreFocusOut = true ; Explorer . DeactivateWalker ( ) ; return ; } // This does not blur in FF, IE. if ( MathJax . Hub . Browser . isFirefox || MathJax . Hub . Browser . isMSIE ) { Explorer . DeactivateWalker ( ) ; return ; } } Explorer . liveRegion . Update ( Explorer . walker . speech ( ) ) ; Explorer . Highlight ( ) ; } else { Explorer . PlayEarcon ( ) ; } FALSE ( event ) ; return ; } var math = event . target ; if ( event . keyCode === KEY . SPACE ) { if ( event . shiftKey && Assistive . hook ) { var jax = MathJax . Hub . getJaxFor ( math ) ; Explorer . ActivateWalker ( math , jax ) ; Explorer . AddHook ( jax ) ; } else { MathJax . Extension . MathEvents . Event . ContextMenu ( event , math ) ; } FALSE ( event ) ; return ; } }
Event execution on keydown. Subsumes the same method of MathEvents.
Event execution on keydown . Subsumes the same method of MathEvents .