How to distinguish AltGr and Ctrl+RAlt programmatically (osk.exe does it somehow)
As is known, in most keyboard national layouts, the right Alt key functions as AltGr. However, AltGr is not a “real” key; it doesn’t have a specific VirtualKeyCode/ScanCode, and programmatically its depression appears as two separate sequential presses: