GZDoom does not detect extra mouse buttons.

Mon Oct 19, 2020 5:36 am

So recently I acquired a Steelseries Rival 710 mouse, and I was interested in testing it with GZDoom. However when I try to bind the mouse 6 button https://imgur.com/a/2CwkdHd to one of the actions in GZDoom, it does not recognize it. Which is weird because GZDoom does recognize the other buttons. Does anyone know why this is happening or how could I make GZDoom recognize the missing button?

Thanks in advance.

Re: GZDoom does not detect extra mouse buttons.

Wed Oct 21, 2020 2:28 am

I've found the following comment in the source file that contains code to process mouse input:

Code:
// Check buttons. The up and down motions are stored in the usButtonFlags field.
// The ulRawButtons field, unfortunately, is device-dependant, and may well
// not contain any data at all. This means it is apparently impossible
// to read more than five mouse buttons with Windows, because RI_MOUSE_WHEEL
// gets in the way when trying to extrapolate to more than five.

I don't have experience working with WinAPI and the like, but looking at the commit log, this comment has been there since ancient times (at least 2009) - perhaps the situation is better now, and it is actually possible to implement support for more mouse buttons? But at the moment, this limitation is still in place.

However, regardless of the above, you could use SteelSeries Engine to rebind the 6th button to something else - a key on the keyboard that you don't use, for example - and then bind the desired action to that key. Not a perfect solution, but it does make this button usable.

Re: GZDoom does not detect extra mouse buttons.

Wed Oct 21, 2020 9:17 am

I suspect a bigger issue is that Windows itself just doesn't have a "default" action associated with any button higher than 5, and thus, most mice that have more than 5 buttons need their drivers installed in order to use them for anything beyond whatever they're programmed to do in their onboard data (such as, say, the Corsair M65's DPI and Sniper buttons).

Re: GZDoom does not detect extra mouse buttons.

Wed Oct 21, 2020 10:13 am

DirectInput supports up to eight mouse buttons. Their actual functionality depends on particular hardware and drivers.
GZDoom doesn’t use DirectInput by default. Set in_mouse CVAR to 2 in order to give it a try.

Re: GZDoom does not detect extra mouse buttons.

Wed Oct 21, 2020 10:30 am

I have a 6 button mouse, but the sixth button doesn't get reported in any of the 3 interfaces. It does not register as input at all.

Re: GZDoom does not detect extra mouse buttons.

Wed Oct 21, 2020 7:55 pm

I have a 7 button Logitech mouse. Buttons 1-5 get detected, buttons 6 and 7 get reported as additional copies of buttons 4 and 5. GZDoom will register "mouse5" as bound when I bind either of the buttons on the right shoulder of my mouse to something, and pressing either one activates whatever action was bound to mouse5. (i.e. both buttons act as mouse5 as far as GZDoom is concerned.)

Re: GZDoom does not detect extra mouse buttons.

Thu Oct 22, 2020 12:22 am

What happens if you set "in_mouse 2" at the console?

Re: GZDoom does not detect extra mouse buttons.

Thu Oct 22, 2020 5:17 am

An interesting result:
The buttons that register as mouse4 with "in_mouse 0" behave the same with "in_mouse 2".
The buttons that register as mouse5 have a problem - the first time they are pressed they get ignored. e.g. if I open the menu and try to bind them, pressing the button once does not work but it registers on a second press (note, not a double click; two separate clicks).
Then, once bound, this behaviour continues. e.g. I bound mouse5 to fire and then went back into the game. Pressing the button once did not fire the weapon but a second press did. i.e. the button worked normally (every press = a fire of the weapon) from that point on.
Both buttons on the right showed this behaviour.

So, "in_mouse 2" did not seem to make any difference to the button allocation but it did cause a strange "ignore the first press" fault with the buttons that register as mouse5.

Re: GZDoom does not detect extra mouse buttons.

Thu Oct 22, 2020 5:45 am

Windows definitely needs a better interface here. This all looks quite broken on the OS side.

Re: GZDoom does not detect extra mouse buttons.

Thu Oct 22, 2020 9:43 am

Are you using the actual driver that came with the mouse or are you using the default operating system driver?

I would expect a HUGE difference in the behavior between the two and I suspect that's where the breakdown is occurring. If not, then it would definitely be in the ABI's which simply are not sufficient enough to handle this.

Re: GZDoom does not detect extra mouse buttons.

Mon Oct 26, 2020 12:14 am

Crap, sorry for not posting earlier but I got distracted with real life work!

However, regardless of the above, you could use SteelSeries Engine to rebind the 6th button to something else - a key on the keyboard that you don't use, for example - and then bind the desired action to that key. Not a perfect solution, but it does make this button usable.


This was my first idea actually however the game (or Windows?) never seemed to detect the button press.

Are you using the actual driver that came with the mouse or are you using the default operating system driver?[


I actually did download the drivers from the Steelseries website. I'm gonna see if reinstalling changes anything than try testing in_mouse CVAR to 2.

Thanks for the advise everyone! :)

Re: GZDoom does not detect extra mouse buttons.

Mon Oct 26, 2020 12:21 am

Gen5lock131 wrote:
However, regardless of the above, you could use SteelSeries Engine to rebind the 6th button to something else - a key on the keyboard that you don't use, for example - and then bind the desired action to that key. Not a perfect solution, but it does make this button usable.


This was my first idea actually however the game (or Windows?) never seemed to detect the button press.

That's odd... I have the exact same mouse, and this solution worked for me. Maybe it's due to OS or driver differences, can't say for sure.

Re: GZDoom does not detect extra mouse buttons.

Fri Jan 15, 2021 3:34 pm

I have the same mouse and the software allows rebinding buttons to keyboard keys, and you can make profiles too bound to the game exe.

So why you just dont do that? I do it with every game like this. So I dont have to rely on detected mouse buttons.

edit: oh it doesnt work? thats very weird. For me it actually does :?