Second button works 4 times

I wrote the following code. There is a button that says Report, and two more buttons appear when you click it. The first one of them works just fine, but when I use the second one I get 4 Debug statements. What could be the problem?

public class OpenWindow : MonoBehaviour
{
    public Rect windowRect;
    bool showWindow = false;
    public Button b1;
    public LocData loc;
    public GameObject inp;
    public GameObject inp1;
    public InputField field;
    public InputField field1;
    private bool vel = false;
    public void onbutton()
    {
        showWindow = true;
    }

    void OpWindow()
    {
        
        if (showWindow == true)
        {
            windowRect = GUI.Window(0, new Rect(b1.transform.position.x-50, Screen.height*0.31f , 120, 80), DoMyWindow, "Report");
        }
    }
    void OnGUI()
    {
        
        { OpWindow();}

    }

    // Make the contents of the window
    void DoMyWindow(int windowID)
    {
        if (GUI.Button(new Rect(10, 20, 100, 20), "Position Report"))
        {
            field = inp.GetComponent<InputField>();
            field1 = inp1.GetComponent<InputField>();
            inp.SetActive(true);
            inp1.SetActive(true);
        }

        else if (GUI.Button(new Rect(10, 50, 100, 20), "Velocity Report"))
        {
            vel = true;
            field = inp.GetComponent<InputField>();
            field1 = inp1.GetComponent<InputField>();
            inp.SetActive(true);
            inp1.SetActive(true);
        }
    }

    private void Update()
    {
        if (field.text != "" && field1.text != "" && Input.GetKey(KeyCode.Return))
        {

            loc.GetLocReport(field.text, field1.text,vel);
            showWindow = false;
            inp.SetActive(false);
            inp1.SetActive(false);
        }
    }
}

Okay I fixed it. Simply I changed “GetKey” to “GetKeyDown” and it worked just fine.