Bug 509518 - ibus-anthy should only override to jp layout for kana input
Summary: ibus-anthy should only override to jp layout for kana input
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Peng Huang
QA Contact: Fedora Extras Quality Assurance
Keywords: Regression
Depends On:
Blocks: F12Blocker, F12FinalBlocker
TreeView+ depends on / blocked
Reported: 2009-07-03 08:52 UTC by Jens Petersen
Modified: 2009-09-16 05:36 UTC (History)
5 users (show)

Clone Of:
Last Closed: 2009-09-15 06:18:59 UTC

Attachments (Terms of Use)
Patch for ibus/bus/Makefile.am, ibus/bus/engineproxy.c, ibus/bus/main.c, ibus/configure.ac, ibus.spec (3.74 KB, patch)
2009-08-18 04:13 UTC, fujiwara
no flags Details | Diff
Patch for ibus.schemas.in (581 bytes, patch)
2009-09-09 07:04 UTC, fujiwara
no flags Details | Diff

Description Jens Petersen 2009-07-03 08:52:52 UTC
Description of problem:
anthy should not override kbd layout to jp (by default at least)
since it is not necessary.

I think we only need kbd layout override for Chewing, some m17n maps
and a few others maybe, not anthy currently anyway.

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1. use anthy with US kbd
2. Alt-` and press Shift-2
Actual results:
2. "

Expected results:
2. @

Comment 1 Akira TAGOH 2009-07-03 09:00:28 UTC
Is it? isn't it necessary for kana input so far? it won't be needed after we move to the layout switch on xkb or xinput perhaps.

Comment 2 Jens Petersen 2009-07-06 00:03:40 UTC
(In reply to comment #0)
> I think we only need kbd layout override for Chewing, some m17n maps
> and a few others maybe, not anthy currently anyway.

Tagoh-san is right - it is needed for Kana input mode on non-US kbds,
but that's a corner case - so we should still default to system
layout for Anthy until we can fine-grain control to individual
IME modes.

Comment 3 fujiwara 2009-08-12 06:19:57 UTC
I cannot reproduce your problem.

I can type multi-byte @ with Shift + 2
Did you have the US layout?

# cat /etc/sysconfig/keyboard 

Comment 4 fujiwara 2009-08-13 08:16:27 UTC
Hmm.., after I upgrade ibus 1.1 to 1.2, I could reproduce this bug.
So I think this is an ibus bug instead of ibus-anthy one.

I found another problem.
When I change keycode, ibus still sends the original keyval.

E.g. I change Menu to Henkan.
% xmodmap -e "keycode 135 = Henkan".
1. Type Ctrl + Space.
2. Type Menu key.

Then 'ibus/engine.py:' EngineProxy::ProcessKeyEvent() receives keyval = 0xff67.

I expected to receive 0xff23.

This is also reproduced in 1.2 but not 1.1.

Comment 5 fujiwara 2009-08-13 09:11:52 UTC
After I run ibus-setup and enable [Use system keyboard layout setting] in [Advanced] tag, I won't reproduce this bug.

Personally I feel the default enable setting might be preferred.
Transferring the decision.

Comment 6 Jens Petersen 2009-08-13 10:07:47 UTC
So you mean you feel it is notabug?

Comment 7 fujiwara 2009-08-14 08:56:20 UTC
> So you mean you feel it is notabug?

I guess it depends on whether we enable the default value or disable it.

ibus/data/ibus.schemas.in includes the following gconf value.


Do you prefer the disabled value by default?
Does it effect when the check box button [Use system keyboard layout setting] is enabled and European people change the keyboard layout with gnome-keyboard-applet?

Comment 8 fujiwara 2009-08-18 04:13:58 UTC
Created attachment 357732 [details]
Patch for ibus/bus/Makefile.am, ibus/bus/engineproxy.c, ibus/bus/main.c, ibus/configure.ac, ibus.spec

Created the tentative patch to fix this problem.

/usr/share/ibus/component/anthy.xml has the hardcoded layout "jp".
Then if system layout is not used, "jp" is used.

I think XKB could resolve this bug.
Since gnome-keyboard-applet uses libxklavier, my suggestion is to implement libxklavier and override the hardcoded "jp".
I think it would works with GDM.

Comment 9 Peng Huang 2009-08-18 06:15:28 UTC
I think this patch will effect all engines, and it will also make ibus-daemon depend on X library. I think we should avoid using X libraries in the ibus-daemon.

Comment 10 fujiwara 2009-08-19 02:00:49 UTC
Talking off line, it seems some engines require "us" layout against the physical keyboard.
Transferring to ibus. Currently the maintainer works to be able to customize the engine layout:

Probably I think it's better to enable system layout or disable one by default per engine.

I thought the system layout would meant /etc/sysconfig/keyboard but actually it indicates XKB layout likes user layout so it might be better to change the UI string likes "Use the current keyboard layout setting".

Comment 11 fujiwara 2009-09-09 07:04:52 UTC
Created attachment 360169 [details]
Patch for ibus.schemas.in

This is a workaround to change the schemas value for ja locale only if you require en layout for other engines.

If you change the default value "false" to a module specific value, it can be extracted into .po file.

Comment 12 Peng Huang 2009-09-09 07:21:29 UTC
I think it is better to use System keyboard layout setting by default. It has been fixed in upstream. I will build it for rawhide soon.

Comment 13 Peng Huang 2009-09-15 06:18:59 UTC
Fixed in ibus-1_2_0_20090915-1_fc12

Comment 14 Jens Petersen 2009-09-16 05:36:08 UTC
Thanks - looks good now. :)

Note You need to log in before you can comment on or make changes to this bug.