I had a problem removing a gas cap on a project bike. I was able to remove it finally, but the detents that move when you work the key in the gas cap were reluctant to move, so I decided to remove the cap innards and clean it.
I used a #1 Phillips and an impact driver to loosen the screws, I wouldn't recommend trying it with a screwdriver, use the right tool for the job.
Remove the beveled-side bowl, that the screws hold in place, and be careful because the detents will probably fall out when you remove the beveled-side bowl. There are two tiny springs 90 degrees from the machine screw holes. Don't lose these! They aren't held in place by anything. I suggest disassembly in an old sheet cake pan that your wife wore-out, to help keep track of your small parts.
Use solvent and perhaps a wire wheel to remove any gum or that white corrosion powder you find.
To reassemble, take the thin washer with the square hole and grease it both sides. Place it onto the upside-down gas cap. Now place the little springs 90 degrees from the machine screw holes, on top of that thin washer with the square hole.
Put some grease on the detents, and then stick the detents into the notches in the side of the beveled-side bowl. The grease should hold the detents in place in the beveled-side bowl notches.
Place the beveled-side bowl onto the gas cap. I suggest using replacement M4 allen-head machine screws instead of the Phillips head screws to hold the beveled-side bowl and the gas cap together. That should be it.
Work the key and ensure that the detents smoothly move in and out as you turn the key back and forth. I've found that the detents aren't spring-loaded, that you need to rotate the key to release it or to lock it.
You might try some no-residue aerosol solvent in the key slot, let it dry thoroughly, and then a squeeze or two of powdered graphite into the keyhole. Then insert your key, and work the key back & forth to distribute the graphite.
Now you should have a smoothly-operating locking-key gas cap. This would be a good time to avoid a propwash moment, when you destroy your key without having a duplicate. If you don't have a duplicate key, get one.
I used a #1 Phillips and an impact driver to loosen the screws, I wouldn't recommend trying it with a screwdriver, use the right tool for the job.
Remove the beveled-side bowl, that the screws hold in place, and be careful because the detents will probably fall out when you remove the beveled-side bowl. There are two tiny springs 90 degrees from the machine screw holes. Don't lose these! They aren't held in place by anything. I suggest disassembly in an old sheet cake pan that your wife wore-out, to help keep track of your small parts.
Use solvent and perhaps a wire wheel to remove any gum or that white corrosion powder you find.
To reassemble, take the thin washer with the square hole and grease it both sides. Place it onto the upside-down gas cap. Now place the little springs 90 degrees from the machine screw holes, on top of that thin washer with the square hole.
Put some grease on the detents, and then stick the detents into the notches in the side of the beveled-side bowl. The grease should hold the detents in place in the beveled-side bowl notches.
Place the beveled-side bowl onto the gas cap. I suggest using replacement M4 allen-head machine screws instead of the Phillips head screws to hold the beveled-side bowl and the gas cap together. That should be it.
Work the key and ensure that the detents smoothly move in and out as you turn the key back and forth. I've found that the detents aren't spring-loaded, that you need to rotate the key to release it or to lock it.
You might try some no-residue aerosol solvent in the key slot, let it dry thoroughly, and then a squeeze or two of powdered graphite into the keyhole. Then insert your key, and work the key back & forth to distribute the graphite.
Now you should have a smoothly-operating locking-key gas cap. This would be a good time to avoid a propwash moment, when you destroy your key without having a duplicate. If you don't have a duplicate key, get one.