                     return;
             }
     
-            else if (event.keyCode == Keyboard.HOME)
+            else if (keyCode == Keyboard.HOME)
             {
                 if (i == 0)
                     date = 1;

                    return;
            }
    
            else if (event.keyCode == Keyboard.DOWN)
            {
                if (date + 7 <= daysInMonth)
                {

                    return;
            }
    
            else if (keyCode == Keyboard.UP)
            {
                if (date > 7)
                {
