1

I have a working keyboard setup in my .xkbmap and make it active by xkbcomp $HOME/.xkbmap $DISPLAY. But it suddenly stopped working. Somehow it does not change keyboard settings. I am totally confused.

I am using Debian/testing with Gnome.

ofenerci
  • 165
  • 6
  • xkbcomp is not working with gdm3 but it works with lightdm. – ofenerci Aug 31 '17 at 17:25
  • Isn't this the [same question](https://unix.stackexchange.com/q/389471/117549)? – Jeff Schaller Aug 31 '17 at 17:31
  • nope! Now it is not working at all. In the previous question, it was working for a while. – ofenerci Aug 31 '17 at 17:33
  • 1
    so the previous question should be closed? – Jeff Schaller Aug 31 '17 at 17:35
  • I think previous question is about suddenly xkbcomp stop working after some time. But this question is now that it is not working at all. I know that xmodmap doesn't work with Xwayland. But it is strange that xkbcomp doesn't work either. – ofenerci Aug 31 '17 at 17:39
  • it just seems to me that if it's not working at all, then we don't have a hope of answering the previous question. – Jeff Schaller Aug 31 '17 at 17:43
  • Sure we could close that one. Maybe there was a problem due to my recent upgrade to xwayland. – ofenerci Aug 31 '17 at 17:44
  • I am not sure but xkbcomp may not working in Wayland as in Xorg. (so xmodmap and xkbcomp are useless to change the keyboard in Wayland.) – ofenerci Aug 31 '17 at 18:03
  • 1
    If you're using wayland, you may want to use that tag instead of x11 -- people may search by tags and miss yours if it's not tagged correctly. – Jeff Schaller Aug 31 '17 at 18:23

1 Answers1

1

It's really helpfully in questions if instead of "suddenly it stopped working" you actually describe the circumstances, as an "after my recent upgrade to xwayland".

While Wayland uses xkb, it works in a different way from X, and details depend on the compositor.

So if you are doing xkbcomp $HOME/.xkbmap $DISPLAY, xkbmap uses the X protocol to contact XWayland, which promptly ignores it because there's no way to change keyboard mappings in Wayland proper while running. So your upgrade to XWayland broke things (which is not really surprising, considering they are completely differet systems), and it didn't "suddenly stopped working".

This question explains how to customise your keyboard mappings with wayland. Basically you need to change (or better: add to) the system XKB database.

dirkt
  • 31,679
  • 3
  • 40
  • 73