Keyboard interception

[Deleted]  
Does anybody know how to find out what the last key pressed was or the current pressed key is of the current chart? I'm using the WinUser32.mqh file, but I can't figure out for the life of me how to get the information I need. I found another dll that might work for me but I can't look inside it's code to see how it ticks. I would like to know how it's done so I can suit it to my needs.
[Deleted]  

I might have something.


I added:

int GetKeyState(int nVirtKey);


to the WinUser32.mqh file, so now I can get a value if the key is pressed. Problem is it picks it up outside of MT4, basically globally. How do you get it to apply just to the current chart?