This question should probably go to retrocomputing since people should use XKB, but I am really curious how did they latch group switching with xmodmap / XChangeKeyboardMapping()
.
I read xmodmap man and X11 lib documentation, and it seems that to have, say, English and Russian keyboard layout you need to map keysyms to some keycode
(like [code_for_letter_l] --> XK_l XK_L XK_Cyrillic_de XK_Cyrillic_DE
) and then map some keycode to MODE_SWITCH.
Pressing this code along with L gives russian letter "Д".
But how can I latch it? There is Lock modifier, but it only could be used with XK_Caps_Lock keysym (and ShiftLock which I do not understand).
Adding lock to MODE_SWITCH has no affect.
With linux console keymap I can add group to, say, AltGr and then add some keycode to AltGr_Lock to make it latch. And it works. But how do I do it in X?
I checked several modmaps for cyrillic and other non-latin layouts (ancient distros have a lot of them) and in all cases people either used capslock for it or did not have lock/latch at all.
So, I came to idea that is was not possible to switch layout with keys like "CTRL+Shift" before XKB (before 1996?), but is sounds ridiculous.
Am I right?