Login  Register

Re: MouseListener, mouseWheelMoved and Shift

Posted by elect on Jan 16, 2014; 2:11pm
URL: https://forum.jogamp.org/MouseListener-mouseWheelMoved-and-Shift-tp4031233p4031243.html

Ah, and what about if I need to check a double combination?

For example if both

MouseEvent.BUTTON1 && MouseEvent.BUTTON2

are pressed at the same time?

Sorry, is it right doing so?

if ((mouseEvent.getModifiers() & (MouseEvent.BUTTON2_MASK + MouseEvent.BUTTON3_MASK))
                == (MouseEvent.BUTTON2_MASK | MouseEvent.BUTTON3_MASK)) {
                 
                ...
        }