                 selectColumnHeader(headerIndex);
             }
         }
-        else if (event.keyCode == Keyboard.SPACE)
+        else if (keyCode == Keyboard.SPACE)
         {
             if (sortableColumns && columns[headerIndex].sortable)
             {

        if (headerIndex == -1)
            return;

        var newColumnIndex:int;

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

        }
        // horizontal scrolling when focus is on header
        else if ( event.shiftKey
                  && (keyCode == Keyboard.PAGE_UP
                      || keyCode == Keyboard.PAGE_DOWN) )
        {
            moveSelectionHorizontally(keyCode, event.shiftKey, event.ctrlKey);
        }

        event.stopPropagation();
