I want to get the char value of the KeyCode Event when pressing an Android keyboard.
public void KeyCodeEventAsChar(int keyCode, KeyEvent event) {
char pressedKey;
// TODO: convert key Code Event into char
syslog.d ("TEST", "The pressed key in Android keyboard was char: " + pressedKey);
}
Does anyone has a clue how to do this?!
UPDATE:
I don't want hardcoded text! I want to convert it to correspondent char!
UPDATE 2:
I need also to dead chars such as: à, á, ò, ó, etc...
ANSWER FOUND:
// TODO: convert key Code Event into char
char pressedKey = (char) event.getUnicodeChar();
IMPORTANT NOTE: char has only 1 byte length, so it will not support several chars