Nice of you to keep the same format as the original.
Unfortunately keynav doesn't seem to be working all that well in Ubuntu 20.20, I am a bit interested in fixing this somehow.
The LD_PRELOAD approach might be a good idea actually.
I do have some further ideas on how to do this and some practical use cases as well.