34
submitted 10 months ago* (last edited 10 months ago) by pathief@lemmy.world to c/linux@lemmy.ml

EDIT: Solved! Check this comment!

I use a keyboard with an american layout. I find it much better for coding and actually love this keyboard to pieces. However, I still need to write in portuguese.

The dead keys in Microsoft Windows worked perfectly for me but the Linux ones do not. Some characters are not available and are replaced by characters that don't exist in the portuguese language.

In X11 I fixed this by using an .XCompose file with the keybinds just like in Windows. Source here, it works perfectly.

In Wayland, the .XCompose file works for pretty much all apps. Firefox is fine, kitty is fine, Vivaldi is fine. Unfortunately electron apps with the --ozone-platform-hint=wayland ignores the .XCompose file and I get the default keybinds. Since I own an nvidia card I really need these flags, otherwise the electron apps will aggressively flicker and/or eat letters while I'm typing.

I've searched far and wide, there are several open bugs in chromium, electron and wayland repositories. Everyone seems to be pointing fingers at each other for years and no workaround to make .XCompose work seems to be available.

I'm wondering if there is an alternative way to customize the dead keys under Wayland. Thanks in advance.

you are viewing a single comment's thread
view the rest of the comments
[-] lupec@lemm.ee 3 points 10 months ago

My situation is remarkably similar to yours down to the language, and I happen to have been considering a US keyboard as well so that's disheartening to hear. I have nothing to add right now but will let you know if I come across anything helpful!

[-] pathief@lemmy.world 3 points 10 months ago* (last edited 10 months ago)

I love US keyboards for coding, it really improves the experience. Typing in portuguese, however, is not a good experience. The default american layout has the ~ key in a really bad spot. Typing à or ã is REALLY uncomfortable/weird. Fortunately, my keyboard has that key on the right side of the keyboard instead of the left, which greatly improves the experience.

The .XCompose file I linked in the main post is perfect and works great on X11. If you're not yet on Wayland you can use it and have a great experience.

[-] lupec@lemm.ee 2 points 10 months ago

Right, that all makes sense. I'll definitely keep that .XCompose file in mind, wasn't aware it even was a thing before your post. Also, do you mind sharing the specific keyboard you're using for reference?

Side note, I've started using vim/helix a few months ago and the pt layout makes things a lot more awkward than I expected, that's half the reason I'm considering a US keyboard lol

[-] pathief@lemmy.world 2 points 10 months ago

I'm using an Happy Hacking Keyboard Professional 2. Not most people's cup of tea but I've grown used to it and it's hard for me to swap to anything else now :P

[-] lupec@lemm.ee 1 points 10 months ago

I can see why it'd be divisive with topre keys, no key markings and a pretty non standard layout but man does it look nice. Really appreciate what they're going for there.

Anyway, thanks and hope you find a solution, I'll drop by if I come across anything useful!

this post was submitted on 16 Jan 2024
34 points (97.2% liked)

Linux

48366 readers
689 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS