One of our restrooms at work is a unisex bathroom with 1 toilet and a sink, no stall.
The door handle is permanently locked and you need a key to get in. On the inside there is a button on the door handle. When pushed a little metal rod sticks out of the keyhole preventing a key from being inserted. That way nobody can walk in on you while sitting on the John.
Is there a proper name for that kind of lock/door knob?
I don’t think I’ve ever seen anything exactly like what you describe. Perhaps I don’t get it right; but it sounds to me like you’d still have to extract the key (and bring it with you inside the facility) before pushing the button. So, what’s the point of that metal rod blocking the keyhole? I guess it could function as an extra precaution against lock-picking; but who would try to pick the lock of an occupied toilet on a workplace?
Maybe the restroom was originally some sort of safe room, to protect personnel from intruders? (Is the door bulletproof)? I’m not joking: I’ve been to a café located in a building which once was a bank, and the toilet there was in the old vault, with the half-tonne metal door still in place and functioning!
Various lock manufacturers have different ways of identifying the “function” of the lock. Typically, it involves a number and a description. Folly found a PDF advertising a Schlage lock with the 85 function, which Schlage describes as “Faculty restroom lock (with indicator cylinder)”. However, most other lock manufacturers that I’ve seen call this a “hotel” function. Also notice that Schlage mentions ANSI F93 for this lock; that’s a standard that exists across all manufacturers but might not be listed on the box or in the advertisement.
Here’s another example. Locksmiths generally call it “Privacy function.”
Schlage calls it 40.
Kwikset calls it 200.
ANSI calls it F76.
The outside of the box will likely say “Privacy” if it’s commercial grade, or “Bed and Bath” if it’s residential grade.
Often, there are minor variations of functions which have different numbers but the same name. For example, Schlage makes two lock functions 51 and 53, both of which are called “entry” function. You have to read the full description to see the subtle differences.
Back in the days before hotels went to card swipe locks, it was common to install hotel function locks on every guest room, using a master key system. Each room would have an individual key (called a “change key”) and the housekeeping crew would carry a master key which opened all the rooms unless the privacy button was pushed from the inside. The manager would have a special emergency master key which could override the privacy button, for situations such as a guest who had collapsed and needed medical attention. Now that hotels have gone to card swipe locks, this type of mechanical cylinder locks are extremely uncommon. I can see why Schlage would call it a “Faculty restroom lock” now.
I can easily imagine a lock like this being used in an office. Typically, the entire building would be master keyed. Each office would have its own change key and the front door would have its own change key. The master key would fit all the offices but not the front door. All the office keys would fit this restroom lock when it’s unoccupied. But when it’s occupied, even the master key wouldn’t fit. You’d need a special emergency key which is kept in a drawer at the receptionist desk. FWIW, making multiple change keys operate the same lock is a technique called “cross keying”. In a low-security application like a bathroom, the easiest way to make that happen is to leave most of the chambers empty in the lock cylinder. So, the person who opens up in the morning carries a front door key plus their office key. Most people carry only their office key, which also gets them into the restroom. The cleaning crew carries the master key and possibly a front door key as well, especially if they clean at night.
I had a hotel function Weiser knob on the shelf in my shop for nearly ten years and I finally threw it into the recycle bin rather than keep listing it on my inventory every year. It was a waste of space because nobody ever asked me for one.