Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Keylogger regional keyboard support

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:

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
I suppose, look into unicode?


Possibly Related Threads...
Thread / Author Replies Views Last Post
by iranian_boyAug 5, 2017 08:31 AM 2 169 Aug 5, 2017 08:31 AM
Last Post: Vl4d1m1r_P0ut1ne
by 0xfdNov 9, 2016 10:01 PM 1,025 97,764 Nov 9, 2016 10:01 PM
Last Post: joeing777
by sou1010Dec 5, 2015 03:13 AM 0 119 Dec 5, 2015 03:13 AM
Last Post: sou1010