<?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>723</bug_id>
          
          <creation_ts>2013-04-23 13:01:42 +0200</creation_ts>
          <short_desc>Wrong keys with the AZERTY keyboard layout</short_desc>
          <delta_ts>2013-05-16 21:35:05 +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>core</component>
          <version>1</version>
          <rep_platform>pc_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>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Julien Gouesse">gouessej</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>gouessej</cc>
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>86a5460c5052cdab7b9f6294c46a0b4e30dfa260</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2506</commentid>
    <comment_count>0</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-23 13:01:42 +0200</bug_when>
    <thetext>Hi

When I switched to the latest aggregated build of April 11th 2013, almost all keys except keys for letters stopped working correctly. When I press F2, I get the virtual key corresponding to NUMPAD2. When I press &apos;4&apos; (not numpad 4), I get the virtual key corresponding to RIGHT. When I press &apos;5&apos;, I get the virtual key corresponding to DOWN. When I press &apos;1&apos;, I get the virtual key corresponding to UP. When I press F6, I get the virtual key corresponding to NUMPAD6.

When I switch back to the build published April 4th 2013, it works anew:
UP      code 0x6F sym FF52 shifted FF52 char &apos;
DOWN    code 0x74 sym FF54 shifted FF54 char &apos;
LEFT    code 0x71 sym FF51 shifted FF51 char &apos;
RIGHT   code 0x72 sym FF53 shifted FF53 char &apos;
NUMPAD6 code 0x55 sym FF98 shifted FFB6 char &apos;6&apos; javaUSkey US 0x27 NN 0x27

This bug is reproducible with JOGL build 974 too. Using getKeyCode() or getKeySymbol() doesn&apos;t help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2507</commentid>
    <comment_count>1</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-23 14:38:31 +0200</bug_when>
    <thetext>Compiling Ardor3D and my own program with different versions of JOGL 2 was a bad idea as VK values have changed (except those for letters?). My bug report is probably invalid, I will check that tonight.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2508</commentid>
    <comment_count>2</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-23 20:45:28 +0200</bug_when>
    <thetext>It works now. Using several versions of JOGL at the same time was a bad idea.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2533</commentid>
    <comment_count>3</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-27 10:35:55 +0200</bug_when>
    <thetext>There is still a problem with arrows in the latest aggregated build (April 25th 2013) under Windows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2540</commentid>
    <comment_count>4</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-28 11:06:20 +0200</bug_when>
    <thetext>Someone has just reported that it doesn&apos;t work at all under Windows XP whereas it partially works under Windows 7.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2542</commentid>
    <comment_count>5</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-29 21:03:18 +0200</bug_when>
    <thetext>I get this under Windows 7:
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x0, sym 0x95, char &apos; &apos; (0x0), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.windows.WindowDriver, consumed false, when:1367261180570 d 0ms]]]

I get the same log for other arrows bt with sym between 96 and 98.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2543</commentid>
    <comment_count>6</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-29 22:34:53 +0200</bug_when>
    <thetext>The key symbol is wrong under GNU Linux when I press the numpad keys but the key char is correct:

consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x96, sym 0x96, char &apos;8&apos; (0x38), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267402711 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x96, sym 0x96, char &apos;8&apos; (0x38), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267402803 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x98, sym 0x98, char &apos;2&apos; (0x32), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267412651 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x98, sym 0x98, char &apos;2&apos; (0x32), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267412826 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x95, sym 0x95, char &apos;4&apos; (0x34), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267413749 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x95, sym 0x95, char &apos;4&apos; (0x34), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267413925 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x97, sym 0x97, char &apos;6&apos; (0x36), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267414254 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x97, sym 0x97, char &apos;6&apos; (0x36), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267414422 d 0ms]]]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2544</commentid>
    <comment_count>7</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-29 22:42:17 +0200</bug_when>
    <thetext>The key symbols of numpad keys &apos;2&apos;, &apos;4&apos;, &apos;6&apos; and &apos;8&apos; are the same than those of the arrow keys under GNU Linux which is a wrong behaviour:
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x95, sym 0x95, char &apos;
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x95, sym 0x95, char &apos;
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x96, sym 0x96, char &apos;
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x96, sym 0x96, char &apos;
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x97, sym 0x97, char &apos;
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x97, sym 0x97, char &apos;
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x98, sym 0x98, char &apos;
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x98, sym 0x98, char &apos;

