How to add a custom keyboard layout based on the standard US layout with slight modifications for german special characters.
- Enter
üäöß
by pressingright Alt + uaos
. - Enter
ÜÄÖẞ
by pressingright Alt + Shift + uaos
. - Enter
€
by pressingright Alt + 5
.
Add the following lines to end of /usr/share/X11/xkb/symbols/us
file
partial alphanumeric_keys
xkb_symbols "us_german" {
include "us"
name[Group1]= "US (German)";
key <AD07> { [ u, U, U00FC, U00DC] };
key <AD09> { [ o, O, U00F6, U00D6] };
key <AC01> { [ a, A, U00E4, U00C4] };
key <AC02> { [ s, S, U00DF, U1E9E] };
key <AE05> { [ 5, percent, U20AC ] };
include "level3(ralt_switch)"
};
To register the layout you need to modify /usr/share/X11/xkb/rules/evdev.xml
. In layoutList
search for the layout
containing configItem
containing <name>us</name>
and add the following variant to the variantList
<variant>
<configItem>
<name>us_german</name>
<description>English (US German)</description>
<languageList>
<iso639Id>eng</iso639Id>
<iso639Id>ger</iso639Id>
</languageList>
</configItem>
</variant>
To choose this layout in Ubuntu 18.04 restart your PC (log out is not enough). In Settings > Region & Language
add another Input Source
. Choose English (United States)
on the first page and English (US German)
on the second.