I am using the US default keyboard on Linux but sometimes need German special characters. I made my own version of the us
file in the usr/share/X11/xkb/symbols
folder that has the characters added. That works but always gets overwritten when there are updates.
I saw that there is e.g. a "German, Swedish and Finnish (US)" (de_se_fi) layout in the us
file. So I thought I will try that one instead. However I cannot find any of the "German" variants of the US keyboard in the settings to select them.
Update
I found that it is maybe missing in usr/share/X11/xkb/rules/base.lst
, so I tried adding it:
These are the lines in usr/share/X11/xkb/symbols/us
:
// German and Swedish characters added as third level symbols to the US keyboard layout
// Author: Stephan Lachnit <[email protected]>, 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 <AC02> {[ s, S, ssharp, U1E9E ]};
key <AD01> {[ q, Q, at ]};
key <AD07> {[ u, U, udiaeresis, Udiaeresis ]};
key <AD09> {[ o, O, odiaeresis, Odiaeresis ]};
key <AD10> {[ p, P, aring, Aring ]};
key <AD12> {[ bracketright, braceright, asciitilde ]};
include "level3(ralt_switch)"
};
I added this line to base.lst
(under the ! variant
section):
de_se_fi us: German, Swedish and Finnish (US)
I also tried creating my own layout usr/share/X11/xkb/symbols/cust_us_de
:
default partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {
name[Group1]= "Custom US/DE Keyboard Layout";
include "us(basic)";
include "eurosign(e)";
key <AC01> {[ a, A, adiaeresis, Adiaeresis ]};
key <AC02> {[ s, S, ssharp, U1E9E ]};
key <AD07> {[ u, U, udiaeresis, Udiaeresis ]};
key <AD09> {[ o, O, odiaeresis, Odiaeresis ]};
};
and adding this line to base.lst
(under the ! layout
section):
cust_us_de Custom US/DE Keyboard Layout
Both do not show up when I look for them in Settings → Keyboard → Input Sources (also not after a restart)
Is there a way to test whether a layout file (e.g. usr/share/X11/xkb/symbols/cust_us_de
) is working or causing an error? Or a way to see which layouts/variants in base.lst
are actually loaded?
Do I need to reboot or whatnot to make the changes happen, after editing one of the above mentioned files? Or is it enough to close and open the settings dialog?
System: Manjaro Gnome (wayland)