How to script a button to change panels, or pages.

How do I script a button using Input.GetButtonDown to change from one page or panel to another, and then back. I am not using a ui button, just want to be able to use a keyboard button, while the menu is active. I have tried searching Google but I haven’t found anything on it yet, maybe I am not asking the right question, or just haven’t found where the answer is. Any help would be appreciated greatly

In pausemenu I press a button, system options panels shows up, when I press the button again the character panel pops up and hides system, if I press another button to go back then system panel pops up, and hides character panel.

Here’s a script that I use that basically does exactly this:

public class PageControl : MonoBehaviour
{
    private GameObject m_ActivePage;

    private int m_Page;
    public int Page
    {
        get { return m_Page; }
        set
        {
            m_Page = value;
            if (Page < 0)
                Page = Pages.Length - 1;
            else if (Page > Pages.Length - 1)
                Page = 0;
            SetActivePage();
        }
    }

    public GameObject[] Pages;

    private void Start()
    {
        if (Pages.Length == 0)
            return;

        m_ActivePage = Pages[Page];
        SetActivePage();
    }

    private void Update()
    {
        if (Input.GetButtonDown(//Next Key))
            Next();
        else if (Input.GetButtonDown(//Prev Key))
            Prev();
    }

    public void Prev()
    {
        Page--;
    }

    public void Next()
    {
        Page++;
    }

    private void SetActivePage()
    {
        m_ActivePage.SetActive(false);
        m_ActivePage = Pages[Page];
        m_ActivePage.SetActive(true);
    }
}

Now you just need to assign the Pages objects within the editor