Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

75%
+4 −0
Q&A How to change keyboard layout without a DE?

According to the keyboard layout wiki, keyboard configurations (for both the console and Xorg) can be conveniently set using the localectl command. In order to set a second keyboard layout, we hav...

posted 10mo ago by mr Tsjolder‭

Answer
#1: Initial revision by user avatar mr Tsjolder‭ · 2023-07-31T07:28:10Z (10 months ago)
According to the [keyboard layout wiki](https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration), keyboard configurations (for both the console and Xorg) can be conveniently set using the `localectl` command.

In order to set a second keyboard layout, we have to dig into the [manual page](https://man.archlinux.org/man/localectl.1).
There it is stated that a second layout (for the console) can be set up by specifying a _"toggle keymap"_.
Concretely, you can set a second keyboard layout for your console:
```
localectl set-keymap KEYMAP1 KEYMAP2
```
This will also set `KEYMAP1` as the Xorg layout.

If you only need multiple keyboard layouts in your GUI, it should suffice to set the Xorg keymap using a comma-separated list of layouts using
```
localectl set-x11-keymap KEYMAP1,KEYMAP2
```
Additional arguments can be used to specify models and/or variants.
See the [xorg keyboard wiki](https://wiki.archlinux.org/title/Xorg/Keyboard_configuration) for further details.
This will also set `KEYMAP1` as the console layout.

Note that if you want to have both, you will have to use both `localectl` commands and specify `--no-convert` for the second command.
Otherwise, the settings from the first command will be overwritten.