In this guide, a method to change the layout of a keyboard according to our keyboard has been discussed using the graphical user interface as well as the command-line interface.
How to change the keyboard layout using the graphical user interface in Raspberry Pi
The most convenient method that is understandable by all the users is a graphical user interface, click on the Applications menu and a drop-down menu will be opened, choose the “Preferences”, and then click on the “Mouse and Keyboard Settings”:
Click on the “Keyboard Layout…”:
There are three options will be available to select the keyboard according to its model, the layout of the keyboard, and the variant of the keyboard:
If you want to select the keyboard model, click on the model and a list of different models of keyboards will be appeared, choose the model of keyboard you are using:
Else select the layout of the keyboard by choosing the layout of keyboard in the appeared list when you click on the “Layout”:
And the last option is to select the variant of the keyboard:
When all the settings of the keyboard layout are done, then save the settings by clicking on the “OK” button:
Again click on the “OK” button and the settings have been saved.
How to change keyboard layout using the command-line method on Raspberry Pi
Another method to change the keyboard layout is through the command-line interface, for which you have to launch the terminal of Raspberry Pi OS, and then run the command mentioned below to open the configuration menu of Raspberry Pi:
In the menu appeared, navigate to the “Localisation Options”:
Then select the “Keyboard” option:
Next, select the configuration of the Keyboard:
Now select the layout of the keyboard you want to use:
A message about the AltGr key has been displayed(Alt Graphic is the key present on some specific keyboards to type some specific symbols), read it and then select “Ok” button to proceed on next step:
Choose the AltGr according to your keyboard and click on “Ok”:
Another message will be appeared about the Compose key, click “Ok” after reading the message:
Choose the configuration of the “Compose key” according to the keyboard you are using:
Click on the “Yes” to use the CTRL+ALT+ESC to terminate the X server:
After setting the configuration of the laptop, select the “Finish” option and press Enter:
Conclusion
Keyboard layout is different in different regions of the world according to the languages of different regions. To change the keyboard layout according to the keyboard you are using with Raspberry Pi OS, two methods have been explained in detail in this guide.