We could use a map that contains the "structure" of the message; I mean that it could be contains letters, but also references to the icons.
The trouble is the repositioning of the cursor: the Touch event of the panel could be used, but I do not think that will be raised while the keyboard is on screen, then you should also create a custom keyboard.
Too complicated, but I don't have another idea!
If this can console you, here I can add this emoticon