If you have a notebook with U.S. keyboard and you want to type in German comfortably with AltGr+u = ü, AltGr+o = ö,

1. Open file /etc/X11/xkb/symbols/de with superuser privileges 2. Paste at the end the following fragment:

partial alphanumeric_keys
xkb_symbols "qwerty" {
    // modify the basic U.S. layout to have euro sign and German letters

    include "us(basic)"
    name[Group1]="Germany - U.S. keyboard with euro sign and German letters";

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

    include "level3(ralt_switch)"
};

3. Edit /etc/X11/xkb/rules/xorg.lst (with superuser rights, of course). Insert qwerty de: U.S. keyboard with German letters after all other German layout options.

4. Edit /etc/X11/xkb/rules/xorg.xml. Insert the following fragment after all other layout options:

        <variant>
          <configItem>
            <name>qwerty</name>
            <description>U.S. keyboard with German letters</description>
          </configItem>
        </variant>

5. Restart X and select German layout option you have just added! (qwerty) Enjoy!

Questions? Mistakes? Contact Romans Kasperovics.