public static void KeySet(int k, boolean b)
    {
        if ( k ==KeyEvent.VK_ENTER ) keyState[ENTER] = b;
        if ( k == KeyEvent.VK_ESCAPE) keyState[ESC] = b;
        if ( k == KeyEvent.VK_SPACE) keyState[SPACE] = b;
        if ( k == KeyEvent.VK_DOWN) keyState[DOWN] = b;
        if (k == KeyEvent.VK_UP) keyState[UP] = b;
        if (k == KeyEvent.VK_RIGHT) keyState[RIGHT] = b;
        if (k == KeyEvent.VK_LEFT) keyState[LEFT] = b;
    }