Create and activate a new keyboard layout, but place files outside of /usr/share/X11

Solution 1:

I don't think it's possible to do what you want. There are a few possible approaches which are described in answers to other questions.

As regards a .deb file, one way is to write a patch with your customizations and build your own xkb-data package from a custom xkeyboard-config source.

In this PPA you find an example of patching xkeyboard-config including the exact debdiff compared to the source in the Ubuntu archive.

Solution 2:

You can compile a modified configuration. I did a similar thing here: https://askubuntu.com/a/794087/514921.

Basically the idea is to print the existing configuration, add references to your local additions via e.g. sed, and compile the result. Do this in a script that is run at login. None of the commands require root access.