Bug 99009 - Keyboard Layout - Switching lang groups does not work
Summary: Keyboard Layout - Switching lang groups does not work
Status: RESOLVED FIXED
Alias: None
Product: kxkb
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Andriy Rysin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-10 11:01 UTC by Sotiris Ganouris
Modified: 2007-11-09 00:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sotiris Ganouris 2005-02-10 11:01:26 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6) 
OS:                Linux

Enabling Keyboard layouts so i can view the language flag and customizing the switching options and xkb options, overrides my xorg.conf settings about language group switching and does not work at all. 

KDE little language flag in the panel doesnt change when I press the key combination that i have set in Control Center -> Keyboard Layouts, and the typing language doesnt change either.

I use english and greek keyboard layouts. My keyboard model is Generic 105-key intl PC. I use alt+shift to change group.
The command that keyboard layout tools shows me at the command box is : setxkbmap -option ctrl:ctrl_aa,altwin:menu,grp:alt_shift_toggle

Language switching works with gnome and fluxbox with the xorg.conf settings

thank you,
Sotiris Ganouris
Comment 1 Sotiris Ganouris 2005-02-10 11:42:03 UTC
I just found that if I press ctrl-alt-k the lang group changes to greek but I cant change it back to english with the same combination (maybe the greek k character is not working properly with the combination).

The only way to change properly to greek and back to english is by clicking the flag icon in the panel.
Comment 2 Thiago Macieira 2005-02-10 11:44:56 UTC
You must have your el keymap instead be el,us, so that the secondary names are available for Ctrl+Alt+k.

Alt+Shift is a direct X keystroke. KDE doesn't see it at all. If you don't want kxkb to override it, don't use kxkb.
Comment 3 Sotiris Ganouris 2005-02-10 14:18:47 UTC
I managed to make ctrl-alt-k to work both side by editing file:/root/.kde/share/config/kxkbrc 

[Layout]
Additional=el
EnableXkbOptions=true
Includes=
Layout=en_US
Model=pc104
Options=grp:ctrls_toggle
ResetOldOptions=true
ShowFlag=true
ShowSingle=true
StickySwitching=false
StickySwitchingDepth=1
SwitchMode=Window
Use=true
Variants=el(extended)


and file /etc/X11/xkb/rules/xorg
by adding this at the beginning of the file :

! $nonlatin = el


but i would like to use alt-shift for changing the keyboard layouts. Just choosing the available option at control center doesn't work at all.
Comment 4 Emmanuel Ch. 2005-02-11 16:09:25 UTC
I've noticed that this happens since KDE 2.x. Though It Worked at 1.x. Can't use the flag icon with alt+shift as well.
Comment 5 Irene Gr 2005-02-28 19:23:42 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 Vdovin Evgenii 2006-11-01 08:24:40 UTC
I would like to describe my solution of this problem.

Of course if you do not use xxkb and edit your file xorg.conf, then you can solve the problem of changing layouts,  but the KDE indicator will not show you the current layout. In notebooks without Scroll Lock indicator this is a problem (I think, not only on notebooks). This is the reason, why I want to solve the problem WITH standard (i.e., xxkb) methods.

First one should chose proper layouts in Control Center ---> Region and special properties ---> Keyboard layouts (sorry, I have KDE on my native language and translate it into English, probably this translation differs from the original, but not much). Then one should go to Control Center ---> Region and special properties ---> Keyborad switches and check there the point "Switch to the next layout". By definition there combination there is Alt+Ctrl+K and this combination woks fine. If one (like I am) want to use another combination, he should chose Other and change the combination. But even in this case some persons will not be able to use their favorite combinations (Ctrl+Shift, for example). To use Ctrl+ Left Shift it is necessary to edit the following file (think that the path is the same in all systems): ~/.kde/share/config/kdeglobals 

and change there proper line by the following way:
 
"Switch to Next Keyboard Layout=Ctrl+Shift_L". 

Even in this case while changing you should press Ctrl first and then Left Shift, otherwise the combination will not work.

I do think that it is a strong bag of KDE and the developers should fix it.
Comment 7 spiritus 2007-08-29 21:44:25 UTC
This is a very serious problem for all KDE users useing several keyboard layouts. I am amazed that the KDE Desktop Environment is still unable to flawlessly do such a trivial and important thing like switching a keyboard layout for years. Any plans about fixing this most important for international users nasty bug?
Comment 8 spiritus 2007-08-29 22:11:37 UTC
Have the same problems: unable to select Ctrl-Alt or Ctrl-Shift key sequence for layout switching, alsa standard Ctrl-Alt-K works one way switching layout from EN-US to RU and it doesn't allow to switch layout back if the current layout is not English. So I have to turn standard switcher off and use kkbswitch(http://kkbswitch.sourceforge.net/). Most of new KDE users don't know about such a workaround, they assume that the standard KDE switcher works...
Comment 9 Yevhen 2007-08-30 08:49:06 UTC
          To enable switching by entering "kdeglobals" file which is at ~/.kde/share/config/ There I modify one line and here's what I have:  
