I’m developing a small application where I allow the user to map the keys. The problem is that there are two Ctrl and Shift keys, and other keys like “fn”, or language specific keys. ModifierKeysChanged() doesn’t provide enough information about which key has been used.
Is there any way to obtain which real key has been pressed or released and being able to identify it?
I’ve digging into JUCE code and I see that it has a MSG object which has a lParam variable with a code which seems unique for each key. Should I hack it? Or is it the wrong parameter?
static LRESULT CALLBACK keyboardHookCallback (int nCode, WPARAM wParam, LPARAM lParam)
{
MSG& msg = *(MSG*) lParam;
// More code here...
}