As expected, the two extra buttons on all mice send XBUTTON1 and XBUTTON2 messages. However with a Sculpt ergonomic mouse, the Windows button does not send this. Apparently it sends the right Windows key. I need to fix it so that it sends XBUTTON2.
I was able to disable the Windows button from doing anything by following this: Rebind Microsoft Sculpt Mobile Mouse (Windows Key) - but this disables the Windows button on the mouse completely and doesn't make it function as normally as on all other five button mice. It should send
However I need it to function as XBUTTON2.
Here is a detailed explanation:
I am a software developer. I bought the Sculpt ergonomic mouse because it has five buttons (and horizontal scroll), so it can allow me to test all the button messages. It especially helps with keeping me comfortable while I type/mouse away.
The button messages are seen here for mouse hook: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644986.aspx
The mouseData field is set according to the mouse button:
- Pressing the left mouse button sends message:
- Right mouse button:
- Middle mouse button:
- Side mouse button:
WM_XBUTTONDOWNand we see in the MSLLHOOKSTRUCT structure: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644970.aspx?f=255&MSPPError=-2147217396 - that mouseData field is
- Now the issue - Windows mouse button is sending nothing - I am expecting it to send message
WM_XBUTTONDOWNwith mouseData of
XBUTTON2(notice the 2)
Here is a graphic to explain the bullet points:
The green arrow and text cloud shows thats how it is, and thats what I expect. The red arrow and text cloud is what I expect the windows mouse button to do, but it doesn't. Anyone can help me make this windows mouse button work as expected from a winapi standpoint?