evdev: do not disallow custom rule file
I'm using the evdev driver (Linux).
In the process of customizing my keyboard layout, I need to create a custom key type. The modular nature of xkb allows me to create, say, xkb/types/mytype and then use it in xkb/symbols/mysymbols. Elegant.
Except, I can't. And the reason - as I understand it - is that in xorg.conf I can only specify "XkbLayout", "XkbVariant" and "XkbOptions", which are then used by X to look up the appropriate types (and compat, and geometry) as well as symbols according to kxb/rules/evdev - BUT, I can't override those rules (well, I can edit the file- but then every time my distro updates xorg, I lose my changes).
Took me a few days to come to the painful conclusion that Xkb can't be extended or customized beyond what is offered by the stock files (also see: https://medium.com/@daniel.jozsef/the-bazaar-with-landmines-or-how-to-extend-xkb-the-right-way-b82de59a1f9a)
It was traditionally possible to specify "XkbRules" (probably with other input drivers?), but the evdev driver disallows that (https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/blob/master/src/evdev.c, function `EvdevAddKeyClass(), line 1152: /* sorry, no rules change allowed for you */).
I don't understand why.
I can use "xkbcomp -rules /path/to/my/rules" and I can also add a custom key type (or geometry, or compat) by compiling a keymap with xkbcomp, but that's impractical for me, and I'd rather configure the system-wide xorg.conf. The only way to do that from xorg.conf would be to override the rules, but I can't.
Would it be possible for the evdev driver to default to kxb/rules/evdev, but allow (or rather, "not disallow") one to specify their own rules with "Option XKbRules" ?