Post History
As the keyboard layout wiki suggests, loadkeys only sets the keyboard layout for the current session. In order to persist these changes, the KEYMAP variable must be set in /etc/vconsole.conf. Thi...
Answer
#1: Initial revision
As the [keyboard layout wiki](https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration) suggests, `loadkeys` only sets the keyboard layout for the current session. In order to persist these changes, the `KEYMAP` variable must be set in `/etc/vconsole.conf`. This is exactly what is happening when executing ```sh localectl set-keymap --no-convert fr-latin1 ``` However, this would only update the configuration on the keyboard layout used in the **console**! To additionally update the Xorg server keyboard layouts, you would run the latter command without the `--no-convert` flag. However, I am not sure whether there is an equivalent for Wayland. These would be the keyboard layouts that would typically be used in the graphical user interface. GNOME typically ignores the general Xorg settings in favour of its own configuration system. According to the [GNOME wiki](https://wiki.archlinux.org/title/GNOME#Configuration) this can be managed by `gsettings` and/or `dconf`. However, for me only `dconf` seems to read/modify the actual settings and `gsettings` does nothing. The current keyboard layout(s) can be displayed using both tools: ```sh dconf read /org/gnome/desktop/input-sources/sources gsettings get org.gnome.desktop.input-sources sources ``` I think it should be clear from the output of these two commands what tool to use. Assuming that you wish to overwrite any existing settings, you can simply use ```sh dconf write /org/gnome/desktop/input-sources/sources "[('xkb', 'fr')]" gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'fr')]" ``` I am not quite sure about the `gsettings` syntax, though, so feel free to let me know if this needs modification. In the end, changing the keyboard layout in the GNOME Settings panel comes down to exactly invoking these commands in a convenient way. That is why you probably want to stick with the answer from [InfiniteDissent](https://linux.codidact.com/posts/289105/289106#answer-289106), but this is what's happening under the hood. PS: if you also want the keyboard in your [(virtual) consoles](https://wiki.archlinux.org/title/Linux_console) to be updated, you will have to make sure `/etc/vconsole.conf` is set accordingly (on top of setting your GNOME keyboard layout).