Alpine
Nov 20th, 1999, 01:03 PM
Hi,
I'm trying to make a keylogger using the api GetAsyncKeyState in a timer control. I need a way to tell what symbol or character should appear on a keypress. I can make it work for keys like 1,2,a, etc... But not for ones that need shift to be pressed. The way i'm doing this now is by checking the state of the shift key before each key press, but this only works for one keyboard layout.
Example: Key 3 has the code 51(i think) but I need to get the symbol above key 3. On a UK keyboard this is £, but on a USA keyboard it is #. I need a way to tell what symbol should appear. I know the keycodes or whatever are converted into the correct symbol or character by the driver. Is it possible for me to access the driver or something? Or is there a better way of doing this? It would be a lot easier if I could use the KeyPress event, and get the KeyAscii values, but the program has to work when it doesn't have focus. Is there a way to do it this way?
Sorry if this makes no sense :)
Thanks, Doug
I'm trying to make a keylogger using the api GetAsyncKeyState in a timer control. I need a way to tell what symbol or character should appear on a keypress. I can make it work for keys like 1,2,a, etc... But not for ones that need shift to be pressed. The way i'm doing this now is by checking the state of the shift key before each key press, but this only works for one keyboard layout.
Example: Key 3 has the code 51(i think) but I need to get the symbol above key 3. On a UK keyboard this is £, but on a USA keyboard it is #. I need a way to tell what symbol should appear. I know the keycodes or whatever are converted into the correct symbol or character by the driver. Is it possible for me to access the driver or something? Or is there a better way of doing this? It would be a lot easier if I could use the KeyPress event, and get the KeyAscii values, but the program has to work when it doesn't have focus. Is there a way to do it this way?
Sorry if this makes no sense :)
Thanks, Doug