DIRECTV HD DVR/Receiver Discussion
Will this do what you want?
From the manual:
Verifying the Codes
Once you have set up the DIRECTV Universal Remote
Control using the above steps, use the following
instructions to find out the 5-digit code to which your
component responded:
1. Slide the MODE switch to the appropriate position...