Page 1 of 1

[SOLVED] keyboard layout switch key not working in Gnome

PostPosted: Jun 3rd, '13, 23:17
by hawk03_SIGN9
Hey there guys! I've just installed Mageia 3 and I'm pretty satisfied except of the problem that I can't change the keyboard layout by using the shortcut I have defined. It seems to be ok at the Keyboard menu of Mageia Control Center and I can't figure out what I should do. Thanks for your time! :)

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 4th, '13, 00:31
by doktor5000
Which desktop environmentare you using?

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 4th, '13, 01:35
by hawk03_SIGN9
Thanks for your response! I'm using Gnome

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 4th, '13, 21:26
by doktor5000
Sorry, can't help with GNOME :/

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 5th, '13, 00:02
by hawk03_SIGN9
Thanks anyway doktor5000!!! :)

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 5th, '13, 16:18
by srtxg
so, you tell that you can switch with the toggle key you defined in the test area of the drakkeyboard tool
but not on gnome apps ?
can you change layout on non-gnome programs ? (try with xterm or rxvt terminals for example)
what key did you choose for toggling layouts?

maybe that key is catched by the gnome dekstop, and you have to undefine it there first.

launch gnome-control-center then keyboard section and shortcuts tab.
and see if you don't find the key or key combiantion you want to use alread used there.
(now, it would be nice to have drakkeyboard detect such conflicts and fix them... wonder if gnome has
some dbus service exposing the used shortkeys)

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 5th, '13, 22:10
by hawk03_SIGN9
Hey srtxg, no I think it has nothing to do with gnome. I just can't change the layout at all using the shortcut. Whenever I need to write something using two alphabets, it's pretty painfull to change the layout via the language icon.

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 6th, '13, 14:27
by srtxg
hello,
you haven't provided any of the requested info; it isn't possible to help you without more into.
- can you change layout on non-gnome programs ? (try with xterm or rxvt terminals for example)
- what key did you choose for toggling layouts?

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 6th, '13, 15:02
by hawk03_SIGN9
I tried changing layout on xterm and it didn't work. I am using Alt+Shift. Thanks for your time srtxg! :)

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 6th, '13, 18:09
by srtxg
I tested here with group(alt_shift_toggle) and it works (mga3, gnome 3)

So, either the keyboard isn't correctly configured, or something is intercepting the keys.
run the following commands (you can copy and paste) and show us the output:

Code: Select all
xkbcomp $DISPLAY xkb.dump     # this dumps to a file the kb layout used on $DISPLAY
grep xkb_symbols xkb.dump     # that will show the full xkb_symbols line
grep -3 'ISO.*Group' xkb.dump # that will show, with 3 lines of context, the ISO_*_Group codes used


here I have (pc 105 keyboard):
Code: Select all
-bash-4.2$ xkbcomp $DISPLAY xkb.dump
-bash-4.2$ grep xkb_symbols xkb.dump
xkb_symbols "pc+be+ua:2+ru:3+inet(evdev)+terminate(ctrl_alt_bksp)+group(alt_shift_toggle)+compose(rwin)" {
-bash-4.2$ grep -3 'ISO.*Group' xkb.dump
    interpret ISO_Level3_Lock+AnyOfOrNone(all) {
        action= LockMods(modifiers=LevelThree);
    };
    interpret ISO_Group_Latch+AnyOfOrNone(all) {
        virtualModifier= AltGr;
        useModMapMods=level1;
        action= LatchGroup(group=2);
    };
    interpret ISO_Next_Group+AnyOfOrNone(all) {
        virtualModifier= AltGr;
        useModMapMods=level1;
        action= LockGroup(group=+1);
    };
    interpret ISO_Prev_Group+AnyOfOrNone(all) {
        virtualModifier= AltGr;
        useModMapMods=level1;
        action= LockGroup(group=-1);
    };
    interpret ISO_First_Group+AnyOfOrNone(all) {
        action= LockGroup(group=1);
    };
    interpret ISO_Last_Group+AnyOfOrNone(all) {
        action= LockGroup(group=2);
    };
    interpret KP_1+AnyOfOrNone(all) {
--
    };
    key <LFSH> {
        type= "PC_ALT_LEVEL2",
        symbols[Group1]= [         Shift_L,  ISO_Next_Group ]
    };
    key <BKSL> {
        type[group1]= "FOUR_LEVEL",
--
    };
    key <RTSH> {
        type= "PC_ALT_LEVEL2",
        symbols[Group1]= [         Shift_R,  ISO_Next_Group ]
    };
    key <KPMU> {
        type= "CTRL+ALT",
        symbols[Group1]= [     KP_Multiply,     KP_Multiply,     KP_Multiply,     KP_Multiply,   XF86ClearGrab ]
    };
    key <LALT> {
        virtualMods= Alt,         [           Alt_L,  ISO_Next_Group ] };
    key <SPCE> {         [           space ] };
    key <CAPS> {         [       Caps_Lock ] };
    key <FK01> {

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 7th, '13, 00:19
by hawk03_SIGN9
Code: Select all
$ xkbcomp $DISPLAY xkb.dump
$ grep xkb_symbols xkb.dump
xkb_symbols "pc+us+inet(evdev)+terminate(ctrl_alt_bksp)" {
$ grep -3 'ISO.*Group' xkb.dump
    interpret ISO_Level3_Lock+AnyOfOrNone(all) {
        action= LockMods(modifiers=LevelThree);
    };
    interpret ISO_Group_Latch+AnyOfOrNone(all) {
        virtualModifier= AltGr;
        useModMapMods=level1;
        action= LatchGroup(group=2);
    };
    interpret ISO_Next_Group+AnyOfOrNone(all) {
        virtualModifier= AltGr;
        useModMapMods=level1;
        action= LockGroup(group=+1);
    };
    interpret ISO_Prev_Group+AnyOfOrNone(all) {
        virtualModifier= AltGr;
        useModMapMods=level1;
        action= LockGroup(group=-1);
    };
    interpret ISO_First_Group+AnyOfOrNone(all) {
        action= LockGroup(group=1);
    };
    interpret ISO_Last_Group+AnyOfOrNone(all) {
        action= LockGroup(group=2);
    };
    interpret KP_1+AnyOfOrNone(all) {


Here is the output of these commands.

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 7th, '13, 04:01
by srtxg
xkb_symbols "pc+us+inet(evdev)+terminate(ctrl_alt_bksp)" {


you are missing a "group" directive here; plus you don't define a second layout either. So no wonder you can't switch layout, there are no other layouts defined other than "us", and no layout switching keys defined either.

How exactly did you tried to configure your keyboard?
Tell us step by step, so we can reproduce it.

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 7th, '13, 18:16
by hawk03_SIGN9
Wow! That's bad! :/ Well I selected English as the installation language but defined another input language during the installation.

After that I found out that there wasn't the language selector widget on the gnome-panel, so I added the other input language via "System Settings" (no, it wasn't there before).

I had also defined the "Alt+Shift" key during the installation process. I checked the Mageia Control Center and the defined layout change key is indeed Alt+Shift.

I really do appreciate your efforts, thank you very much! :)

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 7th, '13, 19:26
by doktor5000
hawk03_SIGN9 wrote:Wow! That's bad! :/ Well I selected English as the installation language but defined another input language during the installation.

That's something totally different. Basically you told the installer that you want your Mageia to be in english, and defined the default keyboard layout.

Re: Can't change keyboard layout from latin to another alpha

PostPosted: Jun 8th, '13, 03:02
by srtxg
hawk03_SIGN9 wrote:After that I found out that there wasn't the language selector widget on the gnome-panel,


You mean the keyboard selector widget ?

Well, currently there is bad coordination between different tools to configure language/keyboard.

so I added the other input language via "System Settings" (no, it wasn't there before).


If you redefined keyboard trough Gnome chances are the setup you did on drakkeyboard is lost.

Did you define, trough gnome, a key combination to switch layouts?

IMHO the best way to follow for now is, for language/keyboard use only the mageia tools, not the Gnome/KDE/whatever ones.
(until they are able to work together; maybe in Mageia 4?)

...
I did a patch to drakkeyboard to use systemd notification in the hope Gnome will catch it; but it seems Gnome doens't yet uses systemd for keyboard.

But I found where in Gnome you define the layout switch key (and it isn't obvious at all to find!)
you need to launc gnome-tweak-tool, then select the "typing" section and go to "modifiers only input switch" (should be the last item).
you have a combobox where to select your switch key, select "Alt+Shift" and it should work.

If it works, please change the subject of the first post to:
"[SOLVED] keyboard layout switch key not working in Gnome"
so it shows it is solved and has a better description of what the problem was.

Re: [SOLVED] Can't change keyboard layout from latin to anot

PostPosted: Jun 8th, '13, 17:44
by hawk03_SIGN9
Thank you very much srtxg, this was the case!!! :D I would have never figured out that gnome-tweak would do the trick :P