Maybe something like this:
void Update () { if (Input.GetKey(KeyCode.Tab)) { doWindow0 = !doWindow0; } }