I had the similar issue with my old E90 330i. In my case a lighter went inside the vent under driver seat. I admit this is not so problematic as key fob, but similarly annoying. The knocking in the vent was driving me nuts!
This is how I solved the issue: I took a wire and made a small hook at the end. Then I went to deserted road. I accelerated hard from stand still to move the lighter as far back (to the exit) of the vent as possible. After that I stopped really gently.
Latter I used the wire and and hooked it out of the vent.
Thanks for reminding me I need to put some net on the vents to prevent this happening on my M3