Bug 143348

Summary: Khmer keyboard layout
Product: [openSUSE] SUSE Linux 10.1 Reporter: Karl Eichwalder <ke>
Component: X.OrgAssignee: Egbert Eich <eich>
Status: RESOLVED FIXED QA Contact: Karl Eichwalder <ke>
Severity: Normal    
Priority: P2 - High CC: eich, jens.herden, jsuchome, ms, sndirsch
Version: Alpha 4   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Localization Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: p_khmer-compose.diff
p_khmer-locale.diff

Description Karl Eichwalder 2006-01-16 12:33:59 UTC
Leang Chumsoben wrote:
the current version of SuSE doesn't have the Khmer keyboard layout, so what's 
the status of the next release. And can we have the keyboard layout in the 
installation process so we can use both English and Khmer keyboard to type 
during the installation? Jens is the one who know about the detail of Khmer 
keyboard layout, so let's me introduce him.


Mike answered:
Yes, I think there is no khmer keyboard layout in xkb yet.

There is a Khmer input method in scim though, this could be an
alternative to input Khmer. But not during the installation.

It seems to be an input method designed to input Khmer
using an ASCII transcription.
Comment 1 Stefan Dirsch 2006-01-16 13:00:54 UTC
I'll add the xkb khmer keyboard layout. It's new in CVS.
Comment 2 Jens Herden 2006-01-16 13:43:34 UTC
Yes the keyboard layout is new in CVS. But there is a small problem left, because it is not enough to just add the layout. There need to be some lines in the Compose files in order to type some special Khmer character which are composed of two characters. 

Please see also: https://bugs.freedesktop.org/show_bug.cgi?id=5389

AFAIK this is not in CVS yet, mainly because I could not find the correct place for the bug report yet. 

There is also the issue that Gnome has hardcoded the compose information and does not use the Compose files at all. I hope that I will find time to take care about this in the near future. 

Please also have in mind when you add the Khmer layout that this can not replace the English layout. Almost all keyboards in Cambodia have English layout but there are almost no Latin keys in the Khmer layout. So what is needed for the installation is a mixed keyboard with English and Khmer in two groups together with group switching via alt+shift. 

In KDE and Gnome it is possible to use the keyboard configuration tools to set up the mixed keyboard but I have never seen a possibility during installation. 
Comment 3 Stefan Dirsch 2006-01-16 13:55:57 UTC
The compose files are not in xkeyboard-config project, but in X.Org project. The correct place to file a bugreport is also bugs.freedesktop.org, but product xorg instead of xkeyboard-config. The Compose file for UTF-8 locales
(our default) is /usr/X11R6/lib/X11/locale/en_US.UTF-8/Compose.
Comment 4 Stefan Dirsch 2006-01-16 14:05:20 UTC
I've added now xkb khmer keyboad support for Beta1. Please provide the required changes (patch) for the Compose file. Thanks.
Comment 5 Jens Herden 2006-01-17 01:13:35 UTC
You are very quick :-)
I do not know how to attach files here so I put the information there:

http://www.khmeros.info/download/Compose.addition

These lines needs to get added to _all_ locale with UTF-8 Compose files. Only for en_US.UTF-8 is not enough because we have in Cambodia people from other Asian countries who might use other locale. 
Comment 6 Stefan Dirsch 2006-01-17 07:50:56 UTC
We are using the same Compose file for all locales.

<U17ff> :       "ាំ"
<U17fe> :       "ោះ"
<U17fd> :       "េះ"
<U17fc> :       "ុំ"
<U17fb> :       "ុះ"

Are you sure adding this to Compose file can work? Did you try this? The syntax looks different from the one of other lines in Compose file.
Comment 7 Jens Herden 2006-01-17 08:11:21 UTC
> We are using the same Compose file for all locales.

Oh, this must be a change from Suse 10 to 10.1?
On my computer I have Compose files in pt_BR.UTF-8, ja_JP.UTF-8, ko_KR.UTF-8 and many other UTF-8 locale folder?


> <U17ff> :       "ាំ"
> <U17fe> :       "ោះ"
> <U17fd> :       "េះ"
> <U17fc> :       "ុំ"
> <U17fb> :       "ុះ"
> 
> Are you sure adding this to Compose file can work? Did you try this? 

