A little help [GetAsyncKeyState]
well guys this is my code...
Code:
#include <cstdlib>
#include <iostream>
#include <windows.h>
using namespace std;
int main(int argc, char *argv[])
{
int i=0;
while(i<10){
if(GetAsyncKeyState(VK_LCONTROL))
if(GetAsyncKeyState(VK_LMENU))
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
i++;
cout<<"\I press: " <<i;
}
}
system("PAUSE");
return EXIT_SUCCESS;
}
I dont know if its cuz im using DevC++ or what... but i wish to activate something when i press at same time: (left control + left alt + numpad 1)
and it works... but if I press
numpad1, and 10sec later press
left alt, 20sec later
left control works as i pressed (left control + left alt + numpad 1) at same time... dont matter if take 10 or 1 sec...
numpad1, after left alt, after left control == (left control + left alt + numpad 1)
at least in DevC++... there is anyway to write the code to do
if i press (left control + left alt + numpad 1) at same time
do something
TY