for (;;)
{
__asm pushad;
bool stw = 0;
// another hotkey method
//if(GetAsyncKeyState(VK_F3)&1) { stw = true; Beep(1000,500); }
if(GetAsyncKeyState(VK_F3)&1) {
Beep(1000,500);
stw = !stw;
}
// put stw code here ... etc..
__asm popad;
}