     {
         var cpEvent:ColorPickerEvent = null;
         
-        if (event.ctrlKey && event.keyCode == Keyboard.DOWN)
+        // If rtl layout, need to swap LEFT for RIGHT so correct action
+        // is done.
+        var keyCode:int = mapKeycodeForLayoutDirection(event);
+
+        if (event.ctrlKey && keyCode == Keyboard.DOWN)
         {
             displayDropdown(true, event);
         }
         
-        else if ((event.ctrlKey && event.keyCode == Keyboard.UP) ||
-                 event.keyCode == Keyboard.ESCAPE)
+        else if ((event.ctrlKey && keyCode == Keyboard.UP) ||
+                 keyCode == Keyboard.ESCAPE)
         {
             if (dropdownSwatch && dropdownSwatch.enabled)
                 close(event);
         }
         
-        else if (showingDropdown && event.keyCode == Keyboard.ENTER && dropdownSwatch.enabled)
+        else if (showingDropdown && keyCode == Keyboard.ENTER && dropdownSwatch.enabled)
         {
             if (!dropdownSwatch.isOverGrid && editable)
             {

    }
}

}

        }
        
        else if (showingDropdown &&
                 (keyCode == Keyboard.HOME ||
                  keyCode == Keyboard.END ||
                  keyCode == Keyboard.PAGE_UP ||
                  keyCode == Keyboard.PAGE_DOWN ||
                  keyCode == Keyboard.LEFT ||
                  keyCode == Keyboard.RIGHT ||
                  keyCode == Keyboard.UP ||
                  keyCode == Keyboard.DOWN))
        {
            // Redispatch the event from the SwatchPanel
            // so that its keyDownHandler() can handle it.
            dropdownSwatch.dispatchEvent(event);
        }
        
        else if (keyCode == Keyboard.LEFT)
            {
                if (selectedIndex == -1)
                {
                    selectedIndex = findColorByName(selectedColor);
                }
                if (selectedIndex - 1 >= 0)
                {
                    selectedIndex--;
    
                    cpEvent = new ColorPickerEvent(ColorPickerEvent.CHANGE);
                    cpEvent.index = selectedIndex;
                    cpEvent.color = selectedColor;
                    dispatchEvent(cpEvent);
                }
            }
            
        else if (keyCode == Keyboard.RIGHT)
            {
                if (selectedIndex == -1)
                {
                    selectedIndex = findColorByName(selectedColor);
                }
                if (selectedIndex + 1 < dataProvider.length)
                {
                    selectedIndex++;
    
                    cpEvent = new ColorPickerEvent(ColorPickerEvent.CHANGE);
                    cpEvent.index = selectedIndex;
                    cpEvent.color = selectedColor;
                    dispatchEvent(cpEvent);
                }
            }
        }

    //--------------------------------------------------------------------------
    //
