I havent encounterd that problem, but i have put gum in the keyhole on one car when i was yonger. The idiot used to park his car outside our house, and often with his back end so close to our driveway that many times we had a hard time getting the car out when it had been snowing and they had plowed the street. I had enough of the idiot after leaving several messages on his windscreen explaining the problem to him. There was no reason for him not to drive the car a few meters further so he didnt block anything.
After getting both keyholdes blocked he never parked there again.
Later i chose a less destructive way to deal with that kind of problem. I simply covered their car with my snowblower so they could not use it to drive home after work.