I have to implement a simple custom soft-keyboard in my application and I want to show accented characters on the keyboard too.
These are: í, é, á, ű, ú, ő, ó, ü, ö<
A somewhat shorter solution is just to remove the codes because the label text gets sent in that case.
codes
See also How to make an Android custom keyboard.