linked to my question on this
viewtopic.php?f=21&t=4893the issue is on the input class for android, the keyevent must be mapped on the keyTyped method and not on the keyDown method
because he can't seem to map the int to a char, which gets you the side effect that your fonts return wrong characters..
this worked for me:
bad:
Code:
/*
* (non-Javadoc)
* @see com.badlogic.gdx.InputProcessor#keyDown(int)
*/
@Override
public boolean keyDown(final int key) {
addEvent(new InputEvent() {
@Override
public void invoke() {
for (int i=0;i<keyListeners.size();i++) {
KeyListener listener = (KeyListener) keyListeners.get(i);
if (listener.isAcceptingInput()) {
listener.keyPressed(key, (char) key);
}
}
}
});
return true;
}
/*
* (non-Javadoc)
* @see com.badlogic.gdx.InputProcessor#keyTyped(char)
*/
@Override
public boolean keyTyped(char c) {
return false;
}
good:
Code:
/*
* (non-Javadoc)
* @see com.badlogic.gdx.InputProcessor#keyDown(int)
*/
@Override
public boolean keyDown(final int key) {
return false;
}
/*
* (non-Javadoc)
* @see com.badlogic.gdx.InputProcessor#keyTyped(char)
*/
@Override
public boolean keyTyped(final char c) {
addEvent(new InputEvent() {
@Override
public void invoke() {
for (int i=0;i<keyListeners.size();i++) {
KeyListener listener = (KeyListener) keyListeners.get(i);
if (listener.isAcceptingInput()) {
listener.keyPressed(c, c);
}
}
}
});
return false;
}