Sunday, May 12, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 567  / 3 Years ago, tue, august 24, 2021, 11:02:22

I use alt-shift to switch between keyboard layouts in Ubuntu 14.04. I have 3 languages enabled, but I use one of them much less often.



How could I make alt-shift skip the rarely used language(s)?


More From » keyboard-layout

 Answers
1

How could I make alt-shift skip the rarely used language(s)?




I would assume you can not. The system does not count keyboard lay-outs used to determine how often it is used.



Then again it becomes possible if you change the question to ....




How could I skip the rarely used language(s)?




Then the answer would be: by using another key combination and change that key combination to switch between the 2 lay-outs you do want to switch between.



Lay-outs are numbered from 0. So the 1st and 2nd lay-out are activated with respectively...



$ gsettings set org.gnome.desktop.input-sources current 0
$ gsettings set org.gnome.desktop.input-sources current 1


(or "2" if you, in your case, need the 3rd keyboard).



This will take up 2 keys though: you can add one to a key like control + P and the other to control + O. If you want this to be one key you would need to change the 0 in



$ gsettings set org.gnome.desktop.input-sources current 0


to a variable that toggles the 0 to a 1 and a 1 to a 0.






That would be this command:



gsettings set org.gnome.desktop.input-sources current $(($(gsettings get org.gnome.desktop.input-sources sources | grep -Po "'[[:alpha:]]+')" | wc -l)-1))


This would allow you to use 1 key and make it a toggle.






Refer to How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?) on how to set this. Tweak tools and compiz action plugin would be 2 methods on setting those.


[#22380] Wednesday, August 25, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hical

Total Points: 498
Total Questions: 106
Total Answers: 117

Location: Comoros
Member since Tue, Mar 14, 2023
1 Year ago
;