"Oleh R. Nykyforchyn" nick@pu.if.ua writes:
Add alternative (alpha) code to keyboard driver in x11drv that can handle correct detection and switching of keyboard layout both with and without XKB extension. Add temporary --enable-xkb feature to configure script to enable compilation with new code instead of existing one.
You really need to get rid of these #ifdefs. If the patch is not working well enough to be enabled by default it won't go in at all. Most likely you need to split it in smaller parts that can be tested and applied separately.