Compose / umlauts on US keyboard

Hello -

sort-of-n00b warning; I’ve used Linux a lot in the distant past and am only now returning to it on the Reform. I’ve never dealt with keyboard configuration details before.

I have a Reform with US keyboard layout and would like to be able to enter umlauts and other special characters.

The Reform handbook mentions that the ellipsis key ("…") is mapped to Compose, but that does not seem to be the case. In Sway, it always brings up a context menu. I have tried various ways to map ellipsis to Compose, e.g., setxkbmap -option compose:menu, all to no avail.

Also, the provided Sway config file has a line that, when uncommented, is supposed to map umlauts and such to right-ALT combinations. Uncommenting the line reveals that the mapping file it mentions (us-german-umlaut) is not found. I also couldn’t find it in the Reform OSS repositories.

Please advise - I’d prefer the Compose key solution but would be interested in answers to both my questions.

Best,

Michael

I don’t have a reform yet (can’t wait!), but I do use sway on my existing computer. In my sway config I have the following command to alter the keymap

input * xkb_options caps:super,compose:ralt

wev is helpful for figuring out what the keys are called.

Hope that helps,
Jack

2 Likes

Indeed, I forgot to include this symbol file in the system image. But here it is! Just paste this into a new file ~/.xkb/symbols/us-german-umlaut:

default partial alphanumeric_keys
xkb_symbols "basic" {
	include "us(altgr-intl)"
	include "level3(caps_switch)"
	name[Group1] = "English (US, international with German umlaut)";
	key <AD03> { [ e, E, EuroSign, cent ] };
	key <AD07> { [ u, U, udiaeresis, Udiaeresis ] };
	key <AD09> { [ o, O, odiaeresis, Odiaeresis ] };
	key <AC01> { [ a, A, adiaeresis, Adiaeresis ] };
	key <AC02> { [ s, S, ssharp ] };
};

This is activated by the following line in .config/sway/config:

input "1003:8258:MNT_Reform_Keyboard" xkb_layout us-german-umlaut
1 Like

Thank you, Jack - this worked like a charm. Compose is live. :slight_smile: And wev was a great discovery!

Thanks Lukas - I’ve placed the file in ~/.xkb/symbols as indicated. Unfortunately, sway complains about the file not being found in the include paths. I’ve not been able to find where exactly to instruct sway (or whatever entity) to look this up in the right place; putting it in a location relative to the sway config also didn’t help.

OK - it seems that xkb isn’t even looking for files in ~/.xkb (or so strace tells me). I’ve succeeded at including the us-german-umlaut config by linking to it from the main xkb configuration in /usr/share/X11/xkb. It’s a bit brute-force, but until I’ve figured out how to make xkb look in my home dir, it’ll do.

1 Like