Command to switch to a specific keyboard layout?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
lolmaus

Command to switch to a specific keyboard layout?

Post by lolmaus »

Hi!

I'm on Linux Mint 19 Tara, Cinnamon, 64-bit.

What is the command to switch to a specific keyboard layout?

These don't work:

Code: Select all

gsettings set org.gnome.desktop.input-sources current 1

Code: Select all

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()"
This does work:

Code: Select all

setxkbmap us
but it crashes the Cinnamon keyboard layout manager: the tray icon disappears and it is no longer possible to switch via configured hotkey.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Beginner Questions”