How to set the keyboard layout in i3 wm system wide?

I want to use norman layout as default. It worked when I just run the command

setxkbmap -layout us -variant norman. But only worked in current session.

I add

exec setxkbmap -layout us -variant norman to i3 config and .xinitrc file

and add

setxkbmap -layout us -variant norman & to .xprofile file.

Add run command:
localectl set-x11-keymap us us norman

Add I go to the manjaro setting manjaro-settings-manager to set the layout by gui. Still not work.
I msgbox show that “keyboard layout set failed” but no other msg.

And here is my locale status:

System Locale: LANG=en_US.UTF-8
LC_NUMERIC=zh_CN.UTF-8
LC_TIME=zh_CN.UTF-8
LC_MONETARY=zh_CN.UTF-8
LC_PAPER=zh_CN.UTF-8
LC_NAME=zh_CN.UTF-8
LC_ADDRESS=zh_CN.UTF-8
LC_TELEPHONE=zh_CN.UTF-8
LC_MEASUREMENT=zh_CN.UTF-8
LC_IDENTIFICATION=zh_CN.UTF-8
VC Keymap: us
X11 Layout: us

None of them worked.

How to fix them.

I make a python script to make it but so nasty…

import os
import time

while True:
    os.system('setxkbmap -layout us -variant norman')
    time.sleep(1)

call manjaro-settings-manager from terminal and look for other errors in the terminal.

As my point 4 said, just a msgbox pop out with “keyboard layout set failed” but no other msg.

hmmm… did you try to launch it in debug mode ?

> manjaro-settings-manager -d