You are not logged in.

#1 2025-07-03 15:47:54

Aipathon
Member
Registered: 2025-06-04
Posts: 5

How to change the keyboard layout using i3

So i recently tried to finally get myself a good sway rice for my system, unfortunately i can not change the keyboard layout. I use the standard "de" (german) layout. It is set globally when running localectl i get this output (running localectl from sway gives the same output):

System Locale: LANG=de_DE.UTF-8
    VC Keymap: de
   X11 Layout: de
    X11 Model: pc105
  X11 Variant: nodeadkeys

However sway still uses the british/american layout. So i tried forcing it to use my desired layout by adding exec --no-startup-id setxkbmap -layout de to my config file. I also tried adding exec "setxkbmap -layout de" instead. Still even after refreshing it Sway does not use my specified keyboard layout. How can I change this?

Last edited by Aipathon (2025-07-03 15:48:12)

Offline

#2 2025-07-03 16:38:59

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,369

Re: How to change the keyboard layout using i3

How to change the keyboard layout using i3
However sway still uses the british/american layout.

So which one is it? For sway see https://wiki.archlinux.org/title/Sway#Keymap

Offline

#3 2025-07-03 17:02:51

Aipathon
Member
Registered: 2025-06-04
Posts: 5

Re: How to change the keyboard layout using i3

seth wrote:

How to change the keyboard layout using i3
However sway still uses the british/american layout.

So which one is it? For sway see https://wiki.archlinux.org/title/Sway#Keymap

So I replaced what i had with the suggestion from the wiki and adjusted it:

input * {
    xkb_layout "de"
    xkb_variant "nodeadkeys"
    xkb_options "grp:win_space_toggle"
}

input <identifier> xkb_model "pc101"

Now I get the Error "xkb_layout "us,se" failed to compile keymap: [XKB-661] Couldnt process include statement for us(nodeadkeys)"

Offline

#4 2025-07-03 17:08:25

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,369

Re: How to change the keyboard layout using i3

Where did you "replace" that?
Your previous posts concerned vconsole.conf and /etc/X11/xorg.conf.d/00-keyboard.conf

However, even if you edited the correct file, the "<identifier>" there is a placeholder.

swaymsg -t get_inputs

and maybe read the rest of the wiki, or at least the input related stuff.

Offline

#5 2025-07-03 21:01:39

Aipathon
Member
Registered: 2025-06-04
Posts: 5

Re: How to change the keyboard layout using i3

seth wrote:

Where did you "replace" that?
Your previous posts concerned vconsole.conf and /etc/X11/xorg.conf.d/00-keyboard.conf

However, even if you edited the correct file, the "<identifier>" there is a placeholder.

swaymsg -t get_inputs

and maybe read the rest of the wiki, or at least the input related stuff.

Im referring to the sway config file in my .config directory. Maybe should have specified that.

Offline

#6 2025-07-03 21:06:11

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,369

Re: How to change the keyboard layout using i3

key, problem remains "<identifier>" is a placeholder, you cannot use that there literally.

Offline

#7 2025-07-04 16:46:23

Aipathon
Member
Registered: 2025-06-04
Posts: 5

Re: How to change the keyboard layout using i3

seth wrote:

key, problem remains "<identifier>" is a placeholder, you cannot use that there literally.

Where is there an "identifier" in my provided config file excerpt.

Offline

#8 2025-07-04 18:19:14

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,369

Re: How to change the keyboard layout using i3

you wrote:

input * {
    xkb_layout "de"
    xkb_variant "nodeadkeys"
    xkb_options "grp:win_space_toggle"
}

input <identifier> xkb_model "pc101"

Also don't post excerpts, post the actual file - cause the error mentions "us,se" and that shows up nowhere in your "excerpt".

Please read  https://bbs.archlinux.org/viewtopic.php?id=57855 before you continue.

Offline

Board footer

Powered by FluxBB