Point remote at your tv and press and hold MUTE and SELECT until green light on remote flashes twice. Type "991" pause a moment, then press "1" again. Press "channel up" until television turns off. When tv turns off press "select" button on remote.
To enable "tv input" button on directv remote press and hold "mute" and "select" until green light flashes twice. Type "960"
Depending on the type of tv and receiver you have, you may want to program the remote using the receiver's interface but the method imdescribed is used by technicians when model of tv/code is not listed by receiver software. Good Luck!