6

I use 3 different languages and the standard way to switch between them one by one is not convenient (I need to remember the current language and check how many times I have to click the switch combination). In Windows I have a possibility to assign Alt+Shift+1 for English, Alt+Shift+2 for Russian, Alt+Shift+0 for Hebrew. Is this possible to configure Ubuntu 14 for the same shortcuts?

2 Answers2

3

Keyboard layout in Xorg server session can be easily changed via setxkbmap.

Usage is pretty simple. Just pass your locale as an argument for that command and your current input would be changed (works both for console apps and for UI apps):

SYNOPSIS
   setxkbmap [ args ] [ layout [ variant [ option ...  ] ] ]

The call you need is: setxkbmap us. Or you may need more options which you can grab by running setxkbmap -query while you are on some locale.

So to have your request done:

Alt+Shift+1 for English, Alt+Shift+2 for Russian, Alt+Shift+0 for Hebrew

you'd need to assign following commands to keyboard shortcuts:

  • Alt+Shift+0 : setxkbmap he
  • Alt+Shift+1 : setxkbmap us
  • Alt+Shift+2 : setxkbmap ru
Serrega
  • 491
0

As far as I know there is no such feature.

The answer I wrote to this question might help. I.e. by switching to fcitx you might use fixed shortcuts for two of the inpput methods.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94