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

How to change keyboard layout without a DE?

+0
−0

I am running X on Arch Linux without a desktop environment, only i3. Sometimes I need to switch between typing in different languages. How do I switch my keyboard layout?

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+4
−0

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 have to dig into the manual page. 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 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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »