0

I am trying to get this layout working Should I put something in /etc/sway/inputs/default-keyboard ?

I tried to get the information with man 5 sway-input and swaymsg -t get_inputs but it did not help. I am not even sure which configuration file the doc refers to. I am tired of wasting my time on this issue and would really love some help

EDIT: My solution, even if I accepted the answer one that helped me the most:

In the file /etc/sway/inputs/default-keyboard

Add the following block

input type:keyboard {
    xkb_layout us
    xkb_variant intl
}

2 Answers 2

2

The configuration file referenced by man 5 sway-input is the sway configuration file in ~/.config/sway/config or ~/.sway/config or other allowed locations. You can find the default configuration in /etc/sway/config.

To set your chosen layout(s) it should be enough to add something similar to this in the configuration:

input type:keyboard {
  xkb_layout fr,us # two layouts
  xkb_variant oss,intl # their respective variants
  xkb_options grp:sclk_toggle # toggle between layouts with the scroll-lock button
  xkb_numlock enabled # enable numlock when logging in
}

You can find the codes for all layouts, variants and toggle keys listed in man xkeyboard-config.

1

Which distro are you using? At least on Debian-based distros, the keyboard is controlled by /etc/default/keyboard.

See the keyboard(5) man page for more information: Link

2
  • Thanks for answering, I use manjaro a community edition with wayland and sway. It was a very bad choice. Apparently here it is in /etc/sway/inputs/default-keyboard
    – zakrapovic
    May 11, 2022 at 14:21
  • I couldn t find a solution in the doc
    – zakrapovic
    Jun 10, 2022 at 8:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .