Hooking the 3rd X-Mouse button?

青春壹個敷衍的年華 提交于 2019-12-07 13:35:19

问题



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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!