David Johnson-Davies published another great and detailed tutorial on how to build an IR remote control detective. He writes:
The IR Remote Control Detective decodes the signal from several common types of infrared remote control, such as audio, TV, and hobbyist remote controls. To use it you point a remote control at the receiver and press a key; it will then identify the protocol, and display the address and command corresponding to the key.
IR Remote Control Detective based on ATtiny85 – [Link]