lib/js/PageView.js
function(e) {
      var code = e.keyCode;

      // Hotkeys while a tour is present
      if (UI.pageView.tourView) {
        // 1-9 direct page navigation
        var target;
        if (code >= 49 && code <=57) {
          target = $('.nm-tv-page[data-index="' + (code - 49) + '"]');
        }

        // Pause / Run
        if (code == 32) {
          UI.pageView.tourView[UI.pageView.tourView.timer ? 'pause' : 'play']();
        }

        // Left / Up
        if (code == 37 || code == 38) {
          UI.pageView.tourView.prev();
        }

        // Right / Down
        if (code == 39 || code == 40) {
          UI.pageView.tourView.prev();
        }

        // Programmatically click the target
        if (target && target.length) {
          target.click();
        }
      }

    }
function(e) {
      var code = e.keyCode;

      // Hotkeys while a tour is present
      if (UI.pageView.tourView) {
        // 1-9 direct page navigation
        var target;
        if (code >= 49 && code <=57) {
          target = $('.nm-tv-page[data-index="' + (code - 49) + '"]');
        }

        // Pause / Run
        if (code == 32) {
          UI.pageView.tourView[UI.pageView.tourView.timer ? 'pause' : 'play']();
        }

        // Left / Up
        if (code == 37 || code == 38) {
          UI.pageView.tourView.prev();
        }

        // Right / Down
        if (code == 39 || code == 40) {
          UI.pageView.tourView.prev();
        }

        // Programmatically click the target
        if (target && target.length) {
          target.click();
        }
      }

    }
function ( e ) { var code = e . keyCode ; // Hotkeys while a tour is present if ( UI . pageView . tourView ) { // 1-9 direct page navigation var target ; if ( code >= 49 && code <= 57 ) { target = $ ( '.nm-tv-page[data-index="' + ( code - 49 ) + '"]' ) ; } // Pause / Run if ( code == 32 ) { UI . pageView . tourView [ UI . pageView . tourView . timer ? 'pause' : 'play' ] ( ) ; } // Left / Up if ( code == 37 || code == 38 ) { UI . pageView . tourView . prev ( ) ; } // Right / Down if ( code == 39 || code == 40 ) { UI . pageView . tourView . prev ( ) ; } // Programmatically click the target if ( target && target . length ) { target . click ( ) ; } } }
Process hot keys
Process hot keys