Trackpad right-button key modifier?

Please be aware that adding a MouseListener for intercepting the right mouse click is only half of the problem: the Button that you right-clicked will still perform its action exactly as if it were left-clicked, and that may not be what you wanted/your user expects when right-clicking to display its context menu.

To prevent the left-click action being triggered when right-clicking, there are a number of workarounds (listed in the topic linked below), but IMHO it would be better for JUCE Buttons to natively have an option to ignore right-clicks (or hey, even provide a onRightClick lambda for them, that would be awesome) so if you agree, please cast your vote in the Feature Request topic linked below, perhaps that will catch the JUCE team attention…

1 Like