Mac trackpad horizontal scrolling with NEWT

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Mac trackpad horizontal scrolling with NEWT

pron
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.
Reply | Threaded
Open this post in threaded view
|

Re: Mac trackpad horizontal scrolling with NEWT

Sven Gothel
Administrator
On 12/30/2012 08:12 PM, pron [via jogamp] wrote:

> 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.
>
Please file a bug report and make it depend on:
  <https://jogamp.org/bugzilla/show_bug.cgi?id=629>

Is this happing w/ a 'pure' NEWT OSX window ?

Then pls name the bug:
  'NEWT key modifier bits (SHIFT, ..) not set w/ trackpad 2 finger horizontal scrolling'
.. and add your description above.

~Sven



signature.asc (909 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac trackpad horizontal scrolling with NEWT

Sven Gothel
Administrator
In reply to this post by pron
On 12/31/2012 08:49 AM, Sven Gothel wrote:

> On 12/30/2012 08:12 PM, pron [via jogamp] wrote:
>> 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.
>>
>
> Please file a bug report and make it depend on:
>   <https://jogamp.org/bugzilla/show_bug.cgi?id=629>
and on:
    <https://jogamp.org/bugzilla/show_bug.cgi?id=656>

Thank you!

>
> Is this happing w/ a 'pure' NEWT OSX window ?
>
> Then pls name the bug:
>   'NEWT key modifier bits (SHIFT, ..) not set w/ trackpad 2 finger horizontal scrolling'
> .. and add your description above.
>
> ~Sven
>
>



signature.asc (909 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac trackpad horizontal scrolling with NEWT

gouessej
Administrator
In reply to this post by pron
Can't you use the button to know whether the scroll is horizontal or vertical? Using isShiftDown() in this case looks like a hack.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Mac trackpad horizontal scrolling with NEWT

pron
gouessej wrote
Can't you use the button to know whether the scroll is horizontal or vertical? Using isShiftDown() in this case looks like a hack.
Which button? isShiftDown() is the way it works in AWT and Swing, and probably in native OS X apps (I wouldn't know; I'm not an OS X expert by any means)
Reply | Threaded
Open this post in threaded view
|

Re: Mac trackpad horizontal scrolling with NEWT

pron
In reply to this post by Sven Gothel

Done: https://jogamp.org/bugzilla/show_bug.cgi?id=659 

Yes, this is a pure NEWT window (i.e, not a NEWT canvas inside an AWT frame, if that's what you meant)