In Windows it is possible to arrange your keyboard layouts in 2 levels as following:
- 1. English:
- 1.1. English US
- 1.2. English UK
- 2. German
And you are able to:
-
a) switch directly between 1. and 2. using Alt+Shift.
-
b) switch directly between 1.1. and 1.2. using Ctrl+Shift (when 1. is chosen).
How can I arrange the same setup in Ubuntu if is it possible?
Thank you for your help in advance!
Best Answer
There are many shortcuts to choose to switch between keyboard layouts, but none fits with what you want.
Anyway, it can be done using some tricks.
a) Switch directly between English (English US, English UK) and German
First, create the script, let's call it
change_layouts
:Save the script in your
~/bin
directory and don't forget to make it executable:Now you can test the script in terminal. Run it more times to see how it works.
Second, add a custom shortcut for this script. Go to System Setting → Keyboard → Shortcuts → Custom Shortcuts and follow the instructions from the below image:
For some reasons, at least in my case, if I set the Alt+Shift shortcut, this will not run the script. Maybe this is a bug. But there are many other choices, like Alt+Shift+1.
b) Switch directly between English US and English UK (when English is chosen)
Go to System Setting → Keyboard Layout → Options → Key(s) to change layout and tick Ctrl+Shift:
Related: