Just bought an older house and the bathroom fan is wired to this odd little switch with a keyhole in the middle of it. No key came with the place, so right now the fan is basically stuck however the last owner left it. Which in our case means it runs all the time, which is its own kind of annoying. I pulled the cover plate off to have a look and the switch itself is this chunky metal thing with paint splattered all over it, so it's clearly been there a while. The box behind it is pretty banged up too, walls bent inward a bit, so there's a gap around the switch where it sits. Not sure if that matters for finding a replacement or if I shold fix the box at the same time.
My main question is what this thing even is. Is it some kind of keyed switch meant to stop tenants or kids from messing with the fan? And if I swap it for a regular single switch, is that a drop in job or is there something wierd about how it's wired I should watch for? Obviously I'd kill the breaker before touching any wires. Would love to hear if anyone's run into one of these before.