Looking around the internet for info on how to create a custom keyboard layout, it seems that the thing to do is to put the new keyboard mapping files in the /usr/share/X11/xkb/symbols folder and edit the /usr/share/X11/rules/base.lst and /usr/share/X11/rules/base.xml files to reference the new keyboard layouts. However, I’m worried that if I edit files that live under /usr/share then the package manager might break my configurations in a future update. Is this really the case?
According to Archwiki, there are ways to put the custom keyboard layouts somewhere in my home folder but I am getting the impression that if I do something along these lines I won’t be able to configure my keyboard layout via KDE (since it is used to looking at the configuration in /usr/share). Which would be unfortunate because I really like KDE’s keyboard layout switcher.
Summing up, how can I configure my custom keyboard layouts in a way that plays nice with both KDE and the package manager?