I’m playing with Aurora on an ex-Chromebook but have the same issue as you. I’ve got the script to work by manually installing keyd which seems to persist between reboots (but I haven’t tried an update yet):
git clone https://github.com/rvaiya/keyd
cd keyd
make
sudo make install
This sticks it in /usr/local/bin/keyd
Then if you change /usr/bin/keyd in the script to /usr/local/bin/key (line 40 at the time of writing) you can execute it as normal.
However rebooting seems to remove the systemd service that the script creates so you have to run it again. This is not the right way to do things in a ostree-based distro like Bluefin/Aurora, but I am quite new to this so I’m not sure the right way to more-or-less sideload services like this. I’m hoping someone else can reply…should I be making a flatpak or something?
edit: I’ve been doing some reading on this and I’m thinking I might need to build a Chromebook version of the image. It could be a useful thing to exist for other users anyway, but it seems a lot of work for a keyboard script.
edit2: There’s an “Input Remapper” application that comes with Aurora (and I assume Bluefin?) which can do this kind of thing, I can’t believe I didn’t spot it before!
edit3: The remapper tool works but I can’t get it to apply the remapping on startup/login at least not for Aurora, maybe it works in Bluefin because it’s a GTK app? I’ll raise a bug report tomorrow.