Jose Abilio Oliveira Matos <[EMAIL PROTECTED]> writes:

| > I see that I have some more fixing to do...
| 
|   I would say that you are on the rigth track. Thanks.

Please try this (untested) patch.

        Lgb

RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.171
diff -u -p -r1.171 lyxfunc.C
--- lyxfunc.C   2000/12/18 14:21:57     1.171
+++ lyxfunc.C   2000/12/18 22:04:19
@@ -273,10 +273,16 @@ int LyXFunc::processKeySym(KeySym keysym
        } else if (action == LFUN_SELFINSERT) {
                // We must set the argument to the char looked up by
                // XKeysymToString
-               char const * tmp = XKeysymToString(keysym);
-               // if (!argument.empty()) {
-               argument = tmp ? tmp : "";
-               // }
+               XKeyEvent xke;
+               xke.type = KeyEvent;
+               xke.state = state;
+               xke.keycode = XKeysymToKeycode(fl_get_display(), keysym);
+               char ret[10];
+               KeySym tmpkeysym;
+               int res = XLookupString(&xke, ret, 10, &tmpkeysym, 0);
+               Assert(keysym == tmpkeysym);
+               if (res > 0)
+                       argument = string(ret, res);
                lyxerr[Debug::KEY] << "SelfInsert arg["
                                   << argument << "]" << endl;

Reply via email to