Re: Newt KeyEvent "typed" only produced on key-up and auto-repeat
Posted by
Sven Gothel on
Jan 29, 2013; 4:16am
URL: https://forum.jogamp.org/Newt-KeyEvent-typed-only-produced-on-release-and-auto-repeat-tp4028032p4028034.html
On 01/28/2013 11:21 PM, GiGurra [via jogamp] wrote:
>
>
> While developing a small OpenGL/OpenCL game using JOGL and JOCL, we've run
> into a problem with newt KeyEvents.
>
> As we target Windows, and want to support chat, we need to be able
> to get correct key characters for different keyboard events.
>
> (These tests are on oracle's java7 64 bit jvm on windows 7 using jogl 2.0-rc11)
>
> Jogl KeyEvent typed events deliver the correct characters, HOWEVER:
> The first typed event arrives with a significant delay, since it is only
> produces when the key is released (or when the first autorepeat kicks in).
>
> This is problematic as it makes text input seem very sluggish.
>
> Pressed-events are delivered instantly, however as documented, these do not
> give any character information.
>
> Is there any known way to solve or work around this?
You could use the key-code, which ofc would be a PIA for you - hmm.
> Is there any jogl beta where typed events get delivered faster on windows or
> where Pressed events contain character info?
But I see your point .. and I will look into this again and reply here
in a while ..
~Sven