Decoding an IR remote

I have got an IR receiver and a universal tv remote but I don't know how to decode it, so that i can use it in some other program.

I assume that all i need to do is wire up my receiver, run a program to it which when i press a button it returns a value for the key press. I might be completely wrong!! Any guidance would be much appreciated!!(or a program if you have 1)

Thank you

The IR receiver will output a pulse train that corresponds to the pulses sent by the IR transmitter. You will need to decode those pulses to work out which key has been pressed.

How do I 'DECODE' the pulse train?

Do you have a Logic Analyser? If so, it's easy as you just hook it up to the output from the IR Receiver, then you can view the pulses.

But, if you just use the Arduino to read the pulses and save them to an array, you can then get it to play back those pulses after each transmission (i.e. when it detects the signal has stopped). Each key press on your remote will give you a different set of pulses so you just need to figure out what key creates what pulse, convert that into a decimal or hex value and process it accordingly.

http://www.arduino.cc/playground/Code/InfraredReceivers
^this code works great as a starting point