You are not logged in.

#1 2020-10-05 22:14:06

sirplatypus
Member
Registered: 2017-09-17
Posts: 25

Switching keyboard layouts with xkb options fails to affect bindings

I type primarily in Dvorak, but as is to be expected occasionally need to switch my keyboard layout to qwerty.  Currently I have used the xorg.conf.d folder for this, with the following configuration in the file 00-keyboard.conf

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,us"
        Option "XkbVariant" "dvorak,"
        Option "XkbOptions" "shift:both_capslock_cancel, caps:ctrl_modifier, grp:sclk_toggle"
EndSection

I use i3wm, and have noticed that when I push the scroll lock key to switch the bindings around, the keyboard does change to qwerty, but this fails to affect keybindings in i3 and other applications such as chrome.  However, when I use the command

setxkbmap us

the layout switches and all of the keybinds are in qwerty as they should be.  However, this disables the scroll lock binding, and to switch it back I have to open up a terminal and run

setxkbmap dvorak

to make it all work again.

Could anyone tell me why this behavior happens, and how to change it?


Learning Dvorak was entirely worth it, solely because of the looks on people’s faces when they borrow my computers.

Offline

#2 2020-10-06 06:58:43

seth
Member
Registered: 2012-09-03
Posts: 50,960

Re: Switching keyboard layouts with xkb options fails to affect bindings

https://github.com/i3/i3/issues/2686#is … -303013809
Edit: support since https://github.com/i3/i3/pull/1857

setxkbmap triggers a MappingNotify event which i3 seems to hook onto.

No idea about chrome, sorry, but it'll likely be the same problem (I assume instances of chrome work in any group they were started in?)

Last edited by seth (2020-10-06 06:59:56)

Offline

Board footer

Powered by FluxBB