4

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?

  • 1
    Did you find the solution? I have the same problem. – Anton Daneyko Feb 5 '16 at 16:58
2

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
  • 2
    The language widget does not notice changes, but setxkbmap works nevertheless. – wrwrwr Oct 26 '16 at 9:11
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.