Your best bet is just to get a used/new gas cap with keys. Use mini long flat screw driver to push the latch under the cap and replace. It's a pain, but I had to do it twice on xs750 tanks. Easier done if you take the tank off.
Yes, you can "re-key" it to work with any key that will insert into the lock. The problem is, Yamaha used up to 4 or 6 different key styles. Some offset left, some right, some had narrow grooves down the sides, some wide. You need to find the style that will insert into your lock.
The lock cylinder itself uses spring-loaded sliding plates as "tumblers". The top 4 or 5 engage the key and work the lock. They have rectangular cut-outs in them for the key to pass through. The height of the cut-out determines what key notch they work with. The one at the bottom locks the cylinder into the housing. You need to reach down into the bottom of the lock with a pick of some sort and slide that bottom plate over to release the cylinder from the housing.
Once you have it out, you'll notice that all the plates stick out one side of the cylinder. Inserting the right key will pull them all down flush so the cylinder can be turned. The wrong key may pull some flush but the rest will still stick out above or be pulled too far and stick out the bottom.
If you're lucky, you can just swap some of the "wrong" plates around and things will line up. If a plate pulls too far, you can file the cut-out larger so it pulls flush. If it doesn't pull enough, you need to replace the plate or remove it completely (leave it out).
Couldn't you just take all mechanisms out to work with a knife if need be?! My CX500 whenever I bought it I asked for the ignition key. The guy smiled and said just turn it with your house key and it'll work.
Yes I just did . Once I remove the part that has the tumblers. I turned it over and there was a spring loaded release on the bottom side . I used a pen knife to push in the clip and pushed out the tumbler carrier . Once I removed them I put it back together and used a old model (70-80s ) chevy door key.
One more item taken care of .
I lost the key for my 75, I removed the tumblers from both the tank and seat locks. I replaced the switch with one from the farm supply, same switch they want $40 for in the catalogs I got for $16.
I use any key to open the tank and seat.
I took a few pics this morning to add some pictures to the words.
You need a pick like I've shown or something similar to push the bottom retatining plate over before the tumbler can to pushed out. I used the pick and a small screwdriver to put pressure on the back of the tumbler to push it out. I also held the spring tension off the closer latch in the open position to keep pressure off of the tumbler.
You can see how the key makes all the plates flush with the barrel. There is also a picture of what the plates look like.
The plates in my lock must be taken out. Last summer I was about 80 miles from home and stopped for gas. I didn't have my gas cap key with me. I usually leave the ignition key in it and I don't have it on a keyring. I didn't know what I was going to do. So, I pulled out a slim flat blade screwdriver and it turned with no problem. Thankfully.
Well, I decided that using a key on the gas tank was a pain so I modified my lock with a metal tab that I just press to open the tank. I left the non functional lock there for appearance and to maybe fool a siphoner, but I don't really care if the gas is stolen.