Backslash generates "WARNING: unsupported key:0"

As the title says. I have a JMEDesktop with a JInternalFrame, and a couple of my controls on the internal frame are attached to a keylistener. When I press the backslash key, the following is logged:

Mar 16, 2009 7:37:07 PM com.jmex.awt.input.AWTKeyInput toAWTCode
WARNING: unsupported key:0


I am on Ubuntu 8.10; don't know if this has anything to do with it (if so, WHY??).

Is a solution on the way? Am I doing something wrong?

Thanks!

Please post a test…



Example:


import com.jme.app.SimpleGame;
import com.jme.input.KeyBindingManager;
import com.jme.input.KeyInput;



public class BackSlashTest extends SimpleGame {

    public static void main( String[] args ) {
        new BackSlashTest();
    }

    public BackSlashTest() {
        this.setConfigShowMode( ConfigShowMode.AlwaysShow );
        this.start();
    }

    @Override
    protected void simpleInitGame() {

        KeyBindingManager.getKeyBindingManager().set( "TEST_KEY", KeyInput.KEY_BACKSLASH );

    }

    @Override
    protected void simpleUpdate() {
        if( KeyBindingManager.getKeyBindingManager().isValidCommand( "TEST_KEY", false ) ){
            System.out.println( "TestKey" );
        }
    }
}

Pressing the backslash key did not do anything, no TestKey or other messages at all.



EDIT:

Ah, upon a second reading I see you want me to make a test case. Yes, I'll write one that exhibits the problem I'm talking about.

Okay, I went and wrote a nice test case that duplicated what I'm doing.



Then I pared it down. And even removing almost everything, I narrowed it down to the minimal lines necessary to generate the warning when I press the backslash key. The warning message shows up with just this code:


import com.jme.app.SimpleGame;
import com.jmex.awt.swingui.JMEDesktop;

public class BackSlashTest extends SimpleGame {

    public static void main( String[] args ) {
        new BackSlashTest();
    }

    public BackSlashTest() {
        this.setConfigShowMode( ConfigShowMode.AlwaysShow );
        this.start();
    }
   
    @Override
    protected void simpleInitGame() {
       JMEDesktop jmedesktop = new JMEDesktop("jmedesktop1");
       jmedesktop.setup(display.getWidth(), display.getHeight(), false, input);
    }

    @Override
    protected void simpleUpdate() {

    }
}



When I run the program and press backslash, the identical message that I posted in the beginning is logged.

I debugged a bit into lwjgl and noticed the following:

I have a swissgerman keyboard, when i press '<'  i also get your error message.



The method WindowsKeycodes.mapVirtualKeyToLWJGLCode(int virt_key) maps the windows code to a lwjgl code.



virt_key is 226, which would be the correct key:

org.lwjgl.opengl.WindowsKeycodes

public final static int VK_OEM_102        = 0xE2;  //  "<>" or "|" on RT 102-key kbd.



But org.lwjgl.input.Keyboard has no define for 0xE2, that why KeyCode 0 is returned.

Ah, so it's lwjgl's fault then… Hmm. Does jMonkey Engine use the latest lwjgl? (I'm using the one provided in svn); if not, does a newer one include a fix for that?



Anyway luckily I do not need the backslash key, it was just a random thing I happened to find when I accidentally hit backslash instead of backspace while testing my JInternalFrame.

To my knowledge, jME is using the latest stable release of LWJGL. Feel free to mention this issue over there, perhaps they can get it resolved.