Closed fabi1cazenave closed 8 months ago
Note that the *.xkb
output is not affected — it still relies on the old two-group strategy.
This patch affects xkalamine install
and the *.xkb_custom
output, which rely on an 8-level strategy.
FTR, it turned out activating this ISO_Level5_Latch
wasn’t as easy as expected, as this symbol seems to be ignored unless xkb/symbols/level5
is somehow included :
include "level5"
works but applies the first option, which generally means the right Ctrl key becomes ISO_Level5_Shift
;include "level5(modifier_mapping)"
does exactly what we want on Ubuntu 22.04, but it’s been dropped recently ;modifier_map Mod3 { ISO_Level5_Latch }
works surprisingly well… except when there’s a dead key in 1dk
1dk
— which is what we wanted to try for Lafayette and Ergo-L.So it seems the most robust solution is to copy the relevant part of include "level5(modifier_mapping)"
into our XKB patches :
replace key <MDSW> {
type[Group1] = "ONE_LEVEL",
symbols[Group1] = [ ISO_Level5_Shift ]
};
modifier_map Mod3 { <MDSW> };
The <MDSW>
key (Mode_switch
) has always been there ; nowadays it’s just an alias for the more self-explanatory <LVL5>
key — and we should be confident this alias is here to last.
Kudos to @nivopol for his help on this !
Mentioning #55, as this <MDSW>
solution is related to the support of dead keys in the 1dk
layer.
FTR, in xkb/symbols/pc
:
<LVL3>
gets ISO_Level3_Shift
assigned and mapped to Mod5
<LVL5>
gets ISO_Level5_Shift
assigned and mapped to Mod3
… and not the other way around, as one could expect.
Until now, kalamine used to generate XKB layouts where the AltGr key was an
ISO_Level5_Shift
, and the1dk
was anISO_Level3_Latch
. This is unnatural and possibly confusing, e.g. :The reason for this was that I had never been able to make an
ISO_Level5_Latch
work… until now. And it’s so simple that I really can’t figure out how I could’ve missed that.Anyway. Here’s a quick patch to test it. Let’s find out if it breaks on older systems.