So I'm trying to build a simple input-handler to work against windows message-loop. But for some reason when I test the case of WM_MBUTTONDOWN I get the same wParam as if I press the "Shift-key". The code I get when trying to click my middle mouse button is 16 in decimal or 0x10 in hexadecimal. When I looked into it I can see that MBUTTON should be 0x04 but I don't get that.
Anyone encountered this before?
This is the code that I'm using in the WndProc function of my Win32 application. (Ofcourse there is more cases that check if they're up and so on, but didn't feel it was relevant to the question)
case WM_MBUTTONDOWN:
if (wParam < 256)
{
globalInputManager.SetKeyIsDown(static_cast<uint8_t>(wParam));
OutputDebugStringA(std::to_string(wParam).c_str());
}
break;
case WM_KEYDOWN:
if (wParam < 256)
{
globalInputManager.SetKeyIsDown(static_cast<uint8_t>(wParam));
OutputDebugStringA(std::to_string(wParam).c_str());
}
break;