In some applications, I have problems with the layout of my keyboard

f37 Attached is my keyboard. In some applications, I have problems with the layout of my keyboard. For example, in Chrome, the keyboard works fine and I can type for example ~ and ^. But in gnome terminal or nvim-qt, I can’t type them in. However, if switch to the terminal by alt+ctrl+fx, the keyboard is work fine and I can type ~ and ^.
Very confused, any suggestions?

Please check

LANG=C
localectl

and verify if X11 and VC have same locales active.

localectl --set-keymap MAP [MAP] (check man localectl)

Thank you.
Here is my current status.

$ localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: jp-OADG109A
X11 Layout: us,jp
X11 Model: apple
X11 Variant: mac

I’ll try to modify it. thank you very much.

So if you just want to change the key-maps independent try:

localectl set-x11-keymap [your-key-map] #setting just x11 keymap

localectl set-keymap [your-key-map] #setting your VC Keymap

1 Like

Thank you very much.
I switch to KDE desktop and solved this problem.