My problem is that I need to automatically change the keyboard layout in the program, regardless of the desktop environment such GNOME, Plasma, KDE, Cinnamon, Mate, Xfce and another . I used such solution methods as
dbus
, ibus
, gsettings
, xmodmap
and dconf
. On KDE it turned out through dbus
Code: Select all
qdbus org.kde.keyboard /Layouts org.kde.KeyboardLayouts.switchToNextLayout
xmodmap
in GNOME too. After running xmodmap
it impossible to use key combination to change the layout. When using ibus
the layout of the ibus
keyboard changes, but the layout of the working enviroment does not change.I want to find a simple platform-independent solution, but if it is not possible then using api c or
dbus
api. Thank you in advance for the answer.If solution doesnt exist please tell me how I can get current key combination for switch layouts on different desktop environments.
System:
Debian x86_64
X11: GNOME, Plasma, Cinnamon, Mate, Xfce
P.S. Doesnt work:
Code: Select all
gsettings set org.gnome.desktop.input-sources current 1