Thanks for the answer :) So, when I press the 'é' key (an 'e' with an accent), XLookupString() returns 'é', and then the conversion returned NULL. My charset is detected as "ANSI_X3.4-1968".
I looked at how Gtk does this, because I can type accented chars in Gtk's entries, and it seems Gtk does not use XLookupString() at all to get the UTF-8 string of the pressed key. It gets the "keyval" (?) from the params of the X event with gdk_keymap_translate_keyboard_state() and then convert this keyval to UTF-8 with gdk_keyval_to_unicode() and g_unichar_to_utf8(). All those functions are called by translate_key_event() in gdkevents-x11.c. Btw, my charset is also detected as "ANSI_X3.4-1968" by Gdk/Gtk. I probably could fix that problem by changing my locales, but since it works with GTK and QT, I think we should make it work in Ecore_X too. Regards, Simon TRENY <MoOm> On Mon, 10 Jul 2006 08:03:57 +0900, Carsten Haitzler (The Rasterman) <[EMAIL PROTECTED]> wrote : > On Sun, 9 Jul 2006 18:11:55 +0200 Simon TRENY <[EMAIL PROTECTED]> > babbled: > > > Sorry, there was an error in my test code, ->key is not set to NULL. > > But ->string and ->compose are still NULL, so the problem is still > > here. > > compose will always be null as nothing fills it in yet (its intended > for future use with input systems like asian languages use). I can't > say much about the accented chars as i've never had a keyboard with > them nor have i ever tried to get them to work - but the string is a > utf8 translation of whatever string x say was just typed (as opposed > to key symbol/name). x will provide the string in some native locale > and then ecore_x will translate to utf8. see ecore_x_events.c - > around line 199 - that uses XLookupString() to find the "typed > string" from the key event. then a convert from the current locale to > utf8 and report that as key_compose in ecore_x's event - then > ecore_evas will pass in the keyname, keysymbol and key_compose > (key_compose becomes string). in ecore_evas_x.c around line 468. > either x is providing no string or the utf8 conversion is failing > (maybe its not encoded properly as expected or something). but that > code hasnt changed recently :) > > > Simon > > > > On Sun, 9 Jul 2006 18:05:38 +0200, > > Simon TRENY <[EMAIL PROTECTED]> wrote : > > > > > Hi, > > > > > > I'm using the "string" param of the key_down events of Evas > > > (i.e. event->string) to get the UTF-8 string to insert in the > > > entries of Etk when a key is pressed. > > > But it seems the params of the key_down events are no longer set > > > when an accented key ('é' for example) is pressed: event->key, > > > event->string and event->compose are all set to NULL. I can be > > > reproduce the problem in e17: I can't type accented chars in the > > > entries of e17 although I could do it before. > > > If I remember correctly, raster told me that ->string or ->compose > > > depended on the config of xorg, so maybe it's because my xorg > > > config is incorrect, but here, even ->key is set to NULL. > > > > > > Regards, > > > Simon TRENY <MoOm> > > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > > > security? Get stuff done quickly with pre-integrated technology to > > > make your job easier Download IBM WebSphere Application Server > > > v.1.0.1 based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > _______________________________________________ > > > enlightenment-devel mailing list > > > enlightenment-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > > security? Get stuff done quickly with pre-integrated technology to > > make your job easier Download IBM WebSphere Application Server > > v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ enlightenment-devel > > mailing list enlightenment-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel