Bug 211266

Summary: Arabic input assumes US kbd layout
Product: [Fedora] Fedora Reporter: Carl-Johan Kjellander <carljohan>
Component: scim-m17nAssignee: Jens Petersen <petersen>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: eng-i18n-bugs
Target Milestone: ---Keywords: i18n, MoveUpstream, Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: scim-m17n-0.2.1-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-03 03:44:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 228947    
Attachments:
Description Flags
scim arabic input
none
the svlatin1 and arabic keysequences none

Description Carl-Johan Kjellander 2006-10-18 09:36:39 UTC
Description of problem:
When installing FC6test4 with a sv_latin1 keyboard, arabic input
doesn't work after install for (at least) 4 keys that are needed for arabic,
but also used in Swedish.

Version-Release number of selected component (if applicable):
scim-1.4.4-35.fc6

How reproducible:
All the time.

Steps to Reproduce:
1. Install FC6test4
2. Select sv_latin1 as keyboard during installation
3. Open any program that takes input, like gedit.
4. Select the input method 'Arabic (Egypt)'
5. Try the two keys right of 'P', and right of 'L'

  
Actual results:
It inputs 'å~öä', which are the Swedish letters for those keys.

Expected results:
It should input the arabic letters for 'k' and some others.

Additional info:
The rest of the qwerty-keys seem to work.

Comment 1 Jens Petersen 2006-10-18 23:48:03 UTC
Yes, this is a limitation of current scim and m17n.
The problem is as you indirectly imply that the m17n map basically
assumes a US keyboard layout.

Comment 2 Jens Petersen 2006-10-19 00:01:05 UTC
Carl-Johan, are you also using scim to input other languages?
If you're only using scim to input Arabic you might find it
either to switch between Swedish and Arabic xkbd layouts instead
as a workaround for now.

Comment 3 Jens Petersen 2006-10-19 00:11:14 UTC
Alternatively you can edit ar-kbd.mim from the m17n-db package
to suit your keyboard layout but of course this is not a portable/
maintainably solution.

Comment 4 Jens Petersen 2006-10-19 00:13:07 UTC
Mail sent to scim-devel and m17n-lib.

Comment 5 Carl-Johan Kjellander 2006-10-19 01:11:09 UTC
Why doesn't scim use the actual keycodes?!

That's what it should do. Who cares what the american's keyboard looks
like when you are typing arabic?

Anyway, for me it's not at problem. I'm only using Japanese, Georgian and
Arabic input methods for fun (in windows right now, cause it works, even
though I hate it). I have students from all over the world.

But making a fix for _real_ should probably be a priority. Portable,
and independent of what the american keyboard thinks is the best way 
to slow people down so the types of the typewriter don't stick together.
(note my irony...)

So to answer your question, yes, I use scim to try to input more than
swedish and arabic. I need japanese since I study it and georgian and
russian and greek would be nice.


Comment 6 Jens Petersen 2006-10-19 01:31:48 UTC
> Why doesn't scim use the actual keycodes?!

I guess the problem is not so easy to solve.
What do you want keys not mapped by the input map to map to for example?
It can get pretty confusing I guess: right now I have a US keyboard connected
to my JP laptop and it is no fun I can reassure you...

Also it is much harder to write maps for keycodes than keysymbols,
but there should be some cleverer solution so I have asked upstream
on this for ideas.

Comment 7 Jens Petersen 2006-10-24 03:50:53 UTC
Adding patch from upstream in scim-m17n-0.2.1-1.fc7.

Comment 8 Jens Petersen 2006-10-27 06:12:24 UTC
Carl, are you able to test that?

Comment 9 Carl-Johan Kjellander 2006-10-28 11:19:36 UTC
I tested it a few days ago.

$ rpm -q scim-m17n
scim-m17n-0.2.1-1.fc7

I installed to rpm and logged out and in again. Setting it to arabic still
produces åäö instead of the correct arabic characters. And ^ is still a
dead key.

It should be enough to log out of X right?


Comment 10 Jens Petersen 2006-10-30 04:14:07 UTC
Sorry, could you try setting the scim keyboard type to Swedish too please?

Comment 11 Carl-Johan Kjellander 2006-10-30 19:57:19 UTC
With Swedish, åäö works fine, but dead keys ^~'` and so forth are broken.
Impossible to input. And pressing 'e' produces a line that follows the last e
which is very confusing.

And I just realized there is something wrong with the sv-latin keymap.
I can't produce the '¨' even when scim is off, by pressing CTRL-SPACE.
Here is xev output:

KeyPress event, serial 28, synthetic NO, window 0x4c00001,
    root 0x4d, subw 0x0, time 2596938031, (150,144), root:(1563,698),
    state 0x10, keycode 35 (keysym 0xfe57, dead_diaeresis), same_screen YES,
    XLookupString gives 2 bytes: (c2 a8) "¨"
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

KeyRelease event, serial 31, synthetic NO, window 0x4c00001,
    root 0x4d, subw 0x0, time 2596938171, (150,144), root:(1563,698),
    state 0x10, keycode 35 (keysym 0xfe57, dead_diaeresis), same_screen YES,
    XLookupString gives 2 bytes: (c2 a8) "¨"
    XFilterEvent returns: False

KeyPress event, serial 31, synthetic NO, window 0x4c00001,
    root 0x4d, subw 0x0, time 2596939617, (150,144), root:(1563,698),
    state 0x10, keycode 65 (keysym 0x20, space), same_screen YES,
    XLookupString gives 1 bytes: (20) " "
    XmbLookupString gives 1 bytes: (20) " "
    XFilterEvent returns: True

KeyPress event, serial 31, synthetic NO, window 0x4c00001,
    root 0x4d, subw 0x0, time 2596939617, (150,144), root:(1563,698),
    state 0x10, keycode 0 (keysym 0x22, quotedbl), same_screen YES,
    XKeysymToKeycode returns keycode: 11
    XLookupString gives 0 bytes: 
    XmbLookupString gives 1 bytes: (22) """
    XFilterEvent returns: False

Pressing it and space produces a '"' instead.


Comment 12 Jens Petersen 2006-10-31 08:32:58 UTC
BTW how to set the Swedish kbd with setxkbmap?  (Last time I did it with
the gnome panel applet I think.)

Comment 13 Carl-Johan Kjellander 2006-10-31 09:56:20 UTC
System/Preferences/Keyboard/Layout

system-config-keyboard does it as well.


Comment 14 Jens Petersen 2006-11-01 01:54:44 UTC
Thanks for testing.  I tried too and agree it doesn't fix the problem.

Comment 15 Jens Petersen 2006-11-20 01:16:04 UTC
I retested this today after some discussion on scim-devel and now it is
working for me: perhaps rebooting helped.

Comment 16 Jens Petersen 2006-11-20 01:16:53 UTC
Just for reference: one can switch to Swedish layout with "setxkbmap se".

Comment 17 Ramakrishna Reddy Yekulla 2007-01-16 19:38:57 UTC
Created attachment 145721 [details]
scim arabic input

Arabic input works fine, as shown in the attached figure. attached are both the
sequences for arabic, scim-arabic and arabic -kdb

Comment 18 Carl-Johan Kjellander 2007-01-17 03:14:32 UTC
Ramakrishna: Were those pictures taken with "setxkbmap se" or not? I want to
see some "åäö" being input at the same time as the three arabic letters that
I can't produce.

Try to enter 'Mötley Crüe' for instance.


Comment 20 Ramakrishna Reddy Yekulla 2007-01-17 06:07:16 UTC
Created attachment 145775 [details]
the svlatin1 and arabic keysequences

Steps to reproduce
1. Alt F2 or gnome-terminal
2. system-config-keyboard
3. Select the Sweden Northan Saami
4. Add the Arabic Qwerty and azerty keyboard from layout options 
4. Toggle between US <->SWE <-> Arabic The sequences are shown in the attached
screenshot
The keymaps work fine. This bug can be resolved

Comment 21 Carl-Johan Kjellander 2007-02-15 15:19:41 UTC
I beg to differ.

Yes, by adding arabic as a keyboard layout you can work around the
bug, but it doesn't solve the underlying problem, that scim assumes
everyone lives in the US and has ;'[ instead of öäå on some keys.

And using scim was supposed be a fix all system to solve all keyboard
problems.

Having as it is now two ways of selecting the keyboard is very confusing.

And still, if you have Swedish selected, scim is fundamentaly broken,
and you have to use both the keyboard switcher applet and scims toolbar.


Comment 22 Jens Petersen 2007-02-16 02:22:43 UTC
Carl-Johan, I retested the fix now, and I find that is works with
the scim immodule, but not with scim-bridge.  I agree that this is
important issue and want to backport the fixes to FC6 when ready.
And thanks for reporting it. :-)

I cloned a bug for scim-bridge.

Comment 23 Jens Petersen 2007-03-08 05:50:40 UTC
Update for scim-bridge has been pushed for FC6.

I built scim-m17n-0.2.1-1.fc6 for FC6 updates.

Comment 24 Fedora Update System 2007-03-12 19:15:47 UTC
scim-m17n-0.2.1-1.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.