I'm trying to set up my keyboard, but I have issues when setting two options at once:
➜ swaymsg input 1133:16399:Logitech_K750 xkb_options caps:escape
➜ swaymsg input 1:1:AT_Translated_Set_2_keyboard xkb_options altwin:swap_lalt_lwin,caps:escape
Error: Unknown/invalid command 'caps:escape'
The latter options are actually copy-pasted from the docs, so I've no idea why they don't work.
Setting _only_ caps or _only_ the other option works, but not both.
(Note that I'm not swaping win/alt on my external keyboard since the keys are actually aligned the way I prefer them).
➜ swaymsg -v
swaymsg version 1.4
You need to quote the part after xkb_options, otherwise sway interprets the part after the comma as the beginning of a new command.
Nope, doesn't look like an escaping issue (no spacing or special characters here anyway). Adding quotes didn't help here.
swaymsg 'input 1:1:AT_Translated_Set_2_keyboard xkb_options "altwin:swap_lalt_lwin,caps:escape"'
I tested this with the comma but different values. It works when using both quotes.
For i3 compatibility, an unescaped , can be used to execute multiple commands on the same line. Since the shell strips one level of quotes, double-quotes are required.
And, I would not have figured that out on my own. I appreciate your help!
Most helpful comment
For i3 compatibility, an unescaped
,can be used to execute multiple commands on the same line. Since the shell strips one level of quotes, double-quotes are required.