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 410728 - keyboard switching question (three selected layouts, but just two switch groups?)
keyboard switching question (three selected layouts, but just two switch grou...
Status: RESOLVED NOTGNOME
Product: gnome-applets
Classification: Other
Component: keyboard indicator (gswitchit)
2.10.x
Other All
: Low normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-22 09:34 UTC by Michael V. Antosha
Modified: 2012-03-16 10:36 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
KDE keyboard switcher (57.99 KB, image/png)
2012-03-16 10:32 UTC, Denys Rtveliashvili
Details

Description Michael V. Antosha 2007-02-22 09:34:24 UTC
I propose a possibility of having my three layouts (English, Russian, Ukrainian) selected in "Keyboard Preferences". But in such way that usual keyboard switching shortcuts (group shift, group lock) worked just between two of the layouts: between "English" and "most recently used of: Ukrainian and Russian".

It also should be a way to assign a shortcut for explicitly chosing Ukrainian layout (one shortcut), or Russian (another shortcut).

Please, don't blame me if the features (I ask for) already exist. I'm not familiar with X Window and GNOME internals. I'm a unix servers administrator for several years, but I'm mostly a CLI guy and know not a lot of details about GUI, though I use it every day having a linux (Fedora Core) workstation for two or three years. Last several days I tried to find the answer to my problem in docs and on the Web, but I don't feel much closer to solving it. In case my question seems stupid or being asked not in the right place, please, point me out to the docs I have to read before asking questions.

Thanks in advance!

The link below is my posting to "gnome-list" mailing list about my problem:
http://mail.gnome.org/archives/gnome-list/2007-February/msg00022.html
Comment 1 Sergey V. Udaltsov 2007-02-22 13:50:56 UTC
True, these functions are not available.

Regarding the "most recently used" - there is some approximation to it, called "secondary groups mask". You can find it in gconf. Some groups can be masked as "secondary" - so they'll only be accessible through the mouse click on the applet. I know it is not what you want but is the closest you can have for a moment. I will think about your idea, anyway.

Different shortcuts for different groups can be implemented as a hack to xorg configuration (this hack would most probably never be accepted to xkeyboard-config but you can implement it locally).
Comment 2 Michael V. Antosha 2007-02-23 09:16:11 UTC
Sergey, thanks for your answer!

I tried to use the "secondary groups mask" approach. By the way it helped A LOT that you mentioned the "mask" word -- I'd had bad times wondering what this parameter means and how it works if I didn't knew it's a mask. This "int" parameter is named just "Secondary groups" in both short and long descriptions. I guessed how to use it, at last -- it's okay, then ;)

Well... I tried to play with the secondary groups mask, and had problems, described below. Suppose we are using three layouts, in such order: English (default layout), Russian, Ukrainian; suppose we mask the third (Ukrainian) layout:

   gconftool-2 --type=int --set /apps/gswitchit/Applet/secondary 4

Now changing groups operation ("both Alt keys together change group" in my case) works fine, i.e. switches between English and Russian. Great! But I still have these problems:

1. After changing this parameter (to "4" in this case) all my windows, where I'd had Ukrainian group active, "forgot" this setting (it appears to be "English" when I switch to such windows). So, I have to select "Ukrainian" group again, by mouse clicking...

2. Moreover, chosing "Ukrainian" by mouse clicking once doesn't solve the problem, because it automatically turns back to "English" again, just after the next switching between windows. "Different active keyboard groups in different windows" feature doesn't work for masked groups.

3. Another problem is about "group shift" behaviour ("R-Alt switches group while pressed" in my case) when using secondary groups masking... Group shifting mechanism ignores the mask. When I press R-Alt + <key> with Russian group active, it prints Ukrainian character (not English one, as I expected). I actively use group shifting and I think it's one of great features I always dreamed about :)
But it doesn't do what I want if I use the group masking feature.

Those three problems make secondary group masking feature to seem useless in my case.

That's why I'd be grateful if somebody thought about solving problems like mine in future releases. For now I even don't see what hacks could help me to do what I want. Seems I'm going to leave all as it is and reconcile myself to this  :)

Thank you anyway for trying to help me!
Comment 3 Sergey V. Udaltsov 2007-03-03 11:12:41 UTC
Well, #2 is a real bug in libxklavier. I'll have a look at it when I have time. #3 would be tricky to fix - but if I find the way, I'll do it. No promises though
Comment 4 Michael V. Antosha 2007-03-05 07:31:05 UTC
I'm really looking forward to the fixes. Thank you in advance!

I've just changed the "severity" attribute from "enhancement" to "normal" ("a minor part of the component is nonfunctional or broken"), leaving the priority as "low" ("rarely used in GNOME"). Change these, please, to other values in case I'm wrong.
Comment 5 beroal 2008-03-29 17:48:10 UTC
>It also should be a way to assign a shortcut for explicitly chosing Ukrainian
layout (one shortcut), or Russian (another shortcut).

I agree completely with the OP, my only method for switching layouts in Windows is Shift+Alt+<number>, where number is the number of layout. It is more convenient because I don't need to look at keyboard indicator while switching.

>Different shortcuts for different groups can be implemented as a hack to xorg
configuration (this hack would most probably never be accepted to
xkeyboard-config but you can implement it locally).

Would you please give me advice?
Comment 6 Sergey V. Udaltsov 2008-03-29 18:18:32 UTC
> Would you please give me advice?

In types/basic there is a Mode_switch interpret rule. It is using SetGroup method. You can try defining your own interpret rule and use it in some symbols file. That would be my starting point.
Comment 7 beroal 2008-03-30 13:53:26 UTC
(In reply to comment #6)
> > Would you please give me advice?
> 
> In types/basic there is a Mode_switch interpret rule. It is using SetGroup
> method. You can try defining your own interpret rule and use it in some symbols
> file. That would be my starting point.

I've used this approach: http://akshaal.livejournal.com/58473.html (in Russian). Groups are assigned to Right Alt + <digit> keys .
Comment 8 Sergey V. Udaltsov 2008-03-30 22:45:30 UTC
Michael, actually, since it is all aboutt libxklavier (which is not GNOME), could you please file a bug against libxklavier in freedesktop.org bugzilla. The real bug (or rather enhancement) is your issue #2.
Comment 9 Denys Rtveliashvili 2012-03-16 10:32:58 UTC
Created attachment 209911 [details]
KDE keyboard switcher

This is how groups of groups of keyboard layouts are implemented in KDE.
Comment 10 Denys Rtveliashvili 2012-03-16 10:36:45 UTC
It is very sorry to see that this bug is closed. Keyboard switcher in Gnome is far from perfect. In fact, it is so poor that I personally have to use KDE. And blaming some library is not a constructive way of improving things.