Mouse button 4 and 5

Hi!


There’s devices with mouse button 4 and 5 out there. Often the forward and back button.

Back when we were vstgui based I could get access to these, but when we ported to JUCE I lost it, since mouse event only has main left right button.

Is there any way in JUCE currently (without forking obviously) to get access to those events? Thanks!

Sadly JUCE doesn’t support the additional buttons.

For example on Win32, you’d go here to get the proper commands: Responding to Mouse Clicks - Win32 apps | Microsoft Learn . In other words, I think you’d have to add MK_XBUTTON1 and MK_XBUTTON2 to the input process in the native Windows code in JUCE…

Support for mouse buttons 4+5 is now available on the develop branch. Please try it out and let us know if you run into any problems.

3 Likes