OK, I've managed to find a workaround: adding a second keyboard layout
has the side-effect of enabling you to change the "Alt/Win key
behaviour" preference.

I can also reproduce this on demand, at least on my machine.

(perhaps multiple layouts is the trigger for this bug? I am sure I had
briefly had more than one in the past.)

Anyway, I added the Afghanistan layout as it was the default after
clicking "Add...". After adding a second layout, you'll have silently
activated another preference - a key shortcut to swap between layouts.
In "Keyboard Layouts..." this is known as "Key(s) to change layout" and
is set as "Both alt keys together" after adding a layout. This is
actually the important setting for the workaround.

Now, if you remove the second keyboard layout the extras "Key(s) to
change layout" setting will stay active and you will still be able to
change the "Alt/Win" setting to/from Default. Hurrah! Workaround found.

However, if you then change the "Key(s) to change layout" preference
back to it's default setting (no items selected, heading will no longer
be bold) then the original "Alt/Win" preference bug will be back -
somehow the preference will be changed back to the "Control is mapped to
Alt keys, Alt is mapped to Win keys" setting.

Some nice xprop debugging output:

With the "Alt/Win" bug present:
$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "gb", "", 
"altwin:ctrl_alt_win"
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "gb", "", "altwin:ctrl_alt_win"

With a second layout and "Alt/Win" set back to "Default":
$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "gb", "", 
"altwin:ctrl_alt_win"
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "gb,af", ",", "grp:alts_toggle"

With the second layout removed and the "Key(s) to change layout" preference 
kept active:
$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "gb", "", 
"altwin:ctrl_alt_win"
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "gb", "", "grp:alts_toggle"

With the "Key(s) to change layout" preference set back to its Default:
$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "gb", "", 
"altwin:ctrl_alt_win"
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "gb", "", "altwin:ctrl_alt_win"

Any help?

-- 
gnome-keyboard-properties : won't set back to defaults
https://bugs.launchpad.net/bugs/431144
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to