private ArrayList<KeyButtons> checkKeys(KeyEvent e)
    {
        ArrayList<KeyButtons> keyPressed = new ArrayList<KeyButtons>();
        if (e.getKeyCode() == KeyEvent.VK_UP)
        {
            keyPressed.add(KeyButtons.UP);
            keyPressed.add(KeyButtons.JUMP);
        }
        if (e.getKeyCode() == KeyEvent.VK_DOWN)
        {
            keyPressed.add(KeyButtons.DOWN);
        }
        if (e.getKeyCode() == KeyEvent.VK_LEFT)
        {
            keyPressed.add(KeyButtons.LEFT);
        }
        if (e.getKeyCode() == KeyEvent.VK_RIGHT)
        {
            keyPressed.add(KeyButtons.RIGHT);
        }
        if (e.getKeyCode() == KeyEvent.VK_SPACE)
        {
            keyPressed.add(KeyButtons.SHOOT);
        }
        if (e.getKeyCode() == KeyEvent.VK_ENTER)
        {
            keyPressed.add(KeyButtons.CONFIRM);
        }
        if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
        {
            keyPressed.add(KeyButtons.ESCAPE);
        }
        return keyPressed;
    }