Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-20-2021, 06:38 AM
|
#1
|
Member
Registered: Jan 2004
Posts: 539
Rep:
|
How to change between three kyboard layouts with keys?
I am writing some article and use three keyboard layouts English, pashto and persian and i use the gedit in arch linux, i want to use key combinations to switch between these three layouts for speed of work, after search i come to use setxkbmap for this purpose, when i run the command:
Code:
sudo setxkbmap -layout af
it cannot change the keyboard layout for the gedit and libreoffice writer and can change for firefox, arch Text Editor and brackets.
How to change the layout for all applications?
|
|
|
01-20-2021, 07:29 AM
|
#2
|
Senior Member
Registered: Mar 2020
Posts: 3,706
Rep: 
|
|
|
|
01-20-2021, 08:18 AM
|
#3
|
Member
Registered: Jan 2004
Posts: 539
Original Poster
Rep:
|
I read the article and first run this command:
Code:
setxkbmap -layout us,af,ir -option grp:alt_shift_toggle
The command create the file /etc/X11/xorg.conf.d/00-keyboard.conf:
Code:
# instruct systemd-localed to update it.
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,af,ir"
Option "XkbModel" "grp:alt_shift_toggle"
EndSection
But cannot change the keyboard layout to any of them with the alt+shift, then use this command:
Code:
sudo localectl --no-convert set-x11-keymap us,af,ir grp:alt_shift_toggle
Also did not work.
|
|
|
01-20-2021, 11:07 AM
|
#4
|
Senior Member
Registered: Jul 2020
Posts: 1,516
|
Never had to use multiple keyboard layouts without a GUI and so don't know how to set it up via command line, but it definitely can be done via GUI setup e.g. in KDE open settings, go to hadrware-input devices-keyboard-layouts, click on 'shortcut' beside each of the layouts and pick one.
|
|
|
01-20-2021, 11:14 AM
|
#5
|
LQ Veteran
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,243
|
Why do you want to use the command line when you have a GUI? You can have a button on the panel for selecting the layout and indicating the current one; some desktops create that automatically if you set up your keyboards with their configuration tool. That tool will also allow you to nominate a group-shift key to toggle drivers — I use Scroll Lock. You can also decide what switching keyboards does — global change, change in the current application, or change in the currently active screen. I too have three drivers, but I leave it to Xfce to do the donkey work — that's what GUIs are for.
|
|
|
All times are GMT -5. The time now is 12:52 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|