             
         switch (unit)
         {
-            case Keyboard.UP:
+            case ScrollUnit.LEFT:
                 return (scrollR.x <= 0) ? 0 : -1;
                 
-            case Keyboard.DOWN:
+            case ScrollUnit.RIGHT:
                 return (scrollR.x >= maxDelta) ? 0 : 1;
                 
-            case Keyboard.PAGE_UP:
+            case ScrollUnit.PAGE_LEFT:
                 return Math.max(minDelta, -scrollR.width);
                 
-            case Keyboard.PAGE_DOWN:
+            case ScrollUnit.PAGE_RIGHT:
                 return Math.min(maxDelta, scrollR.width);
                 
-            case Keyboard.HOME: 
+            case ScrollUnit.HOME: 
                 return minDelta;
                 
-            case Keyboard.END: 
+            case ScrollUnit.END: 
                 return maxDelta;
                 
             default:

            
        switch (unit)
        {
        	case Keyboard.UP:
        	    return (scrollR.y <= 0) ? 0 : -1;
        	    
        	case Keyboard.DOWN:
        	    return (scrollR.y >= maxDelta) ? 0 : 1;
        	    
            case Keyboard.PAGE_UP:
                return Math.max(minDelta, -scrollR.height);
                
            case Keyboard.PAGE_DOWN:
                return Math.min(maxDelta, scrollR.height);
                
            case Keyboard.HOME: 
                return minDelta;
                
            case Keyboard.END: 
                return maxDelta;
                
            default:

package mx.layout
{

import flash.events.Event;
import flash.geom.Rectangle;
import flash.ui.Keyboard;

import mx.components.baseClasses.GroupBase;
import mx.core.ScrollUnit;
import mx.layout.ILayoutItem;
import mx.utils.OnDemandEventDispatcher;


public class LayoutBase extends OnDemandEventDispatcher
{
    //--------------------------------------------------------------------------
