Summary: | kxkb group switching using just the Right Win doesn't work (+ugly workaround HOWTO) | ||
---|---|---|---|
Product: | [Unmaintained] kxkb | Reporter: | Vassilii Khachaturov <vassilii> |
Component: | general | Assignee: | Andriy Rysin <arysin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ana, gsasha, l.lunak, munzirtaha |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Vassilii Khachaturov
2004-07-07 01:51:05 UTC
Debian twin bug xref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257984 do you use 'Include latin group' option? Because if you don't, in XFree starting 4.3.0 there's only one group in each layout by default (unless you changed options in /etc/X11/xkb/rules/xfree86) and thus group switching does not make much sense. Andriy,
thanks for your prompt reply.
On 7 Jul 2004, Andriy Rysin wrote:
> do you use 'Include latin group' option? Because if you don't, in XFree
> starting 4.3.0 there's only one group in each layout by default (unless
> you changed options in /etc/X11/xkb/rules/xfree86) and thus group
> switching does not make much sense.
The bug behavior has been verified with and without the "Include latin
group" simultaneously selected on each layout. Between the attempts,
after the kxkb changes were accepted, kde was restarted. The
only effect of this option is that one can do "Ctrl+..." even
with the non-Latin layout selected, and it will work; with and without it,
kxkb still ignores the requested group toggle behavior of rwin.
Vassilii
Now I see what you mean. The problem is that by default or in your X configuration X treats Right-Win as a modifier so you cannot assign shortcut just to Right-Win. When you switch Right-Win to 'xkb group changer' then is becomes standalone key wich you can bound to layout switching. It's not a problem of kxkb - I can transfer this issue to general kde but it's just the nature of X and I am not sure it can be helped easily. The main problem here is that X and KDE are different products and don't integrate too tightly. Lubos, you may be more familiar with this, could you please comment this issue? Thanks. *** Bug 44808 has been marked as a duplicate of this bug. *** *** Bug 83958 has been marked as a duplicate of this bug. *** > Now I see what you mean. The problem is that by default or in your X > configuration X treats Right-Win as a modifier so you cannot assign > shortcut just to Right-Win. Correct. It is the default - I didn't do any local maps change. > When you switch Right-Win to 'xkb group > changer' then is becomes standalone key wich you can bound to layout > switching. This is the nature of my workaround hack. > It's not a problem of kxkb - I can transfer this issue to I still think there is a problem with the kxkb because its UI is misleading. If there is an option there that suggests that if one selects it, it would be possible to use rwin as the group toggle, it is only natural that an average user (that doesn't know a modifier from a normal key) will be happy to select it and then become frustrated because of it. Also, there is this ugly separation between the shortkuts configuration and the switching configuration in kxkb, I am sure a lot of people have only seen one but not the other. > general kde but it's just the nature of X and I am not sure it can be > helped easily. The main problem here is that X and KDE are different > products and don't integrate too tightly. Lubos, you may be more > familiar with this, could you please comment this issue? Thanks. Well, the point here is that it works for AltWin and it may work for Alt+Shift but it may not work for Ctrl+Shift or Ctrl+Alt, so we can not make this as a standard option for an average user. The ugly workaround - that's what it is. I put 'Xkb option' to kxkb configuration panel because X implementation is pretty complex and cumbersome in xkb area and I just wanted some 'advanced options' to be accessible to the (advanced) people who want to use them. It may happen to enable some missing KDE features but it was not designed to do so and it's not possible to make this standard. I could remove 'xkb options' altogether but I think that many people use it for other needs and they will not be happy about that. The only proper way is to tweak kdelibs (?) to be able to use modifiers as shortcuts without ugly hacks. Thus kxkb will not be directly involved into proper solution. > Well, the point here is that it works for AltWin and it may work for > Alt+Shift but it may not work for Ctrl+Shift or Ctrl+Alt, so we can > not make this as a standard option for an average user. The ugly > workaround - that's what it is. Agreed :) > I put 'Xkb option' to kxkb > configuration panel because X implementation is pretty complex and > cumbersome in xkb area and I just wanted some 'advanced options' to be > accessible to the (advanced) people who want to use them. It may > happen to enable some missing KDE features but it was not designed to > do so and it's not possible to make this standard. I could remove 'xkb > options' altogether but I think that many people use it for other > needs and they will not be happy about that. Indeed it would be very gruesome if this is removed altogether. > The only proper way is > to tweak kdelibs (?) to be able to use modifiers as shortcuts without > ugly hacks. Thus kxkb will not be directly involved into proper > solution. I wonder if kxkb could transparently do smth along the lines of the hack - check if it is a modifier first, then, if it is, verify that no shortcuts using it exist (otherwise give a warning they will no longer be accessible). Then, transparently remap the modifier into some unused code, and then use that code as the switching shortcut. Obviously, this would be much more than is possible during the current approach that just takes the GUI selections and blindly translates them into a setxkbmap cmdline. Actually the trick whether called ugly or not is very valuable to me. Thanks. I think it should be possible to make the shortcut dialog accept only modifier key(s) as the shortcut, and modify KGlobalAccel accordingly. It probably doesn't make much sense for other apps than kxkb though. I don't understand what the rest of the bugreport is about, too xkb-ish to me :(. Is there a way to do a similar trick with "CAPS"? The difficulty for me is that "CAPS changes group" doesn't work just like the "Right Win changes group"; however, there is no CAPS option in the level3 chooser key selection. (If you are curious, I am wokring on a laptop at this where there is only one (left) win key present; I worked it around by assigning the level3 switching to the right CTRL, but it isn't very neat as I keep hitting it by accident :( ). If one adds the German ("de") keyboard layout, the workaround I had earlier described in this thread works for switching TO the German keymap, but doesn't work to switch back FROM the German keymap. (Tested with KDE 3.5, debian Etch + some unstable stuff on the machine). In KDE4 kxkb switches groups instead of layouts so this should not be a problem any more. |