Learning LG codes for 40.0 remote

I have LG TVs and an LG home theater in a box. I am having problems trying to program the 40.0 remote. I can use code 1423 to set the TV up. Everything works fine except the up, down, left, right arrows. When I use learning function for these, the remote doesn't learn a single press. It learns multiple presses instead. When I press the down arrow, it transmits two or three presses.

I programmed the home theater in a box for the auxiliary volume controls and mute using the learning function and have the same problem with them. Volume up and down doesn't really matter. The real problem is the mute button. When I press it, it mutes then unmutes. Sometimes it mutes, unmutes, and then mutes again. The last action is OK since it eventually winds up muting, but it's not consistent.

Can anyone suggest a solution for me? I tried searching the forum for a solution, but it won't let me search for a 2-letter word, so searching for 'LG' is out.