GNOME Bugzilla – Bug 684855
should handle xkb layout variants and xkb options specified by ibus engines
Last modified: 2012-10-05 11:57:12 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.
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/
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
1)Choose Hindi Inscript input source 2)Open gedit 3)press <ALT_R> + 4 that should give you ₹
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.
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.
Created attachment 225261 [details] [review] keyboard: Add tests for previous commit
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.
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.
Created attachment 225587 [details] [review] keyboard: Add tests for previous commit
Review of attachment 225587 [details] [review]: Looks good to me
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.
should we get this in ?
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