[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fixing the Arabic keyboard in xorg/xfree86



Salaam,
Previously, I mentioned a bug regarding the incorrect display of parenthesis 
in an Arabic context and thought it's a qt bug. After I heard that Lars of qt 
says it's only available in X, I did a small change to xkb to conform to 
Unicode BidiMirroring and it turned out that this would fix the problem. It 
also turned out that this is not a dirty hack since what "parenleft" means in 
xorg context, is "opening parenthesis". And an opening parenthesis in a
right-to-left context is clearly Shift+0, not Shift+9. You can also make sure 
it's not a hack by  transfering files between KDE and other environments 
(Java, Win32, Mac) and you would notice that the parantheses direction is 
correct.

I also check the Hebrew keyboard and found it has the same bug but to my 
surprise when I checked the farsi/iranian keymap it has already implemented 
this fix.

The changes are simply

    key <AE09> {  [               9,      parenright      ]     }; // Mirrored
    key <AE10> {  [               0,       parenleft      ]     }; // Mirrored

    key <AD11> {  [     Arabic_jeem,       braceright     ]     }; // Mirrored
    key <AD12> {  [      Arabic_dal,       braceleft      ]     }; // Mirrored

    key <AC03> {  [      Arabic_yeh,       bracketright   ]     }; // Mirrored
    key <AC04> {  [      Arabic_beh,       bracketleft    ]     }; // Mirrored

I was about to submit a bug/patch to xorg but thought it's better to fix other 
issues so we submit one bug.
The other issues is related to the layout. The layout defined is not the most 
public layout.


//I doubt this common
    key <BKSL> {  [            less,         greater      ]     };

//To map an English character on an Arabic keyboard is odd
    key <AC02> {  [     Arabic_seen,               S      ]     };

There is also one parenthesis in xkb_symbols "azerty_digits" which was not 
closed!!

There are some other issues that need to be addressed like difining a third 
state be added to Group2? Also what about adding ZWNJ and ZWJ to the layout?

Any one interested in discussing these issues?

-- 
Munzir Taha  PGP Key available
gpg --recv-keys --keyserver www.mandrakesecure.net F0671821

Telecommunications and Electronics Engineer
Linux Registered User #279362 at http://counter.li.org
Mandrake Club member
Maintainer of the Open Arabic Bugs Project at
http://wiki.arabeyes.org/OpenBugs
CIW Designer, ICDL, MOUS
New Horizons CLC
Riyadh, SA