public/javascripts/yui/carousel/carousel-debug.js
function (ev) {
            var carousel = this,
                key      = Event.getCharCode(ev),
                target   = Event.getTarget(ev),
                prevent  = false;

            // do not mess while animation is in progress or naving via select
            if (carousel.isAnimating() || target.tagName.toUpperCase() === "SELECT") {
                return;
            }

            switch (key) {
            case 0x25:          // left arrow
            case 0x26:          // up arrow
                carousel.selectPreviousItem();
                prevent = true;
                break;
            case 0x27:          // right arrow
            case 0x28:          // down arrow
                carousel.selectNextItem();
                prevent = true;
                break;
            case 0x21:          // page-up
                carousel.scrollPageBackward();
                prevent = true;
                break;
            case 0x22:          // page-down
                carousel.scrollPageForward();
                prevent = true;
                break;
            }

            if (prevent) {
                if (carousel.isAutoPlayOn()) {
                    carousel.stopAutoPlay();
                }
                Event.preventDefault(ev);
            }
        }
function (ev) {
            var carousel = this,
                key      = Event.getCharCode(ev),
                target   = Event.getTarget(ev),
                prevent  = false;

            // do not mess while animation is in progress or naving via select
            if (carousel.isAnimating() || target.tagName.toUpperCase() === "SELECT") {
                return;
            }

            switch (key) {
            case 0x25:          // left arrow
            case 0x26:          // up arrow
                carousel.selectPreviousItem();
                prevent = true;
                break;
            case 0x27:          // right arrow
            case 0x28:          // down arrow
                carousel.selectNextItem();
                prevent = true;
                break;
            case 0x21:          // page-up
                carousel.scrollPageBackward();
                prevent = true;
                break;
            case 0x22:          // page-down
                carousel.scrollPageForward();
                prevent = true;
                break;
            }

            if (prevent) {
                if (carousel.isAutoPlayOn()) {
                    carousel.stopAutoPlay();
                }
                Event.preventDefault(ev);
            }
        }
function ( ev ) { var carousel = this , key = Event . getCharCode ( ev ) , target = Event . getTarget ( ev ) , prevent = false ; // do not mess while animation is in progress or naving via select if ( carousel . isAnimating ( ) || target . tagName . toUpperCase ( ) === "SELECT" ) { return ; } switch ( key ) { case 0x25 : // left arrow case 0x26 : // up arrow carousel . selectPreviousItem ( ) ; prevent = true ; break ; case 0x27 : // right arrow case 0x28 : // down arrow carousel . selectNextItem ( ) ; prevent = true ; break ; case 0x21 : // page-up carousel . scrollPageBackward ( ) ; prevent = true ; break ; case 0x22 : // page-down carousel . scrollPageForward ( ) ; prevent = true ; break ; } if ( prevent ) { if ( carousel . isAutoPlayOn ( ) ) { carousel . stopAutoPlay ( ) ; } Event . preventDefault ( ev ) ; } }
The keyboard event handler for Carousel.

@method _keyboardEventHandler
@param ev {Event} The event that is being handled.
@protected
The keyboard event handler for Carousel .