Certain Lenovo Function Keys Not Working: Solved
UPDATE: Too good to be true :(
Now the same function keys on my laptop stopped working again, and this trick isn't helping.
The Short Answer
Plug in Lenovo USB ThinkPad keyboard and press Fn+Esc to toggle function lock. Then do the same on your laptop keyboard and make sure they are in sync.
Background
I have a Lenovo ThinkPad P50 laptop, and I use a ThinkPad Wired USB Keyboard with TrackPoint so that I can elevate my laptop on a stand while having a keyboard on the surface of my desk.
Some months ago, certain function (Fn) keys stopped working, on both the laptop keyboard and the attached USB keyboard. So I knew it was a software issue, not a hardware problem with the keys. I tried updating drivers, rebooting, detaching the USB keyboard — all the usual stuff. I updated BIOS, just in case. Nothing helped, and I eventually gave up on being able to use those function keys.
This was super frustrating. My F5 key didn't work, for example, but my F6 key did. The Lenovo hotkeys for decreasing brightness and increasing brightness are tied to F5 and F6 respectively, so I was able to increase the brightness of my screen with a hotkey, but to decrease brightness I had to open the Windows "Change brightness level" UI.
Today, I randomly decided to toggle function lock (FnLk) on my USB keyboard, by pressing Fn + Esc. The onscreen indicator confirmed that function lock was enabled. I noticed that the function lock light was not lit up on my laptop keyboard, so I used Fn + Esc on my laptop keyboard to toggle function lock, and again made sure that it was enabled.
Weirdly, this fixed my problem! I'm now able to use all my function keys again.