Code:
textInput.addCallback(new EditField.Callback() {
public void callback(int key) {
System.out.println("Received key: " +key);
if (key == Event.KEY_GRAVE || key == Event.KEY_F12) {
textInput.setText("BLAH");
updateText("test");
return;
}
}
});
If I hit 'grave' or any alpha character I get "Received key: 0", but F12 and other F keys return values > 0
The docs say : "key - One of KEY_NONE, KEY_ESCAPE, KEY_RETURN, KEY_DELETE". I'm not sure if I understand this, why not just pass in the real key instead of KEY_NONE? Why dot he F_XX keys work?
Is there any way to get that info without having to parse the input field?