If your key has electronics, best thing to do is make a cheap copy with no electronics and keep that in your shorts. You'll be able to use that key to get into your car but not start it, but you'll keep the real key hidden inside the car.
Besides keeping your genuine key safely out of the water, you prevent yourself from accidentally locking yourself out of your car- I keep the dumb key permanently in the key loop of my shorts so it's always with me.