Sorry, but I need to answer this question with another, as IMHO the problem is not well defined:
KEYCODES identify keys at a keyboard, so they have identities for keys like ENTER or PAGE UP, F1, HOME or the like. Not all keys map easily to unicode symbols, e.g. there's a 5 key in the numeric pad in the side of the keyborar, but there's also a 5 key in the main keyboard, both have different KEY_IDs, so you have to think how these actually map into unicode? Both these keys (5 in main keyboard and 5 in side keypad) have different meanings if pressed with modifier keys pressed (Ctrl, Alt, Shift, Meta, ...), so, which one are you talking about and how can Unicode help you to assign some codepoint to it?