See here:
Also see:
https://wiki.archlinux.org/title/Xorg/Keyboard_configuration#Setting_keyboard_layout
I only have and use a desktop, so I do not have a clue whether it would be the same on the ARM devices. (The RPI is an ARM device, so yeah…)
Edit:
You can set more in /etc/default/keyboard
, AFAIK. Mine, for example:
$ cat /etc/default/keyboard
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="za"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
Value of XKBLAYOUT is the layout of keyboard. Change it to another possible value and reboot the machine to take effects.