问题
I wrote a low-level mouse hook in C#, which should capture XBUTTON events. For the 1st and 2nd xButton it works just fine, but there is no message for the 3rd xButton on my mouse. It seems like there is no possible way to capture events for that button?
I have a gaming mouse and there, between the two first xButtons, is a third xButton. When I click it, nothing happens, so I wanted to write a custom C# Mouse-Hook app to program a custom behaviour for that button...
回答1:
That's correct. The third X-button is handled by your mouse drivers, not by Windows itself. Windows doesn't have built-in knowledge of or support for more than two X-buttons. Those additional buttons wouldn't do anything at all without special drivers installed.
You need to find out how to communicate with your mouse driver software. That's the only way to get notifications when those buttons are clicked.
来源:https://stackoverflow.com/questions/5702617/hooking-the-3rd-x-mouse-button