On my azerty keyboard, uppercase accented letters are available by
pressing the lowercase accented letter with caps lock on.  But while
eg, é returns ``eacute'', caps lock é returns the key 0xc9 (Eacute) and
the keysym 0xffffffc9.  As LyX uses the keysym, the É is not recognized.

The hack used in this patch is to `bump up' keysyms in the range
[-128..0), but I guess this is unacceptable.

Stid

-- 
        Yves Bastide    | Limos
                        | +33 (0)4 73 40 77 73
--- ChangeLog   2000/10/31 23:28:49     1.651
+++ ChangeLog   2000/11/01 14:18:42
@@ -0,0 +1,5 @@
+2000-11-01  Yves Bastide  <[EMAIL PROTECTED]>
+
+       * src/WorkArea.C (work_area_handler): hack to get keys such as
+       Eacute working.
+
Index: src/WorkArea.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/WorkArea.C,v
retrieving revision 1.31
diff -u -u -r1.31 WorkArea.C
--- src/WorkArea.C      2000/10/31 13:53:26     1.31
+++ src/WorkArea.C      2000/11/01 14:29:05
@@ -343,6 +343,10 @@
 #else
                XLookupString(xke, dummy, 1, &keysym, 0);
 #endif
+               // So that, e.g. Eacute is recognized (<[EMAIL PROTECTED]>)
+               if (signed(keysym) < 0 && signed(keysym) >= -128)
+                       keysym += 256;
+
                if (lyxerr.debugging(Debug::KEY)) {
                        char const * tmp = XKeysymToString(key);
                        char const * tmp2 = XKeysymToString(keysym);

Reply via email to