Roman Maurer <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes wrote:
| > 
| > I am not excatly willing to take patches that solve this problem by
| > special casing latin2.
| > 
| > and in any event we should to this for the other latinX xkeysyms as
| > well.
| 
| Point taken.  I'm attaching the patch for ISO Latin 2, 3 and 9 in
| LyX 1.1.6fix1 - they are the only Latin keysyms that I found in
| X11/keysymdef.h, but of course this list could be extended -
| and ISO Latin 1 was already supported before that.
| 
| > | I'm attaching a simple patch that enables support for Latin-2
| > | keysyms in LyX.  It should not break anything for any other
| > | keyboard as it just adds translation of ISO Latin-2 keysyms
| > | to ISO Latin-2 characters as I saw them defined in
| > | X11R6/include/X11/keysymdef.h.
| >
| > Of course this only works if you are using a latin2 font.
| 
| Do you really mean "latin 2 font" or perhaps "latin 2 encoding"?
| I'm afraid I don't understand the problem.  Are you refering
| to Unicode fonts and possible problems there?
| 
| IMHO the patch is OK and I hope that it will be accepted;
| getiso() should return ISO character code of the keysym (description
| in comment says so), which it does - now also for ISO Latin 2.
| -- 
|       Regards,
|         Roman--- src/kbsequence.C.orig        Sun Dec 17 07:09:34 2000
| +++ src/kbsequence.C  Thu May 10 00:04:44 2001
| @@ -261,6 +261,11 @@
|  char kb_sequence::getiso() const
|  {
|       int const c = getsym();
| +
| +     // Check if the keysym is in ISO Latin-2, -3 or -9.
| +     int byte3 = c / 0x100;
| +     if (byte3 == 0x01 || byte3 == 0x02 || byte3 == 0x13)
| +             return static_cast<char>(c % 0x100);
|       
|       if (c > 0xff)
|               return '\0';

I have put something similar to this into CVS, but note that by using
this you will not be able to mix latin1 and latin2 (++)

How ever... this is possible by binding to keys instead:

\bind "Zacute" "accent-acute Z"

This will make Zacute avaliable even if you are using a latin1 font.

-- 
        Lgb

Reply via email to