.. include:: /urls.rst
.. _pureos_cfg_keyboard:
Keyboard Layout
===============
A keyboard layout refers to the arrangement of keys on a keyboard and determines how characters, symbols, and function keys are accessed.
The most common keyboard layouts include QWERTY, AZERTY, and Dvorak, each designed to optimize typing efficiency and comfort for different languages and user preferences.
This guide describes how to configure your keyboard layout.
Open the **GNOME Control Center** and click **Region & Language** to begin.
.. _pureos_cfg_keyboard_add:
Add a layout
------------
#. Within **Region & Language**, click the **+** button.
.. image:: ../img/gnome-control-center/keyboard/add-input-source.png
:scale: 50%
:alt: Adding an input source
:class: no-scaled-link
#. Select a keyboard layout to add.
.. tip::
EXAMPLE: Select the English Dvorak keyboard layout.
.. English Dvorak keyboard layout example
.. raw:: html
Click here to expand
#. The keyboard layout we wish to add uses the English language, which is already shown.
Click **English**.
.. image:: ../img/gnome-control-center/keyboard/add-input-source-selection-collapsed.png
:scale: 50%
:alt: Add an Input Source menu
:class: no-scaled-link
#. Now that the language is shown, various keyboard layouts will be shown that use that language.
Click **English (Dvorak)**.
.. image:: ../img/gnome-control-center/keyboard/2.png
:scale: 50%
:alt: Input source language selection
:class: no-scaled-link
.. raw:: html
.. tip::
EXAMPLE: Select the Serbian keyboard layout.
.. Serbian keyboard layout example
.. raw:: html
Click here to expand
#. Click the kebab (⁝) button to add keyboard layouts not shown by default.
.. image:: ../img/gnome-control-center/keyboard/5.png
:scale: 50%
:alt: Kebab button
:class: no-scaled-link
#. Click **Other**.
Scroll for additional languages or type the desired language into the search bar.
#. Click a language to select it.
.. image:: ../img/gnome-control-center/keyboard/7.png
:scale: 50%
:alt: Adding an input source (Serbian)
:class: no-scaled-link
.. raw:: html
#. Once a keyboard layout is selected, click **Add** to add it.
.. image:: ../img/gnome-control-center/keyboard/3.png
:scale: 50%
:alt: Selecting the Dvorak keyboard
:class: no-scaled-link
#. Click **Add**.
The new keyboard layout is added to the list:
.. image:: ../img/gnome-control-center/keyboard/dvorak-added.png
:scale: 50%
:alt: Input source was added
:class: no-scaled-link
.. _pureos_cfg_keyboard_priority:
Organize layouts
----------------
The position in which a keyboard layout appears in the **Input Sources** list determines the order in which the kayouts are shown within the :ref:`dropdown menu of active layouts `.
To change the organization of keyboard layouts:
#. Within **Region & Language**, click and drag a kayboard layout up or down to set its position in the list.
.. image:: ../img/gnome-control-center/keyboard/rearrange-keyboard-layouts.png
:scale: 50%
:alt: Up/down arrow buttons
:class: no-scaled-link
.. _pureos_cfg_keyboard_active:
Set the active layout
---------------------
Once multiple keyboard layouts have been :ref:`added to the user session `, the active keyboard layout can now be quicky changed within the GNOME desktop.
The order in which these keyboard layouts are displayed are determined :ref:`here `.
#. Press the layout button in the on the upper-right corner of the screen.
#. Select the language to set as active.
.. image:: ../img/gnome-change-active-keyboard-layout.png
:scale: 100%
:alt: Quickly changing a keyboard layout in GNOME
:class: no-scaled-link
.. _pureos_cfg_keyboard_remove:
Remove a layout
---------------
#. Remove a layout by clicking the **X** button next to the corresponding keyboard layout to be removed:
.. image:: ../img/gnome-control-center/keyboard/dvorak-added.png
:scale: 50%
:alt: Several keyboard layouts enabled
:class: no-scaled-link
#. Click the **Options** (gear) button for advanced options:
.. image:: ../img/gnome-control-center/keyboard/input-source-options-menu.png
:scale: 50%
:alt: Input Source Options menu
:class: no-scaled-link
Additional layouts
------------------
#. Enable any additional keyboard layouts in the **GNOME Tweaks** tool.
.. image:: ../img/gnome-tweaks/alt_key.png
:scale: 50%
:alt: Show extended input sources
:class: no-scaled-link
#. Log out and log back in for the setting to take effect.
#. Open **Region & Language** settings to see additional layouts.
For example, you can click on **English** to list additional language variants that match the US physical keyboard layout:
.. image:: ../img/gnome-tweaks/german_us2.png
:scale: 50%
:alt: Adding an input source (German)
:class: no-scaled-link
.. _pureos_cfg_keyboard_troubleshoot:
Troubleshooting
---------------
.. _pureos_cfg_keyboard_troubleshoot_lang_missing:
Language missing in the list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#. Open the file ``/etc/locale.gen`` for writing.
#. Uncomment (remove leading ``#``) your language code.
For example, change ``#de_DE.UTF-8 UTF-8`` to ``de_DE.UTF-8 UTF-8``.
#. Execute the following command in a terminal:
.. code-block:: bash
sudo locale-gen
Your language (in this case German-Germany) should appear on the list.