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

ALTGR Key with keyboard hooks

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.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by psycheuserAug 29, 2026 04:06 PM 4 133 Aug 29, 2026 04:06 PM
Last Post: psycheuser
by FeatureBugJul 22, 2015 03:39 AM 5 213 Jul 22, 2015 03:39 AM
Last Post: FeatureBug
by mrnikbobjeffDec 30, 2014 05:47 PM 5 152 Dec 30, 2014 05:47 PM
Last Post: Malware