0

In ancient times it was ~/.Xmodmap, then I learned how to tweak keyboard settings via /usr/share/X11/xkb/symbols. Now I have

  1. ibus-setup fed from /usr/share/m17n/ it seems
  2. xfce4-keyboard-settings configured by /usr/share/X11/xkb/symbols somehow

and both pretend to set up my keyboard. It seems that I get (2.) at startup but as soon as I use the ibus layout switcher (super space in my case), ibus takes over and my layout tweaks in /usr/share/X11/xkb/symbols are ignored.

Can someone explain how these two systems play together --- or not? If I only need an English layout with some hand-crafted tweaks on a few keys, may I uninstall ibus? Or should I rely solely on ibus and tweak an ibus layout?

EDIT to clarify what I am doing: I am using a using my own xkb file in /usr/share/X11/xkb/symbols with the following content

default
xkb_symbols "basic" {
  name[Group1] = "Harald Special";
  include "us"
  key <AE10> { [ 0, parenright, degree, NoSymbol] };
  key <AC01> { [ a, A, adiaeresis, Adiaeresis] };
  include "level3(ralt_switch)"
  include "ctrl(nocaps)"
};

The filename appears in xfce4-keyboard-settings but not in ibus-setup. As described here, I have not tweaked some evdev.xml, maybe this is the problem.

Harald
  • 1,170

2 Answers2

1

Comment offhand: If you only need XKB layouts, you probably don't need IBus.

OTOH:

as soon as I use the ibus layout switcher (super space in my case), ibus takes over and my layout tweaks in /usr/share/X11/xkb/symbols are ignored

That does not sound plausible to me. ibus-setup makes most of the layouts in /usr/share/X11/xkb/symbols available, and if an XKB layout is correctly tweaked somehow, the tweaks should apply even if you enable the layout via IBus.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94
  • I may indeed have not completely correctly tweaked the XKB layouts. If you could extend the answer so that it answers: "Should my own layout appear in the ibus-setup if done properly" that would be great. – Harald Dec 28 '22 at 09:33
  • @Harald: Now you are talking about your "own layout", while I was talking about modifications to an existing XKB layout. So possibly we talk past each other. If your concern is about an alternative keyboard layout with a different name, it's a bit more complicated. I'd suggest that you clarify your actual case by editing your question. – Gunnar Hjalmarsson Dec 28 '22 at 13:41
0

To make an additional XKB layout, located in /usr/share/X11/xkb/symbols, available in ibus-setup, you need to add it to this file:

/usr/share/ibus/component/simple.xml

But I still don't understand why you would need to use IBus at all.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94