Sway: Setting multiple input options with xkb_options

Created on 14 May 2019  路  6Comments  路  Source: swaywm/sway

  • Sway Version:

sway version 1.1-rc2 (May 12 2019, branch 'HEAD')

  • Debug Log:

sway debug log

  • Configuration File:

input "1452:597:Vinpok_Taptek" {
xkb_options altwin:swap_lalt_lwin
xkb_options ctrl:ralt_rctrl
}

It seems not possible to specify two xkb options in sway. In this case, only the first option is applied. I also tried to change the lines to:

xkb_options "altwin:swap_lalt_lwin;xkb_options ctrl:ralt_rctrl"

but that doesn't seem to work either. I tested with a bluetooth keyboard, and with my laptop keyboard as well. On the laptop, only the second command is applied.

Most helpful comment

Try the following (comma separated not space separated):

input "1452:597:Vinpok_Taptek" {
    xkb_options "altwin:swap_lalt_lwin,ctrl:ralt_rctrl"
}

As for using multiple xkb_options lines, the value will be replaced not appended, which is why you are seeing the command one being applied

All 6 comments

Just realizing that this might be closely related to #4151 , even though I am running a more recent version of sway.

Try the following (comma separated not space separated):

input "1452:597:Vinpok_Taptek" {
    xkb_options "altwin:swap_lalt_lwin,ctrl:ralt_rctrl"
}

As for using multiple xkb_options lines, the value will be replaced not appended, which is why you are seeing the command one being applied

Thanks, that solved it.

This does not work for me. I tried to swap caps with esc and change layout with physical esc button (that is caps now):

input * xkb_layout "us,ru"
input * xkb_options "caps:swapescape,grp:caps_toggle"

This config only swaps caps and escape and does not append second option

Sway version: 1.2

These two options don't work together. You can't map Caps Lock to Esc and then expect Caps Lock to toggle the layout.

So I have to find some workaroud. Ok. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yannick picture yannick  路  34Comments

ddevault picture ddevault  路  30Comments

ghost picture ghost  路  36Comments

Ogromny picture Ogromny  路  144Comments

cg9999 picture cg9999  路  48Comments