I can not set up short key for language switching

On ubuntu I have set command ctrl+3 - ua ctrl+2-ru ctrl+1 - english
I use custom shortkey and command gsettings set org.gnome.desktop.input-sources current 0
0 - index language
but this command does not work on ubuntu mate

Hi @1116,

I've done some hotkeys for gsettings like Pluma wrapping but unfamiliar with setting input sources. So here's some general help.

  1. Are the gsettings commands correct? Do they work in a terminal?
  2. Are the Ctrl+1,2,3 working ok? Can those hotkeys be used for other things in all your language settings? Try something simple like launching pluma.

The dconf Editor can be a nice feedback if the value is actually getting set. It responds in real time.
Applications -> System Tools -> dconf Editor and here is my unpopulated values:

I set some hotkeys to Ctrl+1, Ctrl+2 and Ctrl+3 to make sure they're available in my English environment.

I need terminal’s command for switching languages. Do you know this command?

I mean command for switching keyboard layout

  • command 1 - english
  • command 2 - russian
  • command 3 - ukraine

They are the same commands placed in the hotkey. Your original post had it correct.

For English (shortcut Ctrl+1):
gsettings set org.gnome.desktop.input-sources current 0

For Russian (shortcut Ctrl+2):
gsettings set org.gnome.desktop.input-sources current 1

For Ukraine (shortcut Ctrl+3):
gsettings set org.gnome.desktop.input-sources current 2

Unlike my picture of dconf Editor above, you should see your language settings listed under sources. My picture has no values to switch to.

@1116, I'm at my limit of experience. I'm unfamiliar with multi-language support. Anyone know if these dconf settings are still valid?

When you run Applications -> System Tools -> dconf Editor
and navigate the tree to org.gnome.desktop.input-sources.

Do you see entries in sources? Mine is blank:

It should have a list of keyboard layouts but I'm unable to confirm this. In a virtual machine, I attempted to load Russian and Ukraine languages and keyboards but unable to get this list.

Without this list, the commands could never work, if I read this right. Do you have a list in your system?

No! I don`t have list only [] like you. But I have three language in layout :
en - english
ru - russian
ua - ukrainian

Why did not list be filled automatically when I added this languages in a layout?
Can I manually filled this list and How can I do it?

Hi @1116, I'm trying to learn something and getting confused. :confused: I suspect I don''t understand the difference between switching a keyboard layout and switching an input method.

I'm playing with a virtual machine of Ubuntu-Mate 16.04 and discovered how to switch keyboard layouts with a key stroke. It switches per-application very nicely. I'm using the very last one in the list: Win Key+Space

Does this help what you're trying to do?

And no, adding these did not put anything in that dconf list.

Thank you for response @Bill_MI . But seriatim switching of language does not fit me. I need appropriate keyboard shortcut for some languages layout because I have three layout languages.

commands
setxkbmap -layout ua
setxkbmap -layout en
setxkbmap -layout ru

It is what I need!