Sway: Error: Unknown/invalid command 'caps:escape'

Created on 24 Feb 2020  Â·  5Comments  Â·  Source: swaywm/sway

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

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.

All 5 comments

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marcoms picture marcoms  Â·  3Comments

RyanDwyer picture RyanDwyer  Â·  3Comments

jakubn551 picture jakubn551  Â·  4Comments

mcmfb picture mcmfb  Â·  3Comments

cauebs picture cauebs  Â·  3Comments