Sooo...one of my keys quit working

:
2009 Mazda CX-9 Touring AWD
I replaced my key fobs and successfully programmed them to my 2009 Mazda CX-9 Touring model. Instead of programming two new keys at the dealer, I swapped the key heads onto the new remotes.

Yesterday the CX-9 started and drove fine with both keys. Today, only my wife’s key works. When I try mine I get the red flashing “key inside a car” red light. She mentioned she unlocked the car door with my key, not the remote, then used her key to drive.

Any thoughts on how to get the car to recognize my car again?
 

tex2670

Grand Poobah
And it's not the fob battery? When you press any button on the fob, do you see the red light on the fob blink? or is it really faint?
 
:
2009 Mazda CX-9 Touring AWD
It’s not actually the fob. It’s the key to start the car. The fobs work perfectly well.

It’s when I insert my key into the ignition and turn it, I get the rapidly flashing red security light.

Yesterday it worked fine. The only difference was my wife locked her keys in the car and used my key (not the fob) to unlock it then her key to drive off.
 
:
2009 Mazda CX-9 Touring AWD
UPDATE:

Problem solved! I had swapped my old key into the new housing but didn’t realize the signal dohickey was the little thing I took for a magnet in the old housing and didn’t move it. Put the old key in the old housing and it starts just fine!