How I can understand which mouse button cliked (left or right)?


#1

Hello! I am a beginner in developing on JUCE and I have a stupid question:)How I can understand which mouse button cliked (left or right)?


#2

If you are in a callback such as for example mouseDown (const MouseEvent& e), then you will have access to e.mods, which is an object of type ModifierKeys. This type has functions like isLeftButtonDown(), isRightButtonDown() etc. that you can use to find out more about the mouse event that happened.