Diego Nieto Cid, le Sat 02 Apr 2011 20:11:26 -0300, a écrit : > From kstoucs.c, the required function by our implementation is KeySymToUcs4. > Unfortunately, it is private. > > The apropiate public API seems to be XwcLookupString. But it needs a display.
It's not really a display which is needed, but keycodes, which you don't really want to have. There indeed doesn't seem to be any "right" interface for it. Issues with copy/pasting imKStoUCS.c is copyright assignment and having to update it. In that precise case, however, there's another way: reimplement by parsing /usr/include/X11/keysymdef.h. The format used by Xorg is strictly #define XK_foobar 0x1234 /* U+UVWX blabla */ so you can parse this, and regenerate a keysymtoucs() which looks like xorg's. Samuel