I forget the movie, but a similar idea was used with invisible ink to get into a room with a keypad entry. Something to the effect of, it was a 5-digit code and only 4 numbers were touched. So, they had to figure out which number was pressed twice.
I think this would be fun to test in a real-world physical pen test. Especially if you know ahead of time the target building has a few entry points with keypad locks. But pragmatically speaking, I don't see this working well in real life on a keyboard. This is something to keep in mind though as they develop new products with heat resistant absorbing features for highly secure environments.