swaymsg input type:keyboard xkb_layout "de"
Change the keyboard layout in SwayPublished: 23.08.2023 | 65 Words | 1 minutes
The default keyboard layout for Sway is the "us"(American) one. Personally I often use keyboards with different layouts ("fi" or "de"). After connecting a new keyboard the layout needs to be changed. This command will switch to a german layout.
I do also like to remap the "CAPS" key to be an additonal "ESC" key.
swaymsg input type:keyboard xkb_options caps:escape