Maybe this article can help: Xorg/Keyboard configuration - ArchWiki
To see a full list of keyboard models, layouts, variants and options, along with a short description, open /usr/share/X11/xkb/rules/base.lst
.
In /usr/share/X11/xkb/rules/base.lst
, I see this under variant
:
de_mac ch: German (Switzerland, Macintosh)
And this under layout
:
ch German (Switzerland)
Those seem like exactly what you want.
Further down in the ArchWiki article, it explains you can set these with a one-liner. Xorg/Keyboard configuration - ArchWiki
Using localectl
For convenience, the tool localectl may be used instead of manually editing X configuration files. It will save the configuration in /etc/X11/xorg.conf.d/00-keyboard.conf
, this file should not be manually edited, because localectl will overwrite the changes on next start.
The usage is as follows:
# localectl [--no-convert] set-x11-keymap *layout* [*model* [*variant* [*options*]]]
To set a model, variant or options, all preceding fields need to be specified, but the preceding fields can be skipped by passing an empty string with ""
. Unless the --no-convert
option is passed, the specified keymap is also converted to the closest matching console keymap and applied to the console configuration in vconsole.conf
. See localectl(1) for more information.
Obviously I have no idea what model of keyboard you are using; you will have to take a look in /usr/share/X11/xkb/rules/base.lst
and see if you can figure that out for yourself, or just leave it blank like this:
sudo localectl set-x11-keymap ch "" de_mac
I hope that helps, welcome to the community @SignurGian. 