How to differentiate ctrl and alt gr
-
Hi,
I am facing an issue regarding differentiating ctrl and altgr key strokes.
https://support.microsoft.com/en-us/kb/306560Following this link i changed my keyboard layout to US international which converts my right alt key to behave as altgr key.
But my code is currently not able to distinguish between altgr and control key since it is receiving the same messages. In notepad++ it is working fine. Can you please help me with distinguishing these two control messages.
I m using VK_CONTROL to check for control key press
Thanks
-
-
You are on fire with the LMGTFY answers!
I hope I never get one of those answers from you. :-) -
Scott,
I hope there is no service like
let_me_correct_your_answer_by_google
otherwise I think the boomerang will hit me. ;-)Cheers
Claudia -
@Claudia-Frank
Wicked sweet answer! I am amazed at how many people apparently never think of doing even a simple web search. -
@Jim-Dailey
;-) but how did they find this forum?
There must be a place somewhere pointing to it, with some comment like
What you always wanted to know - ask there. ;-D
I need to check google maps - should be easy to find this information sign ;-)Cheers
Claudia -
can you point it in code how it is handled in notepad++ ( just the filename in the source code will help ) . Because i found out that this is sending 2 control messages successively : one for control ( VK_CONTROL ) and one for alt ( VK_MENU ) One possible solution i can think of is to note the last control message and check the current control message to check whether they are of alt-gr sequence. But i believe a better solution might exist .
Regards
Aadarsh -
I solved the issue with GetKeyState method to check the current state of alt key. if you have any other solution please share :)
p.s : I found this forum via notepad++ git repo.
-
GetKeyState is the one I would have used as well, I guess.
Why do you think npp is checking for AltGr?
I assume it isn’t.p.s : I found this forum via notepad++ git repo.
That’s a good one ;-)
Cheers
Claudia