I got a task to create a simple keyLogger using c++,
but it seems like some of the keys are missing..
It can detect the keys such as "." under my NumLock key, but it can't detect the keys next to the letters on my keyboard such as: "[", "]", "/", "." and all of those.
I have tried to make this simple function for testing, still cant detect it:
(i cant detect the "46" ASCII dec number)
void test() {
char key;
while (true) {
Sleep(10);
for (key = 0; key <= 222; key++) {
if (GetAsyncKeyState(key) == -32767 || GetAsyncKeyState(key) == 1) {
cout << key+0;
}
}
}
cout << "\n\n\n";
system("PAUSE");
}
Thank You !