Login  Register

Re: Bug 688 - Removal of NEWT KeyEvent.EVENT_KEY_TYPED and KeyListener.keyTyped(KeyEvent)

Posted by Sven Gothel on Feb 15, 2013; 1:32pm
URL: https://forum.jogamp.org/Bug-688-Removal-of-NEWT-KeyEvent-EVENT-KEY-TYPED-and-KeyListener-keyTyped-KeyEvent-tp4028193p4028223.html

On 02/15/2013 02:10 PM, gouessej [via jogamp] wrote:

> Hi
>
> Finally, please consider keeping the typed events to ease the integration with
> other input APIs. Removing it would drive harder the port and the
> interoperability with several APIs generating such events including AWT and
> JInput. Despite our efforts, key pressed and key released events might
> preserve a very few platform-specific behaviours (which is more obvious for
> popup triggers in mouse events). Some developers are only interested in key
> typed events, for example when implementing a chat. The auto-repeat flag is
> nice but we should not be forced to use it to get true key typed events.
autorepeat/typed .. unrelated.

After fixing bug 688 (again),
PRESSED, RELEASED and TYPED events will all hold the UTF-16 char value.
Further more, RELEASED and TYPED will have the same timestamp.

Hence there is no technical necessity for TYPED events,
since they will deliver the same information as their previous arrived RELEASED event.

So the existance of TYPED is actually not helping or ease anything here
and as I and Rami already mentioned - removing TYPED will reduce the event load about 1/3.

To simplify migration to removal of TYPED, I will do the following:
  1) Fix Bug 688 -> RELEASED == TYPED -> Start using RELEASED in your code.
  3) Create an aggregated build + maven
  2) Fix Bug 688 -> Remove TYPED event
  4) Create an aggregated build + maven

I guess that is reasonable and allows us to remove buggy code (-> redundancy).

~Sven




signature.asc (911 bytes) Download Attachment