Why do I get two messages on `AltGr` being pressed?

前端 未结 1 1072
旧巷少年郎
旧巷少年郎 2021-01-22 12:52

Why do I get two messages on AltGr being pressed?

I have the following hook:

LRESULT CALLBACK MyClass::KeyboardShotcutsHook(int code, WPARAM w         


        
相关标签:
1条回答
  • 2021-01-22 13:10

    Because AltGr and Alt+Ctrl are equivalent (in Windows). Two key stroke sequences mean the same thing, and Alt+Ctrl won (probably because there is no AltGr on the US keyboard layout - that's my guess).

    If you want to check for AltGr, check if Ctrl is pressed whenever Alt shows up in your hook.

    0 讨论(0)
提交回复
热议问题