imports.ui.status.keyboard.getInputSourceManager().inputSources[...].activate() not works
Hi!
I use shortcuts to switch keyboard layouts. Each shortcut is binded to gnome.Shell-command:
Shortcut: Ctrl + Alt + Space
Command: gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[2].activate()"
Shortcut: Shift + Space
Command: gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[1].activate()"
Shortcut: Ctrl + Space
Command: gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[0].activate()"
It worked in Ubuntu 20.04, but it doesn't work in Ubuntu 22.04.
I tested the commands with Terminal. They worked in Ubunto 20.04, but they doesn't work in 22.04.
How to fix it? I uses multiple languages and I need an ability to switch to any language directly, but not with standart switcher (standard switcher switches languages sequentially by enumeration of all languages).
Edited by Aleksandr Lebedev