Hi,
I have got exactly the same problem. I use something like…
public class MyClass extends JMECanvasImplementor {
static {
KeyInput.setProvider(InputSystem.INPUT_SYSTEM_AWT);
}
....
private InputHandler inputHandler;
....
@Override
public void doSetup() {
if (!setup) {
...
inputHandler = new InputHandler();
KeyInputAction keyInputAction = new KeyInputAction() {
public void performAction(InputActionEvent evt) {
System.out.println("This should be printed if space is pressed, but isn't. Why?");
}
};
KeyBindingManager keyboard = KeyBindingManager.getKeyBindingManager();
keyboard.set("space", KeyInput.KEY_SPACE);
inputHandler.addAction(keyInputAction, "space", false);
inputHandler.setEnabled(true);
...
}
}
@Override
public void doUpdate() {
if (setup && rootNode != null) {
...
inputHandler.update(tpf);
...
}
}
}
No action is ever performed in AWT / Swing