I had added up English(US), Belgian(alternative), Tamil Keyboard layouts using the GUI.
How do I easily switch between these three layouts from terminal?
I had added up English(US), Belgian(alternative), Tamil Keyboard layouts using the GUI.
How do I easily switch between these three layouts from terminal?
In Ubuntu 13.10, if your keyboard layouts are exactly in this order: English (US), Belgian (alternative), Tamil and:
if you have set English (US) keyboard layout, then:
to change to Belgian (alternative) keyboard layout, use:
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'be+oss'), ('xkb', 'in+tam'), ('xkb', 'us')]"
to change to Tamil keyboard layout, use:
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'in+tam'), ('xkb', 'us'), ('xkb', 'be+oss')]"
if you have set Belgian (alternative) keyboard layout, then:
to change to Tamil keyboard layout, use:
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'be+oss'), ('xkb', 'in+tam'), ('xkb', 'us')]"
to change to English (US) keyboard layout, use:
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'in+tam'), ('xkb', 'us'), ('xkb', 'be+oss')]"
if you have set Tamil keyboard layout, then:
to change to English (US) keyboard layout, use:
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'be+oss'), ('xkb', 'in+tam'), ('xkb', 'us')]"
to change to Belgian (alternative) keyboard layout, use:
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'be+oss'), ('xkb', 'in+tam')]"
Obs: These commands works only in Ubuntu 13.10 (and maybe later versions).
You can change keyboard layouts using setxkbmap. This is guaranteed to work with any version of Ubuntu. To change to us layout:
setxkbmap us
To change to tamil:
setxkbmap in+tam
to change to Belgian:
setxkbmap be+oss
The preferences will be kept until you close your session or restart the system.