KeyPressed AWT vs NEWT

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

KeyPressed AWT vs NEWT

jouvieje
I've find a difference between KeyPressed from NEWT vs AWT. All KeyPressed events from newt have an undefined key char, while awt.KeyEvent have a valid key char.

I have a workaround (not pretty) to handle the differences, but that would be great to have same behavior with  awt/newt.

I'm using JOGL b544 with windows 7. Does anyone have seen this different in different os too ?
Jérôme
Reply | Threaded
Open this post in threaded view
|

Re: KeyPressed/Typed AWT vs NEWT

Sven Gothel
Administrator
On Thursday, November 10, 2011 07:05:44 PM jouvieje [via jogamp] wrote:
>
> I've find a difference between KeyPressed from NEWT vs AWT. All KeyPressed
> events from newt have an undefined key char, while awt.KeyEvent have a valid
> key char.

Yup, only on key typed KeyEvent delivers a valid key char in NEWT.
This is shown in all unit tests, but I shall add this to the API doc - thx.

The key code is always valid though.

>
> I have a workaround (not pretty) to handle the differences, but that would
> be great to have same behavior with  awt/newt.

The reason for this NEWTY behavior 'was' that we couldn't get the proper
char value on one platform for 'pressed', I guess it was Windows :)

>
> I'm using JOGL b544 with windows 7. Does anyone have seen this different in
> different os too ?

See above.

Hmm .. maybe you can fix it in NEWT ?
I may check on this later .. pls file a bug report in bugzilla.

Thank you..

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: KeyPressed/Typed AWT vs NEWT

jouvieje
Sven Gothel wrote
Hmm .. maybe you can fix it in NEWT ?
I may check on this later .. pls file a bug report in bugzilla.
I've filed a bug here: https://jogamp.org/bugzilla/show_bug.cgi?id=526.
Not sure how I can help you on that, but let me know if you need me.
Jérôme