engstrand-config / dwl-guile

Dynamic tiling Wayland compositor configurable in Guile Scheme, based on dwl and libguile - now with a REPL!
Other
100 stars 5 forks source link

set-keys does not respect keboard layout #44

Open KjartanOli opened 3 months ago

KjartanOli commented 3 months ago

I use a dvorak layout. To be specific my set-xkb-rules looks like this:

(set-xkb-rules '((layout . "is")
                 (variant . "dvorak")
                 (options . "ctrl:swapcaps")))

This works fine when typing, but my keybindings don't work. As an example, I have the following set-keys call in my config:

(set-keys "s-e" '(dwl:spawn "/gnu/store/m222s1gsbl0vvnsfsppx9y4g2fvbh2j0-emacs-next-pgtk-xwidgets-30.0.50-2.170c655/bin/emacs" "-q"))

However, pressing the key I would use to type e, which is d on my physical keyboard's qwerty layout does nothing, but pressing the physical e key starts Emacs.

Frewacom commented 3 months ago

I think this is caused by dwl-guile using keycodes instead of keysyms for keybindings, which essentially causes it to ignore your keyboard layout.

The best way solve this would probably be to add an option that allow you to choose if keycodes or keysyms should be used for keybindings.