Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


> It's a huge pain to actually write and install custom compositions

Could you say more about this?

IME, it's just a matter of adding lines to ~/.XCompose — is there something I'm missing?


Is ~/.XComposed picked up anymore? At least it wasn't early on, and I just gave up on keeping it around.

I guess it's up to each Wayland compositor, which calls for inconsistency :/


My understanding is that generally, Wayland uses XKB, which respects ~/.XCompose

But I think there are specific exceptions still, such as this Chromium bug: https://issues.chromium.org/issues/40272818


Any chance you typo'd the file name then, like you did here?


Tried it again and it works!

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


If you use Xorg sure. If you use wayland it can't be done.


I think you're mistaken. You can use .XCompose on Wayland (modulo certain broken cases, perhaps).

The Wayland book recommends XKB: https://wayland-book.com/seat/xkb.html

It does come down to the libraries used by a given app, though (see sibling comment).


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.


compose key on wayland is why I don't use wayland :D




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: