I'm trying to get some more use out of my function keys.  I would like the physical F1 to F12 keys to appear as F21 to F32, so I can assign functions to F21 etc. in my window manager (e.g. switch to the active chat window whenever I press F22.)However I still want access to the normal function keys, so I would like to be able to hold the physical Caps Lock key and press F1 to generate an F1 keypress.  As far as the other modifiers go, it would be nice if they were left unchanged, so Shift + F1 produces Shift + F1 (not Shift + F21).  In summary:F1 -> F21Caps + F1 -> F1Shift + F1 -> Shift + F1 (unchanged)Alt + F1 -> Alt + F1 (unchanged)etc.So only the first two dot points require changes from the default layout.I have attempted to start this with the following XKB snippet, and while it produces F21 for F1, it does not produce the original F-keys when Caps Lock is held:partialxkb_types hyper {    virtual_modifiers Alt,Hyper;    type HYPER {        modifiers= Hyper+Control+Alt;        map[Hyper]= Level2;        map[Control+Alt]= Level3;        level_name[Level1]= Extra;        level_name[Level2]= Normal;        level_name[Level3]= Normal+Ctrl+Alt;    };};partial function_keysxkb_symbols hyper_f21 {    replace key <FK01> {        type= HYPER,        symbols[Group1]= [           F21,             F1, XF86Switch_VT_1 ]    };    replace key <FK02> {        type= HYPER,        symbols[Group1]= [           F22,             F2, XF86Switch_VT_2 ]    };    ...};partial modifier_keysxkb_symbols caps_hyper {    replace key <CAPS> {        [ Hyper_L, Hyper_L ]    };    modifier_map Lock { <KPDL> };  # Not sure how to clear modifiers, so assign an unused key    modifier_map Mod3 { <CAPS> };};When I try to load it, I get this warning:Warning:          Type HYPER has 3 levels, but <FK01> has 5 symbols                  Ignoring extra symbolsI don't really understand why I get the error, because although the default <FK01> has five levels, my redefined one only has three.When I test out this configuration, sure enough I get F21 when pressing the physical F1 key, and I get Hyper_L (and Mod3) set when pressing Caps Lock.  However pressing Caps Lock + F1 produces Mod3 + F21 instead of F1.
xkb: Assign a new shift level to function keys
xorg;keyboard layout;xkb