Good idea, I use magnets around the shop for a few things like this. A magnet hot glued on food cans make good pencil,scrub,center punch... holders.

But use a retractable key reel for my hand held power drill. If it didn't go back by itself it would be lost somewhere ,its factory key holder broke the first day.