SCENARIO
I wrote a simple method that acts as a wrapper of PostMessage function to send keystrokes to a non-active window. This method takes a virtual-key code as one of its parameters.
PROBLEM
Theorycally, modifier keys and extended keys can't be sent through this function (as commented by many professional programmers, for example this comment by @Hans Passant), so, I would like to programmatically determine whether the virtual-key code argument that my method receives it belongs to a "normal" key, a modifier key or a extended key, this way I would be able to treat these last two key types with keybd_event or SendInput function instead of PostMessage.
QUESTION
How can achieve this in C# or VB.NET?. I always could write a small if or switch to detect the modifier keys because they are only few, but I can't find any Win32 function that can tell me whether a virtual-key code is a extended key or isn't.
To be honest, I don't know exactly what "extended" key stands for, the only information I found about this terminology is on WM_KEYDOWN / WM_KEYUP docs, where it says something very superficially:
an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard.