                 selectColumnHeader(headerIndex);
             }
         }
-        else if (event.keyCode == Keyboard.RIGHT)
+        else if (keyCode == Keyboard.RIGHT)
         {
             newColumnIndex = viewDisplayableColumnAtOffset(headerIndex, +1);
             if (newColumnIndex != -1)

                dropIndexFound = true;
                isHeaderDragOutside = false;

                // If the mouse pointer over the right half of the column, the
                // drop indicator should be shown before the next column.
                if (pt.x > (columnXPos + headerInfo.column.width/2) || 
                    //Column groups which are partially visible should 
                    //show drag indicator at the right end only

        if (headerIndex == -1)
            return;

		// If rtl layout, need to swap LEFT and RIGHT so correct action
		// is done.
		var keyCode:uint = mapKeycodeForLayoutDirection(event);
		
		var newColumnIndex:int;

        if (keyCode == Keyboard.DOWN)
        {
            unselectColumnHeader(headerIndex, true);
            headerIndex = -1;
        }
        else if (keyCode == Keyboard.LEFT)
        {
            newColumnIndex = viewDisplayableColumnAtOffset(headerIndex, -1);
            if (newColumnIndex != -1)