Yes it works! We are using this since many months already. It works on Suse 9.3 and Suse 10, other Suse versions were not tested. It also works with Ubuntu and Fedora Core 4.

> The syntax looks different from the one of other lines in Compose file.

Yes, because the other entries use the file for the opposite purpose: combining keystrokes to one character. 
But we are using it for creating two characters from one keystroke. 

Comment 8 Stefan Dirsch 2006-01-17 18:05:51 UTC
Indeed. Adding the proposed lines to a Compose file works. I'll add them to our UTF-8 Compose files.
Comment 9 Stefan Dirsch 2006-01-17 18:06:49 UTC
Compose related changes done for Beta2.
Comment 10 Jiří Suchomel 2006-01-18 12:58:05 UTC
Uhm... was there any update of "kbd" also? If not, I probably cannot add new keyaborad layout to YaST.
Comment 11 Stefan Dirsch 2006-01-18 13:37:22 UTC
No, I don't think there is any khmer keyboard layout available for the Linux console.
Comment 12 Mike Fabian 2006-01-18 14:59:05 UTC
jsuchome> Uhm... was there any update of "kbd" also?

No, on the console only bitmap fonts are possible currently and we
were told that there are no suitable bitmap fonts for Khmer, therefore
there is currently no chance for Khmer to work on the console.

Comment 13 Jens Herden 2006-01-19 00:49:29 UTC
There are no Khmer bitmap fonts and AFAIK there will never be. Khmer is a kind of Indic language in the writing system. It depends heavily on reordering and stacking of characters hence complex script support in the render engine with open type tables. I do not see any possibility to do this with bitmap fonts. 

Because of this we never thought about a Khmer keyboard for the console. 

The Khmer X keyboard includes only a few of the Latin characters, it is not possible to type ascii with it. You always need to switch to an English keyboard for this. 

In case keyboard switching is possible in Yast and you see a need for a keyboard for the console I can try to create one.

I think the default keyboard for Cambodia for Yast in console mode should be English because almost all computer here have an English keyboard layout.
Comment 14 Jiří Suchomel 2006-01-19 07:21:42 UTC
> I think the default keyboard for Cambodia for Yast in console mode should be
> English because almost all computer here have an English keyboard layout.

That's fine for me.
Comment 15 Egbert Eich 2011-05-20 15:14:46 UTC
I would like to upstream those. For this I need a 'signed off by' the author. Please provide this.
All patches which cannot be upstreamed and are not crucial for the openSUSE or SLE environment will eventually get dropped.
Comment 16 Egbert Eich 2011-05-20 15:17:27 UTC
Please assign to me when done.
Comment 17 Jens Herden 2011-05-22 11:12:03 UTC
I am not sure how I can "sign off" this. What do I need to do?

I would be very happy if you could upstream this.
Comment 18 Stefan Dirsch 2011-05-23 09:45:51 UTC
BTW, X11 khmer keyboard layout is already upstreamed. :-)

I'm attaching the patches we currently use for libX11. We would need a signed-off for the patches by you.
Comment 19 Stefan Dirsch 2011-05-23 09:48:07 UTC
Created attachment 430797 [details]
p_khmer-compose.diff
Comment 20 Stefan Dirsch 2011-05-23 09:48:39 UTC
Created attachment 430798 [details]
p_khmer-locale.diff
Comment 21 Egbert Eich 2011-05-26 14:28:10 UTC
(In reply to comment #17)
> I am not sure how I can "sign off" this. What do I need to do?
> 
> I would be very happy if you could upstream this.

Ok, I just would like to know if the patches are from you or anyone you know who will allow to put them upstream.
Then I will add an:
Signed-off-by: Jens Herden <jens.herden@email.de>
to the commit message of the patch and we are good :)
Comment 22 Jens Herden 2011-05-31 18:02:31 UTC
I only created the 4 lines for the compose files. 
Stefan Dirsch made patches from them, see comment #8. 
I do not really understand the patches in detail and I have no time to look into this yet.
But OpenSuse is used a lot in Cambodia, so the patches are fine!

So go ahead and use my name to sign-off the patch.
Comment 23 Egbert Eich 2011-06-06 17:47:16 UTC
Ok, I'm going to name you as the author of the patch and take your comment as permission to push this upstream. 
Jens, Thanks a lot!