After installation
Language
Systemwide
Edit the keymaps configuration
nano /etc/conf.d/keymaps
Set the keyboard layout and find or add this line:
keymap="de"
Replace "de" with your specific German variant if needed:
de — Standard German
de-latin1 — German (Latin 1)
de-nodeadkeys — German without dead keys
Apply the changes
For the current session:
rc-service keymaps restart
For persistence, make sure the keymaps service is enabled:
rc-update add keymaps boot
Keyboard Layout within LUKS
Fixing Keyboard Layout During LUKS Password Entry on Gentoo
When you enter your LUKS password at boot, the keyboard layout defaults to QWERTY (us), not your systemwide German (de) layout. This is because the keymap is loaded after the initramfs runs. Solution: Set keyboard layout in the initramfs
You need to configure the initramfs to include the German keymap. On Gentoo, this depends on your initramfs generator.
For dracut (most common)
Edit /etc/dracut.conf.d/ or /etc/dracut.conf:
nano /etc/dracut.conf
Add or modify this line:
keyboard_layout="de"
Then regenerate the initramfs:
dracut -f