Thanks for the contribution, it's now in
7a84c80d5a81.
I did briefly test it with
setxkbmap -model pc105 -layout gb since I don't know what should be used, seems okay, [#] does work as I expected on my [\] (US layout) key, thought I am not entirely sure it would work good for all United Kingdom layout keyboards.
It would be better that you could provide
setxkbmap -print, but someone with physical GB layout keyboard is more qualified to test it. Anyway, I still believe it would be fine.
Two things to add:
1. If you would create an issue next time or for further discussions, that's would be more helpful since this type of contribution is heavily involved in development and
2. (off-topic) I would advise you to get a copy of key-mon if you need to touch the files, cloning or tarball, sudo your system files are relatively dangerous, you never know when you would accidentally move, delete, or overwrite the wrong files. Codes like key-mon are totally fine to be run from any location without being installed via any package managers. Don't touch files -- excluding configuration files -- and directories that are installed and used by your system package managers, unless you are 100% sure you would not make a mistake.