Really? My laptop has my national keyboard but I switch to USA for programming because of {} [] and all the other characters that can be typed with minimal use of extra keys. My fingers know the keys and the switch combination, maybe windows + space. I didn't expect Wayland not to have such basic functionality after so many years. But frames must be perfect, no tearing (is that the word?)
It's possible that the "permanently switch to next layout" works reliably, but not the "switch while held" (which I do because I'm selecting single symbols at a time)?
Have you tried using a compose key? I lost my custom mappings when switching from X to Wayland, but they work fine in both.
I did lose my custom mappings though, but I only needed them when I was in emacs and obviously there's already a command for inserting weird stuff, so I just added a binding for it.
I use the compose key for compose stuff. It's a huge pain to actually write and install custom compositions so I don't bother anymore, just use the defaults (which is mostly annoying due to missing keypad variants, e.g. ± must be typed using the top of the keyboard).
It looks like the default en_US.UTF-8/Compose includes mappings of the form:
<dead_greek> <a> : "α"
but to use that I'd have to figure out how to map a key to `<dead_greek>`, and keyboard mappings that aren't in the standard checkboxes are such a pain.
I'm guessing that maybe I forgot to restart the machine to make sure everything got to read it. Or that whatever was broken long ago got fixed.
BTW, I can't reach my backup right now, but this seems like a good start to build up custom mappings in case anyone gets interested in this,
https://github.com/kragen/xcompose
Even with Xorg toolkit support has degraded quite a bit. For GTK it doesn't work by default and you need to set GTK_IM_MODULE=xim in your environment. Qt on the other hand picks up ~/.XCompose by default but truncates the compose result to one character.