Using right click as primary mouse button doesn't work on Windows

It looks like JUCE on Windows doesn’t care if the OS has right click as primary button. Left is always the primary. On MAC (even High Sierra) instead it works ok.
What can I do? (I’m still on JUCE 4)

bump

I see there’s a GetSystemMetrics (SM_SWAPBUTTON) flag that we’d have to check internally and do the swap, as win32 only reports that actual physical button, not whether it’s the primary or not.

It’s something we can fix in the latest build, but you’d be on your own in patching your old juce 4 version.

Do any of the Juce team know if this was attempted and found not to be viable for some reason, or was it just a victim of higher priority work?

Over the years I’ve had a number of left-handed Windows users get in touch who like to choose their primary mouse button as ‘right’ instead of ‘left’, but Juce plug-ins don’t follow the change and it’s a bit of a workflow killer for them. On macOS it seems fine.

So I’m wondering if there is a chance of this one getting another look, it could be really helpful to some. Having spent 6 months of my right-handed life as a leftie following an injury a while back, I really understand where they’re coming from!

Thanks in advance for considering.

3 Likes

Hi, I am continuing to receive user feedback about this issue where Windows mouse button swapping is not respected by Juce, is there any chance of the Juce team looking into an update?

1 Like

Bump. I was just about to open a new topic and found this thread here.

Windows has an OS-specific mouse setting for left-handed persons. Instead of using the left button as the primary mouse button you can switch it to the right mouse button.
In that case I would have expected that

ModifierKeys::getCurrentModifiersRealtime().isPopupMenu()

reacts on a left mouse click. But this is not happening.
Thus, I got complaints that in my plugin the behavior is mixed for left-handed users.
Can this be fixed?

No idea if this has been looked at, it sounds reasonable for us to be doing this but the likelihood is that it won’t get any attention until at least the new year now. Sorry

1 Like