How to program the "TV-part" of a Yamaha V465 receiver remote

When I got my brothers old TV a little while back we were using the remote for the TV-decoder to turn the TV on and off. Since we now longer have a TV-decoder I need to program the AV-receiver remote instead. The Yamaha RX-V465 AV-receiver have buttons to control the TV at the bottom, but no information about how to program them in the manual. After a bit of googling I found the answer on

  1. Press the CODE SET
  2. Then choose [A] or [b] from the Input selection keys
  3. Enter the code for your TV

If everything worked out the Transmit light should blink twice.

Update 2019-11-30:

I’ve recently had to redo this after we changed the TV. And again I had to find the manual for the receiver, and for future reference here is the Yamaha V465 receiver manual.