I'm not going to get deep into how X-10 works. Do a Google search for the details if you don't know.
This particular keychain will turn lights on and off using the RF codes to an X-10 module that transmits digital signals to light switches I have though out the house. It's a bit old and stupid looking but works.
It is capable of turning two different lights on or off. It also has a unit code selector in the back to change it from units 1&2 or 5&6 as well as the typical X-10 hose code wheel.
Step 1: Remote Parts
Step 2: Gutted Remote
Step 3: Wire It Up
This keychain had a selector switch for unit coded 1&2 or 5&6 as well as the normal a-k house code wheel.
I removed the wheel and eyeballed which contacts to solder up for house code A.
I solderd leads to the original switch pads for unit code 5 off and on. The blue pair is off, orange is on. I got one of them a little to hot (the blue wire) and it lifted the pad from the circuit. Although it was a little tough to solder this small, I traced it back to the chip and solderd it there instead.
Remove the battery terminals on the bottom and add leads for power. That's the brown pair sticking out. They are labeled + and - on the circuit board.
Step 4: Easy Button Innards
This thing is actually a bit tight inside. It's all about the feel of the button. The metal spring gives that nice tight snap feeling best described as "oil can effect". The switch is all I care about so I cut the traces on the circuit for it. I also removed the white and black wires for the battery, removed all the screws and made it all the way to the little speaker. The cavity for the speaker is about the only space available to stick anything inside without messing with the "feel" of the switch.
Step 5: Surgery
The metal round things glued on the sides are weights. Again to give a better feel and a little heft.
Step 6: Screw It Up
Step 7: Screw It Some More
Step 8: Back Door
Although I didn't get pictures of the process, I added a second switch on the bottom to the orange pair you see in step 3. I used black hot melt glue to put it in place so it doesn't photograph well. This allows me to turn the bedroom light back on.
Step 9: Turn It On
Step 10: That Was Easy!
That was easy!
It looks normal and sits on my desk right next to my bed where I can turn the bedroom light off after climbing in.