It should be possible, and I've been planning to do it for a while. I need a lvl7 modifier for my second Extend layer. But I haven't gotten around to it yet.
Recall how I finally managed to remap Ctrl+Z and Shift+Ctrl+Z for Extend:
Redirect(key=<AB01>,mods=Control,clearmods=LevelFive), Redirect(key=<AB01>,mods=Shift+Control,clearmods=LevelFive), // Ctrl+Z
That was the craziest bit of XKB moddery I've performed so far, for sure! ^_^
So I think this action should work:
SetMods(mods=LevelThree+LevelFive)
But I haven't tested it yet. Let me know if you find out something!
Hmmm... check out symbols/level5("lock") and types/level5("EIGHT_LEVEL_LEVEL_FIVE_LOCK"). There it says that you need a "real" modifier key. So I guess we could do what they do, more or less, which is to cannibalize for instance the NumLock modifier. I'm really not familiar with the "types" definitions though. It may be that their need for the NumLock modifier was mostly driven by the desire to use its LED to show the lock state...?
// This adds the definitions needed to create a level5-lock behaviour, using
// the real modifier NumLock as a lock indicator.
// See also: types/level5 : EIGHT_LEVEL_LEVEL_FIVE_LOCK
// See also: compat/level5(level5_lock)
partial modifier_keys
xkb_symbols "lock" {
key.type[Group1] = "ONE_LEVEL";
include "level5(modifier_mapping)"
replace key <HYPR> {
vmods = NumLock,
symbols[Group1] = [ NoSymbol ],
actions[Group1] = [ SetMods(modifiers=NumLock) ]
};
modifier_map Mod2 { <HYPR> };
};
The level5 state is Mod3.
Note in the above how they didn't map the <HYPR> key to a key symbol but directly to the SetMods() action. That's how I did my Extend mappings too.
Maybe if I were more clever with my types definitions, I wouldn't have to add all those clearmods=LevelFive entries...
Last edited by DreymaR (26-Feb-2018 17:42:53)