My thinkpad has got a few of its keys damaged, and I have been trying a permanent workaround for it. I tried using xmodmap which could set the F9 key to the letter "L" (small/caps based on whether or not Shift is pressed) but it couldn't persist beyond a reboot. Permanent xmodmap in Ubuntu 13.04 says that there's a different way to do this for 16.04 as xmodmap has to be manually loaded after every boot.
However, I realised that F9 could be an important function key at certain situations, so I want to set up something like AltGr+- == l and Shift+AltGr+- == L. I couldn't figure out a way to do this with the above link. Would be really helpful if someone could help me out, I'm a complete beginner. It's really tiring to click on OnBoard every single time.