"compose:caps" (and similar) don't disable caps lock functionality with multiple layouts (only affect first group)
NOTE: This was previously reported against libxkbcommon, where a very good analysis was posted: https://github.com/xkbcommon/libxkbcommon/issues/97#issuecomment-500115821
When running with the layout list us,jp
and option compose:caps
, the Caps Lock key functions correctly as a compose key in the us layout, but also functions as a Caps Lock key. Removing jp
as the second layout restores the usual behaviour.
This appears to be because the jp
layout is causing <CAPS>
to include:
symbols[Group2]= [ Eisu_toggle, Caps_Lock]`
As there's a Caps_Lock
keysym, Lock
is added to <CAPS>
thanks to:
modifier_map Lock { Caps_Lock };
despite Caps_Lock
only existing on the second level of the second group of <CAPS>
.
Because compose:caps
only affects the first group, it's not overriding the jp
layout's use of the <CAPS>
key:
partial modifier_keys
xkb_symbols "caps" {
key <CAPS> { type[Group1]="TWO_LEVEL", [ Multi_key, Multi_key ] };
};
So it seems the problem is that Caps Lock is enabled for all layouts if any layout has the Caps_Lock modifier, or that "compose:caps" is only affecting the first layout?
Is there any way the behaviour here can be changed to fix this (or at least make it more obvious?)