I’d recommend taking a look at my last post, linked below. It will take some work for you to do the same, but it’s probably all that will work. I also had to use Karabiner recently to get F4 to work right; you might be able to use it as a work-around that is simpler than hacking plists.
-Zach