[Localization] Khmer keyboard composed keys with xim

Sayamindu Dasgupta sayamindu at gmail.com
Mon Jun 29 10:10:08 EDT 2009


2009/6/29 Philipp Kocher <philipp.kocher at gmx.net>:
> Hello
> Below is a short description of how to get the composed keys (one
> keystroke generates multiple characters) of the Khmer keyboard on the XO
> working with the xim (based on build 802).
> Please give feedback (e.g. what are the known problems with this
> configuration) or help testing (e.g. the Write Activity behaves sometimes
> strangely with the default font "DejaVu Serif", showing sometimes Khmer and
> sometimes just wired characters ...).
> 1. Install rpm "khmeros-fonts-base" (available in Fedora repos)
> 2. Copy the attached file "kh" to /usr/share/X11/xkb/symbols/
> 3. Copy the attached file "keyboard" to /etc/sysconfig/
> 4. Replace in the script /usr/bin/olpc-session the line "export
> GTK_IM_MODULE" with "export GTK_IM_MODULE="xim""
> 5. Append the content of the attached file Compose to
> /usr/share/X11/locale/en_US.UTF-8/Compose
> 6. Add the aliases "km_KH.utf8  km_KH.UTF-8" and "km_KH.utf8:
> km_KH.UTF-8" to the file /usr/share/X11/locale/locale.alias
> 7. Add the references "en_US.UTF-8/XLC_LOCALE  km_KH.UTF-8" and
> "en_US.UTF-8/XLC_LOCALE:  km_KH.UTF-8" to the file
> /usr/share/X11/locale/locale.dir
> 8. Add the references "en_US.UTF-8/Compose  km_KH.UTF-8" and
> "en_US.UTF-8/Compose:  km_KH.UTF-8" to the file
> /usr/share/X11/locale/compose.dir
> - In point 6., 7. and 8. the difference between the two strings is just
> a colon.

Yes - the strings with colons in them are actually autogenerated by
the build process, so if the changes are made at the source level,
they need not go in.

> - The when changing the language, the Sugar Control Panel writes
> "LANG="km_KH.utf8"" in the file ~/.i18n and not km_KH.UTF-8 as expected. The
> switch for the "xim" input method in /usr/bin/olpc-session for am_ET and
> ne_NP probably doesn't work?

ne_NP and am_ET works because laptops shipped to those regions have
/home/olpc/.i18n pre-set to ne_NP.UTF-8 and am_ET.UTF-8

> - I didn't create a new Compose file for km_KH because this means that
> the composed keys just work if the language is set to Khmer. I think it
> is better when the composed keys work independent of the language
> configured in sugar. Other languages use the Compose file in en_US.UTF-8 as
> well.
> The composed keys with an US keyboard are:
> <shift><g>
> <shift><j>
> <shift><v>
> <shift><[>
> <shift><s>

Sounds fine to me. The problem you described with Write is a known one
in the 8.2.x builds - the only workaround at the moment is to manually
select the font for the language you are using.


Sayamindu Dasgupta

More information about the Localization mailing list