ClassiCube icon indicating copy to clipboard operation
ClassiCube copied to clipboard

Controls cannot be bound to mouse buttons 6 and above

Open muzikbike opened this issue 1 year ago • 6 comments

Mouse buttons 1, 2 and 3 are recognised as LMOUSE, RMOUSE and MMOUSE as expected, and buttons 4 and 5 as XBUTTON1 and XBUTTON2. However, buttons six and above are completely ignored, and trying to bind controls to these has ClassiCube refuse to acknowledge any button has been pressed at all.

For some reason, Windows only recognises up to five mouse buttons. However, macOS and Linux all permit higher buttons, so I'd expect some way for these to be recognised for binding controls to.

muzikbike avatar May 16 '24 00:05 muzikbike

The latest commit should support 4 additional extra mouse buttons on Linux and macOS, although I cannot test it myself

UnknownShadow200 avatar May 16 '24 07:05 UnknownShadow200

I assume support for arbitrary buttons is planned? I can test up to 16

muzikbike avatar May 16 '24 18:05 muzikbike

Well I went with the same number of extra buttons as GLFW

You can try running from terminal and seeing if Unknown mouse button: [number] gets printed to it - if the extra buttons past 6 are still getting recognised, I guess I could add support for even more

Edit: there does have to be a hardcoded limit on number of extra buttons at some point though

UnknownShadow200 avatar May 16 '24 20:05 UnknownShadow200

Buttons 6, 7 and 8 don't appear to be printing anything to the log as it is currently, so I'll need to rebind and test the higher buttons to see how those work.

muzikbike avatar May 16 '24 23:05 muzikbike

I added support for those buttons already, so those won't log anything and you should be able to bind them in-game.

UnknownShadow200 avatar May 17 '24 07:05 UnknownShadow200

Interestingly unlike what I've seen with media keys (#1188), mouse buttons 8 to 16 don't actually appear to output anything to the log about an unrecognised input.

muzikbike avatar May 17 '24 14:05 muzikbike