Switch to Next Keyboard Layout=Alt+Shift_L;Alt+Shift_R  
Before that you should disable keyboard layouts. In Kubuntu you can do that at Menu/System Settings/Regional&Language/Keyboard layout  
After you've changed and saved kdeglobals file you can enable keyboard layout and everything should work.  
  
[bugs.kde.org quoted mail]
  
  
  
<html>
<body>

  
    
  
  To enable switching by entering "kdeglobals" file which is at ~/.kde/share/config/ There I modify one line and here's what I have:
  <br />Switch to Next Keyboard Layout=Alt+Shift_L;Alt+Shift_R
  <br />Before that you should disable keyboard layouts. In Kubuntu you can do that at Menu/System Settings/Regional&amp;Language/Keyboard layout
  <br />After you've changed and saved kdeglobals file you can enable keyboard layout and everything should work.
  <br />
  <br />&gt; ------- You are receiving this mail because: -------
  <br />&gt; You are a voter for the bug, or are watching someone who is.
  <br />&gt;
  <br />&gt; http://bugs.kde.org/show_bug.cgi?id=99009
  <br />&gt;
  <br />&gt;
  <br />&gt;
  <br />&gt;
  <br />&gt; ------- Additional Comments From sirspiritus yandex ru 2007-08-29 22:11 -------
  <br />&gt; Have the same problems: unable to select Ctrl-Alt or Ctrl-Shift key sequence for layout switching, alsa standard Ctrl-Alt-K works one way switching layout from EN-US to RU and it doesn't allow to switch layout back if the current layout is not English. So I have to turn standard switcher off and use kkbswitch(http://kkbswitch.sourceforge.net/). Most of new KDE users don't know about such a workaround, they assume that the standard KDE switcher works...
  <br />&gt;
  <br />&gt;
  <br />
  <br />
  <br />
  <br />


</body>
</html>
Comment 10 spiritus 2007-09-11 19:11:27 UTC
Ok, thanks. I know another workaround - in XKB config section of xorg.conf:

         Option      "XkbOptions" "grp:ctrl_shift_toggle,grp_led:caps"

But that one-way keyboard switching by default shortcut Ctrl-Alt-K is kind of strange. And also it's strange that KDE doesn't allow to assign ctrl-shift or alt-shift shortcuts in Control Center... 
Comment 11 Andriy Rysin 2007-09-12 05:37:51 UTC
there are plans to make it better in kde4
Comment 12 Dmitri Petrov 2007-09-14 05:41:17 UTC
That is good news ;-). May be by kde5 it will finally work like it supposed to....
Comment 13 Giorgos Pallas 2007-10-06 17:29:38 UTC
Listen to what worked for me: I wanted to change keyboard layout between latin and greek using the otherwise useless CapsLock. I inserted those entries into xorg.conf:

Option      "XkbLayout" "us,el"
Option      "XkbVariant" ",extended"
Option      "XkbOptions" "grp:caps_toggle,grp_led:scroll,lv3:ralt_switch,compose:rwin"

(last line is one line)

Restart X server (or reboot)

In keyboard layout properties, completely disable 'xkb options'.
Then in Keyboard Shortcuts, last entry is about changing keyboard layout. Change it by selecting custom and pressing CapsLock. That's all!
Comment 14 Andriy Rysin 2007-10-09 05:23:33 UTC
Currently in KDE4 kxkb switches groups (instead of layouts) and shows group change initiated from other apps or modifier keys. I am marking this as fixed.
Comment 15 Di.Ego.R Kobylkin 2007-11-01 23:41:24 UTC
Isn't there a way to hack a quick patch for the current KDE release or just add it to the Troubleshooting section of the documentation. This thing certainly drives a few folks crazy.
Comment 16 Andriy Rysin 2007-11-07 04:41:13 UTC
I know about the problem but originally kxkb (for some reason) was programmed to switch layouts - not groups and there are tons of problems which were related to that. As this was design defect without significant rewrite it was impossible to get rid of all those problems. Unfortunately I was not able to devote enough time to kxkb in KDE3 to rewrite it properly.
Comment 17 Di.Ego.R Kobylkin 2007-11-09 00:57:02 UTC
Why not adding something like this to the FAQ:

Keyboard layout switching (Russian/Russisch and German/Deutsch) in KDE on Kubuntu
There is a bug in KDE 3 and here is a workaround.
Check "System Settings"->"Regional&Language"->"Keyboard Layout"->"Enable keyboard layouts" and add layout Germany, variant deadacute and layout Russia, variant winkeys.
Also in "Xkb Options" check "Enable xkb options" and "Group Shift/Lock behaviour" and "Ctrl+Shift changes group"
To use Ctrl+ Left Shift it is necessary to edit the following file (I guess the path is the same in all systems):

~/.kde/share/config/kdeglobals

and change there a proper line in the following way:

Switch to Next Keyboard Layout=Ctrl+Shift_L

and then un-check (if checked) and check again the "System Settings"->"Regional&Language"->"Keyboard Layout"->"Enable keyboard layouts".

http://geocities.com/egor_kobylkin/linux.html

Feel free to remove references to Kubuntu etc.