Apr 5, 2015 08:58 AM
(This post was last modified: Apr 6, 2015 05:13 AM by mrnikbobjeff.)
Hey HF, I have a question concerning the use of hooks and verifying the state of the alt gr key. I am using a keyboard hook to catch the entered keys, but to assert wether or not the key was entered while alt gr was pressed was thus far impossible for me. To clarify, I am looking for a possibilty to find out whether the alt gr key and possibly also the shift key were pressed while the main key was pressed or not. Using GetAsyncKeyState is impractical because it just tells me that the key was pressed before the successive key was pressed. This however does not determine that it was still pressed while the next key was pressed. I could imagine that with the SYSKEYDOWN and SYSKEYUP flag it would be possible to logically determine wether or not it was pressed at the given time, but I imagine that there has to be an easier way to do this.
As always, I would be thankful for any advice I can get.
For those who will look into this post hoping to find an answer, just have an if logic which sets global boolean variables depending on the vkCode and wParam and for the capslock key use GetKeyState.
As always, I would be thankful for any advice I can get.
For those who will look into this post hoping to find an answer, just have an if logic which sets global boolean variables depending on the vkCode and wParam and for the capslock key use GetKeyState.

