public/javascripts/yui/datatable/datatable.js
function(e, oSelf) {
    var sMode = oSelf.get("selectionMode");

    if(sMode == "standard") {
        oSelf._handleStandardSelectionByKey(e);
    }
    else if(sMode == "single") {
        oSelf._handleSingleSelectionByKey(e);
    }
    else if(sMode == "cellblock") {
        oSelf._handleCellBlockSelectionByKey(e);
    }
    else if(sMode == "cellrange") {
        oSelf._handleCellRangeSelectionByKey(e);
    }
    else if(sMode == "singlecell") {
        oSelf._handleSingleCellSelectionByKey(e);
    }
    
    if(oSelf._oCellEditor) {
        if(oSelf._oCellEditor.fireEvent) {
            oSelf._oCellEditor.fireEvent("blurEvent", {editor: oSelf._oCellEditor});
        }
        else if(oSelf._oCellEditor.isActive) {
            oSelf.fireEvent("editorBlurEvent", {editor:oSelf._oCellEditor});
        }
    }

    var elTarget = Ev.getTarget(e);
    var elTag = elTarget.nodeName.toLowerCase();
    var bKeepBubbling = true;
    while(elTarget && (elTag != "table")) {
        switch(elTag) {
            case "body":
                return;
            case "tbody":
                bKeepBubbling = oSelf.fireEvent("tbodyKeyEvent",{target:elTarget,event:e});
                break;
            default:
                break;
        }
        if(bKeepBubbling === false) {
            return;
        }
        else {
            elTarget = elTarget.parentNode;
            if(elTarget) {
                elTag = elTarget.nodeName.toLowerCase();
            }
        }
    }
    oSelf.fireEvent("tableKeyEvent",{target:(elTarget || oSelf._elContainer),event:e});
}
function(e, oSelf) {
    var sMode = oSelf.get("selectionMode");

    if(sMode == "standard") {
        oSelf._handleStandardSelectionByKey(e);
    }
    else if(sMode == "single") {
        oSelf._handleSingleSelectionByKey(e);
    }
    else if(sMode == "cellblock") {
        oSelf._handleCellBlockSelectionByKey(e);
    }
    else if(sMode == "cellrange") {
        oSelf._handleCellRangeSelectionByKey(e);
    }
    else if(sMode == "singlecell") {
        oSelf._handleSingleCellSelectionByKey(e);
    }
    
    if(oSelf._oCellEditor) {
        if(oSelf._oCellEditor.fireEvent) {
            oSelf._oCellEditor.fireEvent("blurEvent", {editor: oSelf._oCellEditor});
        }
        else if(oSelf._oCellEditor.isActive) {
            oSelf.fireEvent("editorBlurEvent", {editor:oSelf._oCellEditor});
        }
    }

    var elTarget = Ev.getTarget(e);
    var elTag = elTarget.nodeName.toLowerCase();
    var bKeepBubbling = true;
    while(elTarget && (elTag != "table")) {
        switch(elTag) {
            case "body":
                return;
            case "tbody":
                bKeepBubbling = oSelf.fireEvent("tbodyKeyEvent",{target:elTarget,event:e});
                break;
            default:
                break;
        }
        if(bKeepBubbling === false) {
            return;
        }
        else {
            elTarget = elTarget.parentNode;
            if(elTarget) {
                elTag = elTarget.nodeName.toLowerCase();
            }
        }
    }
    oSelf.fireEvent("tableKeyEvent",{target:(elTarget || oSelf._elContainer),event:e});
}
function ( e , oSelf ) { var sMode = oSelf . get ( "selectionMode" ) ; if ( sMode == "standard" ) { oSelf . _handleStandardSelectionByKey ( e ) ; } else if ( sMode == "single" ) { oSelf . _handleSingleSelectionByKey ( e ) ; } else if ( sMode == "cellblock" ) { oSelf . _handleCellBlockSelectionByKey ( e ) ; } else if ( sMode == "cellrange" ) { oSelf . _handleCellRangeSelectionByKey ( e ) ; } else if ( sMode == "singlecell" ) { oSelf . _handleSingleCellSelectionByKey ( e ) ; } if ( oSelf . _oCellEditor ) { if ( oSelf . _oCellEditor . fireEvent ) { oSelf . _oCellEditor . fireEvent ( "blurEvent" , { editor : oSelf . _oCellEditor } ) ; } else if ( oSelf . _oCellEditor . isActive ) { oSelf . fireEvent ( "editorBlurEvent" , { editor : oSelf . _oCellEditor } ) ; } } var elTarget = Ev . getTarget ( e ) ; var elTag = elTarget . nodeName . toLowerCase ( ) ; var bKeepBubbling = true ; while ( elTarget && ( elTag != "table" ) ) { switch ( elTag ) { case "body" : return ; case "tbody" : bKeepBubbling = oSelf . fireEvent ( "tbodyKeyEvent" , { target : elTarget , event : e } ) ; break ; default : break ; } if ( bKeepBubbling === false ) { return ; } else { elTarget = elTarget . parentNode ; if ( elTarget ) { elTag = elTarget . nodeName . toLowerCase ( ) ; } } } oSelf . fireEvent ( "tableKeyEvent" , { target : ( elTarget || oSelf . _elContainer ) , event : e } ) ; }
Handles keydown events on the TBODY element. Handles selection behavior,
provides hooks for ENTER to edit functionality.

@method _onTbodyKeydown
@param e {HTMLEvent} The key event.
@param oSelf {YAHOO.wiget.DataTable} DataTable instance.
@private
Handles keydown events on the TBODY element . Handles selection behavior provides hooks for ENTER to edit functionality .