I am currently extracting the scan code from the RAWKEYBOARD structure's MakeCode field.
It is obvious that the API is somehow aware of which key is being pressed how do I get ahold of that information? I would really like to be able to capture key up events as well. I have tested that function using VK_LCONTROL and VK_RCONTROL, and it works, but that only helps me for capturing key down events. The popular method for checking key states on these keys is GetAsyncKeyState. The control key returns 29, and the alt key returns 56. However, the control and alt keys do not return unique scan codes. I can even detect between the left and right shift keys. So far, everything is working great! I can distinguish between numbers on the top row and numbers in the keypad on the right.
I started making use of Win32's raw input features to detect all keys on the keyboard.