This holder is designed to hold the chuck key for a Delta DP350 drill press, but can be used for any chuck key that has a shaft approximately 8mm in diameter. I made the the recess in the bottom to epoxy in a 1/2" diameter rare-earth magnet.
I built it using Tinkercad. The project is available here if you need to modify it: https://www.tinkercad.com/things/jmK0YQmzaTg-chuck-key-holder-v3
Update: I made an SCAD model that you can customize, just click the "Open in Customizer" button. The defaults will give you the same result as the chuck_key_holder.stl file. I don't have any limits on the parameters; for instance you can have the magnet recess intersect the through hole if you are not careful. So double check your numbers and view the model from all angles before you hit the "Create Thing" button.