Disclaimer: I'm still trying to understand XKB and might be wrong. But since there is no other answers so far, here is my current understanding.
Regarding the first part of the question about ISO_Level3_Shift: modifier_map
is needed for backward compatibility with the old core protocol. For example, it's needed for the old xmodmap
program to work somewhat correctly. And xmodmap might be still widely used because people have ~/.Xmodmap files that are easy to use and easy to understand compared to XKB. But the modern way is to use interpret ...
approach.
The second part of the question regarding level5, useModMapMods and virtualModifier is harder for me. Probably I don't understand XKB enough to give a simple answer. I better quote the documentation: useModMapMods= level1;
means LevelOneOnly. From https://www.x.org/releases/current/doc/kbproto/xkbproto.pdf page 54:
The levelOneOnly setting, indicates that the interpretation in question should
only use the modifiers bound to this key by the modifier mapping if the symbol
that matches in level one of its group. Otherwise, if the symbol being considered
is not in shift level one of its group, the server behaves as if the modifier map for
the key were empty. Note that it is still possible for such an interpretation to apply
to a symbol in a shift level other than one if it matches a key without modifiers;
the levelOneOnly flag only controls the way that matches are determined and
that the key modifiers are applied when an interpretation does match.
As far as I understand the virtualModifier= LevelFive
line is again for backward compatibility. It's possible to specify the mapping in either interpret
section or directly in the key definition.
While I seem to understand each of the above statements independently I still can't come up with an example that would illustrate usage of these ISO_Level5_Shift
and ISO_Level5_Shift+Any
interpretations.