After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684855 - should handle xkb layout variants and xkb options specified by ibus engines
should handle xkb layout variants and xkb options specified by ibus engines
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: keyboard
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
3.6.1
Depends on:
Blocks:
 
 
Reported: 2012-09-26 09:42 UTC by Parag AN
Modified: 2012-10-05 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keyboard: Apply variants and XKB options from IBus engine descriptions (7.45 KB, patch)
2012-09-27 14:09 UTC, Rui Matos
reviewed Details | Review
keyboard: Add tests for previous commit (6.87 KB, patch)
2012-09-27 14:09 UTC, Rui Matos
none Details | Review
keyboard: Apply variants and XKB options from IBus engine descriptions (7.97 KB, patch)
2012-10-02 13:34 UTC, Rui Matos
committed Details | Review
keyboard: Add tests for previous commit (6.76 KB, patch)
2012-10-02 13:34 UTC, Rui Matos
committed Details | Review

Description Parag AN 2012-09-26 09:42:42 UTC
I would like to request for enabling alt-gr default for Indic ibus engines. I am not sure what more inputs I can give here. So, please ask me and I will provide the needed input here.
Comment 1 Daiki Ueno 2012-09-26 10:09:16 UTC
After talked with Parag, I got that he meant the previous IBus behavior that maps Alt_R to AltGr when certain engine is enabled.

That was actually implemented as a couple of Fedora local patches to IBus and ibus-m17n.  The mechanism is:

- some engine in ibus-m17n specifies that it needs Alt_R -> AltGr mapping in their XML description, like "<layout>default[lv3:ralt_switch]</layout>"
  
- ibus-ui-gtk (a GTK frontend of IBus) picks the configuration and set the XKB option

The rationale of this approach was that, according to the IBus upstream, engines should not directly use X or other UI stuff and the panel should do all the UI work[1].

So, I think it would be nice to have similar mechanism in GNOME, if the feature is worth being supported.

1. https://codereview.appspot.com/4235064/
Comment 2 Rui Matos 2012-09-26 12:19:39 UTC
Can we step back a bit and someone provide me with a reproducible set of steps of what happens what should happen?

Like:

1. Choose input source "foo"
2. Try to type symbol "bar" which should be done with key presses A and B
3. Result and what should be the result

Thanks
Comment 3 Parag AN 2012-09-26 12:47:30 UTC
1)Choose Hindi Inscript input source
2)Open gedit
3)press <ALT_R> + 4 that should give you ₹
Comment 4 Rui Matos 2012-09-27 14:07:52 UTC
Ok, so the problem is that we are not handling the variants and xkb options that ibus engines descriptions' layout field might also contain. Patch coming for that.

Note that ibus-m17n upstream doesn't include this particular xkb option for the engines that need it. That must also be fixed for the original reporter's problem to be completely fixed.
Comment 5 Rui Matos 2012-09-27 14:09:03 UTC
Created attachment 225260 [details] [review]
keyboard: Apply variants and XKB options from IBus engine descriptions

The 'layout' in an IBus engine description might actually also include
a variant and XKB options.
Comment 6 Rui Matos 2012-09-27 14:09:10 UTC
Created attachment 225261 [details] [review]
keyboard: Add tests for previous commit
Comment 7 Matthias Clasen 2012-09-29 21:13:32 UTC
Review of attachment 225260 [details] [review]:

Is the format of the strings we're parsing here documented somewhere ? If so, a comment and a link to the docs might be nice to include.

The code looks fine to me.
Comment 8 Rui Matos 2012-10-02 13:34:09 UTC
Created attachment 225586 [details] [review]
keyboard: Apply variants and XKB options from IBus engine descriptions

--

* Added a comment with a sample string of what we're parsing which,
after talking with Takao, turned out to be slightly different from
what I had understood.
Comment 9 Rui Matos 2012-10-02 13:34:18 UTC
Created attachment 225587 [details] [review]
keyboard: Add tests for previous commit
Comment 10 Matthias Clasen 2012-10-02 15:34:38 UTC
Review of attachment 225587 [details] [review]:

Looks good to me
Comment 11 Matthias Clasen 2012-10-02 15:36:14 UTC
Review of attachment 225586 [details] [review]:

Looks good, otherwise

::: plugins/keyboard/gsd-keyboard-manager.c
@@ +422,3 @@
         set_ibus_engine (manager, ibus_engine_desc_get_name (engine));
 }
+

Should add a comment that points to the ibus bug where this is getting upstreamed.
Comment 12 Matthias Clasen 2012-10-02 16:07:41 UTC
Review of attachment 225586 [details] [review]:

Looks good, otherwise

::: plugins/keyboard/gsd-keyboard-manager.c
@@ +422,3 @@
         set_ibus_engine (manager, ibus_engine_desc_get_name (engine));
 }
+

Should add a comment that points to the ibus bug where this is getting upstreamed.
Comment 13 Matthias Clasen 2012-10-05 09:59:43 UTC
should we get this in ?
Comment 14 Bastien Nocera 2012-10-05 11:57:06 UTC
Attachment 225586 [details] pushed as 83ece09 - keyboard: Apply variants and XKB options from IBus engine descriptions
Attachment 225587 [details] pushed as 533f9c2 - keyboard: Add tests for previous commit