Use alternative keyboard layouts
Keyboards come in hundreds of different layouts for different languages. Even for a single language, there are often multiple keyboard layouts, such as the Dvorak layout for English. You can make your keyboard behave like a keyboard with a different layout, regardless of the letters and symbols printed on the keys. This is useful if you often switch between multiple languages.
Open the Activities overview and start typing Keyboard.
Select Settings ▸ Keyboard from the results. This will open the Keyboard panel.
Click the + Add Input Source… button in the Input Sources section, select the language which is associated with the layout, then select a layout and press Add.
If there are multiple user accounts on your system, there is a separate section for the Login Screen in the Region & Language panel in the System panel.
Some rarely used keyboard layout variants are not available by default when you click the + Add Input Source… button. To make also those input sources available you can open a Terminal window and run this command:
gsettings set org.gnome.desktop.input-sources show-all-sources true
Certain languages offer some extra configuration options. You can identify those languages because they have a icon next to them in the Add an Input Source dialog. If you want to access these extra parameters, click the button next to the language in the Input Sources list and select Preferences which will give you access to the extra settings.
When you use multiple layouts, you can choose to have all windows use the same layout or to set a different layout for each window. Using a different layout for each window is useful, for example, if you’re writing an article in another language in a word processor window. Your keyboard selection will be remembered for each window as you switch between windows. Press the Options button to select how you want to manage multiple layouts.
The top bar will display a short identifier for the current layout, such as en for the standard English layout. Click the layout indicator and select the layout you want to use from the menu. If the selected language has any extra settings, they will be shown below the list of available layouts. This gives you a quick overview of your settings. You can also open an image with the current keyboard layout for reference.
The fastest way to change to another layout is by using the Input Source Keyboard Shortcuts. These shortcuts open the Input Source chooser where you can move forward and backward. By default, you can switch to the next input source with Super+Space and to the previous one with Shift+Super+Space. You can change these shortcuts in the Keyboard settings under Keyboard Shortcuts ▸ View and Customize Shortcuts ▸ Typing.