My understanding of the diamond shaped keys:
The battery is only for the remote functions. There are two separate circuits on the circuit board in they key.
1. Remote functions use a battery in the key and locks and unlocks doors etc... This can be easily programmed to work with your car as long as the frequency is the same (from same country I think).
2. Vehicle security system that uses passive RFID from the steering column and the EWS system. It does not use the battery inside of the key. The steering column reads the keys transponder chip and once verified it allows the car to start. It works by using two coils one in the key and one in the column. The valet key and the wallet key have the transponder and coil, but no battery or remote functions.
These two systems are totally independent except that I believe the coil also charges the battery while in the ignition.
I have read that the security system (EWS) is made with ten transponder chips and four came with the car when new. Two master keys, one Valet and one Wallet key. This leaves six available for a dealer to sell you new keys. I don’t think it’s possible or feasible to program a new transponder chip. If you have a non working master key it is possible to remove its transponder chip and transplant this to a working key, provided that the chip is functioning.
Sorry for the long winded reply, hope it makes sense, Mark