The canonical way of doing keyboard remapping under X is by xmodmap. I did try this method for polish ISO8859-2 characters, and had many problems. Here is my usenet thread about it:
input of iso8859-2 characters.
I don't remember it too well, but to add to it I remember that the KDE2 own method did not work, and the only way to go with KDE2 was with the xmodmap.
Maybe I should move to Qt since my application is small yet. But there is a problem with documentation on Qt :(
Actually I wish I could do it on Qt since I am just a fan of KDE and related, but I can not larn perl Qt module using C Qt documentation :(