NUMPAD keys &apos;1&apos;, &apos;3&apos;, &apos;7&apos; and &apos;9&apos; seem to work:
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x3, sym 0x3, char &apos;1&apos; (0x31), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267920557 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x3, sym 0x3, char &apos;1&apos; (0x31), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267920639 d 1ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0xb, sym 0xb, char &apos;3&apos; (0x33), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267920816 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0xb, sym 0xb, char &apos;3&apos; (0x33), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267920918 d 1ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x2, sym 0x2, char &apos;7&apos; (0x37), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267921487 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x2, sym 0x2, char &apos;7&apos; (0x37), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267921583 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x10, sym 0x10, char &apos;9&apos; (0x39), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267921780 d 0ms]]]
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x10, sym 0x10, char &apos;9&apos; (0x39), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1367267921862 d 0ms]]]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2546</commentid>
    <comment_count>8</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-29 23:47:34 +0200</bug_when>
    <thetext>I get that when pressing NUMPAD &apos;2&apos; under Windows 7 (it seems to be correct):
consumeKeyEvent: KeyEvent[EVENT_KEY_PRESSED, code 0x98, sym 0x82, char &apos;2&apos; (0x32), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.windows.WindowDriver, consumed false, when:1367271878399 d 0ms]]]
WindowsWindow: surface change 0x7d010eea -&gt; 0x2d010eaa
WindowsWindow: surface change 0x2d010eaa -&gt; 0x7d010eea
WindowsWindow: surface change 0x7d010eea -&gt; 0x2d010eaa
WindowsWindow: surface change 0x2d010eaa -&gt; 0xffffffff9f010e45
consumeKeyEvent: KeyEvent[EVENT_KEY_RELEASED, code 0x98, sym 0x82, char &apos;2&apos; (0x32), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.windows.WindowDriver, consumed false, when:1367271878486 d 0ms]]]

The key symbol and the key char are correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2550</commentid>
    <comment_count>9</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-30 13:35:42 +0200</bug_when>
    <thetext>In X11Display.c here:
https://github.com/sgothel/jogl/blob/master/src/newt/native/X11Display.c#L125
XK_Left and XK_KP_Left are mapped to J_VK_LEFT whereas the second one should be mapped to VK_KP_LEFT. The current (incorrect?) behaviour is the same than Chromium&apos;s one:
http://src.chromium.org/svn/trunk/src/ui/base/keycodes/keyboard_code_conversion_x.cc

I will test with a QWERTY keyboard under Mac OS X too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2556</commentid>
    <comment_count>10</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-04-30 22:07:42 +0200</bug_when>
    <thetext>This pull request partially fixes the bug under Linux:
https://github.com/sgothel/jogl/pull/64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2557</commentid>
    <comment_count>11</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-05-02 10:23:33 +0200</bug_when>
    <thetext>We should rather add a &quot;keyLocation&quot; field or duplicated virtual keys for the numeric keypad into KeyEvent in order to be able to make a distinction between keys originated with the numerical keypad and others.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2558</commentid>
    <comment_count>12</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-05-02 10:33:41 +0200</bug_when>
    <thetext>Another solution consists in removing VK_KP_* constants and using only VK_NUMPAD* constants.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2596</commentid>
    <comment_count>13</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-05-16 18:14:28 +0200</bug_when>
    <thetext>(In reply to comment #12)
&gt; Another solution consists in removing VK_KP_* constants and using only
&gt; VK_NUMPAD* constants.

Yes, I will remove the VK_KP_* cursor keys, since they are 
not consistently supported on all platforms (Windows)
or X11 configurations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2597</commentid>
    <comment_count>14</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2013-05-16 19:34:00 +0200</bug_when>
    <thetext>(In reply to comment #13)
&gt; (In reply to comment #12)
&gt; &gt; Another solution consists in removing VK_KP_* constants and using only
&gt; &gt; VK_NUMPAD* constants.
&gt; 
&gt; Yes, I will remove the VK_KP_* cursor keys, since they are 
&gt; not consistently supported on all platforms (Windows)
&gt; or X11 configurations.

That&apos;s ok for me :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2598</commentid>
    <comment_count>15</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-05-16 21:35:05 +0200</bug_when>
    <thetext>    - KeyEvent keyCode/keySym values re-ordered!
    
    - Remove VK_KP_&lt;Cursor&gt; numpad key-codes, use general VK_&lt;Cursor&gt; key-codes.
      Numpad cursor keys are not supported on some platforms (Windows),
      or not configured on most X11 configurations.
    
    - Respect numpad printable keys,
      i.e. don&apos;t treat them as non-printable.
    
    - Use keySym for numpad if possible.
      Numpad keys require modifiers, hence X11 and Windows shall return keySym.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>