Bug 95168

Summary: setxkbmap win_space_toggle doesn't work switching to colemak
Product: xkeyboard-config Reporter: Devin Waas <dsc.waas>
Component: GeneralAssignee: xkb
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: eich
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Proposed fix.

Description Devin Waas 2016-04-27 12:17:11 UTC
COLEMAK AS DEFAULT
~~~~~~~~~~~~~~~~~~
setxkbmap -layout us,us -variant 'colemak,' -option 'grp:win_space_toggle'

=> toggle works

US AS DEFAULT
~~~~~~~~~~~~~
setxkbmap -layout us,us -variant ',colemak' -option 'grp:win_space_toggle'

=> toggle doesn't work


...



Note by Egbert Eich:

With:
setxkbmap -layout us,us -variant ',colemak' -option 'grp:win_space_toggle'
a toggle from Group1->Group2 works but not back.

us(colemak) explicitly sets symbols for <SPCE>, us doesn't. win_space_toggle only sets Group1. This setting is picked up for Group2 only if Group2 isn't set explicitly. Thus it works with colemak on Group1 and us on Group2 but not the other way around.

Since us(dvorak) doesn't set <SPCE> either it works both ways with dvorak in Group1 or Group2.





ORIGINAL POST
~~~~~~~~~~~~~
https://bugzilla.opensuse.org/show_bug.cgi?id=977025
Comment 1 Egbert Eich 2016-04-30 17:46:15 UTC
Created attachment 123369 [details] [review]
Proposed fix.

With:

setxkbmap -layout us,us -variant ',colemak' -option 'grp:win_space_toggle'

toggling works for switching from us-standard to us-colemak but not back, ie. from Group2 to Group1.
Since us-colemak explicitly sets symbols for <SPCE>, us-standard doesn't. win_space_toggle only sets Group1. Therefore the inheritance from Group1 to Group2
doesn't work.

This could either be resolved by removing the explicit setting of <SPCE> in us-colmak (losing the 'nobreaksapce' in the 4th column) or by modifying the group modifier to:

partial modifier_keys
xkb_symbols "win_space_toggle" {
  key <SPCE> {
    type="PC_SUPER_LEVEL2",
    symbols[Group1]= [ space, ISO_Next_Group ],
    symbols[Group2]= [ space, ISO_Next_Group ]
  };
};

It should be noted that most of the group modifiers only set Group1.
Comment 2 Sergey V. Udaltsov 2016-05-18 14:54:31 UTC
Good idea. Thank you, committed!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.