How do I make a GUI menu that pops up?

How do I make a GUI menu that appears when I press a certain button, and disappears when I press another?
It’s a simple question.
Thanks in advance!

Example:

bool isOpen = false;

if(Input.GetKeyDown("escape")){
    //Show the screen
    isOpen = true;
}

if(Input.GetKeyDown("escape")){
    if(isOpen)
       //Don't show the screen
}

public class ToggleGUI : MonoBehaviour {
private bool on = false;

   void Update() {
      //Use one of these 3 ways to toggle your menu!

      //Type 1: Use the same key to on/off
      if( Input.GetKeyDown( KeyCode.Q ) ) {
         on = !on;
      }

      //Type 2: Use one key to turn on 
      //        another key to off 
      if( Input.GetKeyDown( KeyCode.Q ) ) {
         on = true;
      }
      else if( Input.GetKeyDown( KeyCode.E ) ) {
         on = false;
      }

      //Type 3: Hold a key to keep the menu open
      if( Input.GetKeyDown( KeyCode.Q ) ) {
         on = true;
      }
      else if( Input.GetKeyUp( KeyCode.Q ) ) {
         on = false;
      }
   }

   void OnGUI() {
      if( on ) {
         ...
      }
   }
}

It is a bit of a overkill, but I wrote in 3 difference menu-toggle-by-key behaviours. Use whichever one you prefer.