How to enable German umlauts on US intl. keyboard in Arch Linux
Tags: linux, xkb, umlaut, keyboard
Published: 2020-02-21 13:50:53

Some weeks ago I bought a US intl. keyboard (Cherry Stream 3.0) for my Linux workstation because as a developer I favor the US intl. layout over the german keyboard layout.
But as a German I need to type german letters from time to time where I need those nice german umlauts for.
Using `<Compose>`+ `"` + a/u/o/ss is a nightmare. So I started to look for a usable and easy solution like [Karabiner](https://pqrs.org/osx/karabiner/) on Mac OS.
Oh boy, what did know...
I found a lot of answers in the Web on Stack Overflow, Ubuntu user groups and the Arch Linux forum.
They were talking about adding .Xmodmap files, not using .Xmodmap files because XKb is the new kid on the block, extending an existing XKB symbols file, how to handle issues due to crashes after fiddling around with XKB symbols files and so on.
I was convinced that either I will crash something or it won't work at all.

*Nonetheless I needed an easy way to type German umlauts!*

So I decided to follow the example from the following GitHub repo on how to change the US symbols file.
{% github rgeber/xkb-layout-us-intl-de no-readme %}
It told me to add the following lines to the US symbols file.

```
partial alphanumeric_keys
xkb_symbols "intlde" {

    include "us(basic)"
    name[Group1]= "English (US, intl., German Umlaut)";

    key <AC01> { [         a,          A,    adiaeresis,       Adiaeresis ] };
    key <AD07> { [         u,          U,    udiaeresis,       Udiaeresis ] };
    key <AD09> { [         o,          O,    odiaeresis,       Odiaeresis ] };
    key <AC02> { [         s,          S,        ssharp,          section ] };

    include "level3(ralt_switch)"
};
```

Just out of curiosity I wanted to check first if there are other lines with *adiaeresis* in the symbols file already.
And to my surprise there were other lines.... And a whole section too, which described exactly what I was looking for.

```
// German and Swedish characters added as third level symbols to the US keyboard layout
// Author: Stephan Lachnit <stephanlachnit@protonmail.com>, 2019
// the german umlauts are placed over the characters without diaeresis, the sharp-s over the s
// the swedish ao is placed over the p, since it's closed to the position on a swedish keyboard
// the euro sign is placed over the e, as it is usual for german and swedish keyboards
partial alphanumeric_keys
xkb_symbols "de_se_fi"  {

    include "us(basic)"
    include "eurosign(e)"
    name[Group1] = "German, Swedish and Finnish (US)";

    key <AC01> {[ a,          A,          adiaeresis, Adiaeresis ]};
    key <AD09> {[ o,          O,          odiaeresis, Odiaeresis ]};
    key <AC02> {[ s,          S,          ssharp,     U1E9E      ]};
    key <AD07> {[ u,          U,          udiaeresis, Udiaeresis ]};
    key <AD10> {[ p,          P,          aring,      Aring      ]};

    include "level3(ralt_switch)"
};
```
So instead of editing the symbols file I started to look into Gnome to understand how I could use the keyboard variant.
At first I took a look into Gnome settings "Region & Language". But I could not find the keyboard variant "German, Swedish and Finnish (US)".

But how was it possible that I could not find this variant?

And then I remembered that whenever something was neither available nor visiblein Gnome settings then Gnome Tweaks would definitely contain a way to configure it.
_And so I found out how to enable German umlauts on a US Intl. keyboard the easy way in Arch Linux inside Gnome._

Step 1.
Start Gnome Tweaks and enable "Show Extended Input Sources".
![Enable Show Extended Input Sources](https://dev-to-uploads.s3.amazonaws.com/i/qqluprn47d1e8vhfv4j2.png)

Step 2.
Restart your Gnome session.

Step 3.
Open Gnome Settings, go to "Region & Language" and click on the "+" (Plus) sign under "Input Sources".
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qoqvg97f1csalv2bl4ii.png)

Step 4.
Click on "English (United States)".
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7ssf97hhv92xudd70hq2.png)

Step 5.
Scroll down until you find the entry "German, Swedish and Finnish (US)".
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/mrdhfbftg7ttz410t124.png)

Step 6.
Click on the entry and afterwards click on "Add".
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xd0zyzzj0ew0gz08i8xy.png)

It should be added now and you can start using it.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/insjepcgezc6ylnlyp83.png)

Start a terminal or editor and type `<Right Alt>+a`. This should result in ä. Combined with Shift you get the upper-case variant.

So no editing of XKB symbols files and other crazy stuff is necessary to get German umlauts!

Have fun.