<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>678</bug_id>
          
          <creation_ts>2013-01-29 13:09:10 +0100</creation_ts>
          <short_desc>NEWT KeyEvent key-char value on Windows not delivered w/ PRESSED induces UI lag if depending on key-char value</short_desc>
          <delta_ts>2013-04-06 05:00:50 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Newt</product>
          <component>windows</component>
          <version>1</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>688</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>damichl73</cc>
    
    <cc>gouessej</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>jogl 90e136b65a10d8daf8c3a2df6cc193e55a63722c
jogl 85338858f5c58694fa88e77df1386d0556887944
jogl 4898f582d9303caa7fd1b44438808e86b51c2a3b</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2139</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-01-29 13:09:10 +0100</bug_when>
    <thetext>http://forum.jogamp.org/Newt-KeyEvent-typed-only-produced-on-key-up-and-auto-repeat-tp4028032.html

This is a know issue and documented in NEWT&apos;s KeyEvent getKeyChar() (-&gt; DISCLAIMER).

Analysis:

  NEWT delivery order: 
      PRESSED (t0), RELEASED (t1) and TYPED (t1)

  WINDOWS delivery order: 
      PRESSED (t0), TYPED (t0) and RELEASED (t1)
  Windows Auto-Repeat:
      PRESSED (t0), TYPED (t0)


It has been observed that the even though the WINDOWS delivery order is &apos;rotated&apos;,
we Windows PRESSED and TYPED events are incoming at (almost) the same time,
i.e. beyond measurement accuracy.

Hence we could change the event reorder code in NEWT to trigger on TYPED
and use it&apos;s valid key-char value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2140</commentid>
    <comment_count>1</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-01-29 14:56:14 +0100</bug_when>
    <thetext>It would be fine to keep this order consistent across platforms (if possible) instead of risking to break it all to favor Windows support.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2141</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-01-29 21:18:41 +0100</bug_when>
    <thetext>(In reply to comment #1)
&gt; It would be fine to keep this order consistent across platforms (if possible)
&gt; instead of risking to break it all to favor Windows support.

Order is and will be consistent, just adapting to the fact that on Windows
PRESSED and TYPED arrive at the &apos;same&apos; time (hence both @ t0).
So we can use TYPED for printable chars as the event trigger
and have the key-char value consistent for all platforms for all KeyEventListener callbacks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2142</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-01-29 21:28:50 +0100</bug_when>
    <thetext>http://jogamp.org/git/?p=jogl.git;a=commit;h=90e136b65a10d8daf8c3a2df6cc193e55a63722c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2185</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-02-15 14:27:39 +0100</bug_when>
    <thetext>regression w/ modifier keys .. 

need to properly deduce UTF-16 char value @ key PRESS/RELEASE to produce
all events. 

May related to Bug 688, i.e. allows removal of TYPED event.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2198</commentid>
    <comment_count>5</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-02-19 08:05:47 +0100</bug_when>
    <thetext>http://jogamp.org/git/?p=jogl.git;a=commit;h=85338858f5c58694fa88e77df1386d0556887944</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2246</commentid>
    <comment_count>6</comment_count>
    <who name="cubus">damichl73</who>
    <bug_when>2013-03-08 03:26:54 +0100</bug_when>
    <thetext>jogl 2.0 rc-11
windows vista 32 bit
java 1.6.0_39
german keyboard (qwertz)

in keyTyped(), KeyEvent.getKeyChar() returns invalid values for the &apos;ß&apos; key.

problem 1
---------
&apos;ß&apos;         -&gt; &apos;ß&apos; (OK)
&apos;ß&apos; + SHIFT -&gt; &apos;ß&apos; (SHOULD BE &apos;?&apos;)
&apos;ß&apos; + ALTGR -&gt; &apos;ß&apos; (SHOULD BE &apos;\&apos;)

problem 2
---------
the first time &apos;ß&apos; gets typed after application startup:
KeyEvent.getKeyEvent() returns 0
KeyEvent.getKeyChar() returns 65535

problem 3
---------
when typing &apos;ß&apos; + ALTGR:
KeyEvent.isAltGraphDown() returns false, but
KeyEvent.isAltDown() AND KeyEvent.isAltControlDown() both return true.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2437</commentid>
    <comment_count>7</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-04-06 05:00:50 +0200</bug_when>
    <thetext>(In reply to comment #6)
&gt; jogl 2.0 rc-11
&gt; windows vista 32 bit
&gt; java 1.6.0_39
&gt; german keyboard (qwertz)
&gt; 
&gt; in keyTyped(), KeyEvent.getKeyChar() returns invalid values for the &apos;ß&apos; key.
&gt; 
&gt; problem 1
&gt; ---------
&gt; &apos;ß&apos;         -&gt; &apos;ß&apos; (OK)
&gt; &apos;ß&apos; + SHIFT -&gt; &apos;ß&apos; (SHOULD BE &apos;?&apos;)
&gt; &apos;ß&apos; + ALTGR -&gt; &apos;ß&apos; (SHOULD BE &apos;\&apos;)
&gt; 
&gt; problem 2
&gt; ---------
&gt; the first time &apos;ß&apos; gets typed after application startup:
&gt; KeyEvent.getKeyEvent() returns 0
&gt; KeyEvent.getKeyChar() returns 65535

&apos;ß&apos;:
  KeyEvent[EVENT_KEY_PRESSED, code 0x2d, sym 0x5b, char &apos;�&apos; (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [],
  KeyEvent[EVENT_KEY_RELEASED, code 0x2d, sym 0x5b, char &apos;�&apos; (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [],
  KeyEvent[EVENT_KEY_TYPED, code 0x2d, sym 0x5b, char &apos;�&apos; (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [],

 - code 0x2d == VK_MINUS  -&gt; OK
 - sym 0x5b == VK_OPEN_BRACKET -&gt; ERR, Win7 mapped it here to VK_OEM_4  &apos;[{&apos; key .. only valid for US *** ERROR ***

&gt; 
&gt; problem 3
&gt; ---------
&gt; when typing &apos;ß&apos; + ALTGR:
&gt; KeyEvent.isAltGraphDown() returns false, but
&gt; KeyEvent.isAltDown() AND KeyEvent.isAltControlDown() both return true.

Fixed ALTGR w/ commit4898f582d9303caa7fd1b44438808e86b51c2a3b , 
however, CTRL is down w/ German KBD and I dunno why.

ALT + &apos;ß&apos;:
  KeyEvent[EVENT_KEY_PRESSED, code 0x12, sym 0x12, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [alt],
  KeyEvent[EVENT_KEY_PRESSED, code 0x2d, sym 0x5b, char &apos;�&apos; (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [alt],
  KeyEvent[EVENT_KEY_RELEASED, code 0x2d, sym 0x5b, char &apos;�&apos; (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [alt],
  KeyEvent[EVENT_KEY_TYPED, code 0x2d, sym 0x5b, char &apos;�&apos; (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [alt],
  KeyEvent[EVENT_KEY_RELEASED, code 0x12, sym 0x12, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [alt],


&apos;ß&apos; + ALT:
  KeyEvent[EVENT_KEY_PRESSED, code 0x2d, sym 0x5b, char &apos;�&apos; (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [],
  KeyEvent[EVENT_KEY_PRESSED, code 0x12, sym 0x12, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [alt],
  KeyEvent[EVENT_KEY_RELEASED, code 0x2d, sym 0x5b, char &apos;�&apos; (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [alt],
  KeyEvent[EVENT_KEY_TYPED, code 0x2d, sym 0x5b, char &apos;�&apos; (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [alt],
  KeyEvent[EVENT_KEY_RELEASED, code 0x12, sym 0x12, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [alt],

ALTGR:
  KeyEvent[EVENT_KEY_PRESSED, code 0x11, sym 0x11, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl],
  KeyEvent[EVENT_KEY_PRESSED, code 0xff7e, sym 0x12, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl, altgr],
  KeyEvent[EVENT_KEY_RELEASED, code 0x11, sym 0x11, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl, altgr],
  KeyEvent[EVENT_KEY_RELEASED, code 0xff7e, sym 0x12, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [altgr],

ALTGR + &apos;ß&apos;:
  KeyEvent[EVENT_KEY_PRESSED, code 0x11, sym 0x11, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl],
  KeyEvent[EVENT_KEY_PRESSED, code 0xff7e, sym 0x12, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl, altgr],
  KeyEvent[EVENT_KEY_PRESSED, code 0x2d, sym 0x5b, char &apos;\&apos; (0x5c), isModifierKey false, isActionKey false, InputEvent[modifiers: [ctrl, altgr],
  KeyEvent[EVENT_KEY_RELEASED, code 0x2d, sym 0x5b, char &apos;\&apos; (0x5c), isModifierKey false, isActionKey false, InputEvent[modifiers: [ctrl, altgr],
  KeyEvent[EVENT_KEY_TYPED, code 0x2d, sym 0x5b, char &apos;\&apos; (0x5c), isModifierKey false, isActionKey false, InputEvent[modifiers: [ctrl, altgr],
  KeyEvent[EVENT_KEY_RELEASED, code 0x11, sym 0x11, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl, altgr],
  KeyEvent[EVENT_KEY_RELEASED, code 0xff7e, sym 0x12, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [altgr],

SHIFT + &apos;ß&apos;:
  KeyEvent[EVENT_KEY_PRESSED, code 0x10, sym 0x10, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [shift],
  KeyEvent[EVENT_KEY_PRESSED, code 0x2d, sym 0x5b, char &apos;?&apos; (0x3f), isModifierKey false, isActionKey false, InputEvent[modifiers: [shift],
  KeyEvent[EVENT_KEY_RELEASED, code 0x2d, sym 0x5b, char &apos;?&apos; (0x3f), isModifierKey false, isActionKey false, InputEvent[modifiers: [shift],
  KeyEvent[EVENT_KEY_TYPED, code 0x2d, sym 0x5b, char &apos;?&apos; (0x3f), isModifierKey false, isActionKey false, InputEvent[modifiers: [shift],
  KeyEvent[EVENT_KEY_RELEASED, code 0x10, sym 0x10, char &apos;&apos; (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [shift],</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>