lib/kissy/5.0.0-alpha.3/build/menu-debug.js
function (e) {
            var self = this, menu = self.get('menu'), menuChildren, menuChild, hasKeyboardControl_ = menu.get('visible'), keyCode = e.keyCode;
            if (!hasKeyboardControl_) {
                // right
                if (keyCode === KeyCode.RIGHT) {
                    showMenu.call(self);
                    menuChildren = menu.get('children');
                    if (menuChild = menuChildren[0]) {
                        menuChild.set('highlighted', true, { data: { fromKeyboard: 1 } });
                    }
                } else if (keyCode === KeyCode.ENTER) {
                    // enter as click
                    return self.handleClickInternal(e);
                } else {
                    return undefined;
                }
            } else if (!menu.handleKeyDownInternal(e)) {
                // The menu has control and the key hasn't yet been handled, on left arrow
                // we turn off key control.
                // left
                if (keyCode === KeyCode.LEFT) {
                    // refresh highlightedItem of parent menu
                    self.set('highlighted', false);
                    self.set('highlighted', true, { data: { fromKeyboard: 1 } });
                } else {
                    return undefined;
                }
            }
            return true;
        }
function (e) {
            var self = this, menu = self.get('menu'), menuChildren, menuChild, hasKeyboardControl_ = menu.get('visible'), keyCode = e.keyCode;
            if (!hasKeyboardControl_) {
                // right
                if (keyCode === KeyCode.RIGHT) {
                    showMenu.call(self);
                    menuChildren = menu.get('children');
                    if (menuChild = menuChildren[0]) {
                        menuChild.set('highlighted', true, { data: { fromKeyboard: 1 } });
                    }
                } else if (keyCode === KeyCode.ENTER) {
                    // enter as click
                    return self.handleClickInternal(e);
                } else {
                    return undefined;
                }
            } else if (!menu.handleKeyDownInternal(e)) {
                // The menu has control and the key hasn't yet been handled, on left arrow
                // we turn off key control.
                // left
                if (keyCode === KeyCode.LEFT) {
                    // refresh highlightedItem of parent menu
                    self.set('highlighted', false);
                    self.set('highlighted', true, { data: { fromKeyboard: 1 } });
                } else {
                    return undefined;
                }
            }
            return true;
        }
function ( e ) { var self = this , menu = self . get ( 'menu' ) , menuChildren , menuChild , hasKeyboardControl_ = menu . get ( 'visible' ) , keyCode = e . keyCode ; if ( ! hasKeyboardControl_ ) { // right if ( keyCode === KeyCode . RIGHT ) { showMenu . call ( self ) ; menuChildren = menu . get ( 'children' ) ; if ( menuChild = menuChildren [ 0 ] ) { menuChild . set ( 'highlighted' , true , { data : { fromKeyboard : 1 } } ) ; } } else if ( keyCode === KeyCode . ENTER ) { // enter as click return self . handleClickInternal ( e ) ; } else { return undefined ; } } else if ( ! menu . handleKeyDownInternal ( e ) ) { // The menu has control and the key hasn't yet been handled, on left arrow // we turn off key control. // left if ( keyCode === KeyCode . LEFT ) { // refresh highlightedItem of parent menu self . set ( 'highlighted' , false ) ; self . set ( 'highlighted' , true , { data : { fromKeyboard : 1 } } ) ; } else { return undefined ; } } return true ; }
Handles a key event that is passed to the menu item from its parent because
it is highlighted.  If the right key is pressed the sub menu takes control
and delegates further key events to its menu until it is dismissed OR the
left key is pressed.
Protected for subclass overridden.
@param {KISSY.Event.DomEvent.Object} e key event.
@protected
@return {Boolean|undefined} Whether the event was handled.
Handles a key event that is passed to the menu item from its parent because it is highlighted . If the right key is pressed the sub menu takes control and delegates further key events to its menu until it is dismissed OR the left key is pressed . Protected for subclass overridden .