so I've got this code:

```
bool toggl = false;
while (!GetAsyncKeyState(VK_END)) {
    if (GetAsyncKeyState(VK_INSERT)) {
        if (toggl) {
            toggl = false;
            std::cout << "Off" << std::endl;

        }
        else {
            toggl = true;
            std::cout << "On" << std::endl;
        }
    }
}

```

The problem is whenever I click insert it just creates a infinite loop changing from false to true. When I use `break` my whole window just closes.
Any help appreciated.

Thanks,
Ossie