You are not logged in.

#1 2024-10-08 19:56:51

mactemporal
Member
Registered: 2023-07-08
Posts: 4

sxhkd seems to consider two keyboard layouts at the same time

Pretty exotic problem here...

At the top of my .xinitrc file I got :

setxkbmap -option compose:menu
setxkbmap fr,fr oss,ergol grp:alt_caps_toggle,grp_led:scroll

To load fr-oss and fr-ergol and switcing between the two with Alt + CapsLock

So for example :
Super + W closes the selected window (I'm using BSPWM) according to the config :

super + {_,shift + }w
	bspc node -{c,k}

W being at the place of the T in fr-ergol : pressing Super + T closes the window just as Super + W does to.

This works for each of the keys configured in sxhkdrc.

Does anyone has any clue? And thank you for your time!

Last edited by mactemporal (2024-10-08 19:59:01)

Offline

#2 2024-10-08 21:32:51

seth
Member
Registered: 2012-09-03
Posts: 60,000

Re: sxhkd seems to consider two keyboard layouts at the same time

Does super+w also work in the ergol layout (so the key that produces a "w" there)

Generally https://tronche.com/gui/x/xlib/input/XGrabKey.html grabs a keycode, not a symbol and the keycode won't change w/ the layout.
sxhkd would have to react to the layout change and reload itself w/ the new keymap.

Offline

#3 2024-10-09 21:03:52

mactemporal
Member
Registered: 2023-07-08
Posts: 4

Re: sxhkd seems to consider two keyboard layouts at the same time

Thank you for your answer.
super+w indeed also works in the ergol layout.

Offline

#4 2024-10-09 21:50:08

seth
Member
Registered: 2012-09-03
Posts: 60,000

Re: sxhkd seems to consider two keyboard layouts at the same time

https://github.com/baskerville/sxhkd/issues/291
https://github.com/baskerville/sxhkd/bl … hkd.c#L273
Maybe the cleanup doesn't work properly (eg. because it's operating along the already changed keymap for the grab release)

Offline

#5 2024-10-11 17:31:40

mactemporal
Member
Registered: 2023-07-08
Posts: 4

Re: sxhkd seems to consider two keyboard layouts at the same time

If the solution is just to set one keyboard layout, so be it. This is so strange that it's doing that...
Thank you very much nonetheless!
(and sorry to the poor fellow with the same problem as me...)

Offline

#6 2024-10-13 20:46:43

seth
Member
Registered: 2012-09-03
Posts: 60,000

Re: sxhkd seems to consider two keyboard layouts at the same time

Offline

Board footer

Powered by FluxBB