Login  Register

Mac trackpad horizontal scrolling with NEWT

Posted by pron on Dec 30, 2012; 7:12pm
URL: https://forum.jogamp.org/Mac-trackpad-horizontal-scrolling-with-NEWT-tp4027658.html

Hi.

Mac notebooks support two-finger scrolling with the trackpad. This generates mouse-wheel events. With AWT, MouseWheelEvent.isShiftDown() returns false for vertical scrolling and true for horizontal scrolling. However, with NEWT, MouseEvent.isShiftDown() returns false in both cases (though it returns true when the shift key is actually down).

This means that there is no way to detect horizontal scrolling. I've been able to find a twisted workaround by creating a translucent AWT frame on top of the NEWT window and capturing the events there, but it would be great if NEWT could also return true from MouseEvent.isShiftDown() in the case of horizontal scrolling.