Is a physical key capable of this?

So i’m staying in this inn tonight, it’s a small, 20-30 room place, really nice.

All of the doors open inside of the building, and you need to use your room key to open the main door to the inn, walk to your room, and open your room with the same key.

My question is, how can a physical key open the main door, and my room, but no other doors?

Or am I being bamboozled?

If it is a physical metal key I think they could use a generic “blank” lock for the common doors. Same side groves as your door key but the lock on the common doors would accept any of the bumps on the key. Your actual door key would need to accept the bumps on the key for that specific lock.

An ordinary mechanical key has, essentially, a number of “pegs” that need to fit the lock. And the lock has little sliding bits that the pegs push aside, allowing it to turn. You can have a lock on the common doors where some of the sliding bits are missing, so the key needs to fit the first 6 slots, but any combination of pegs will work for the other 4 slots. The bedroom door lock would have all its sliding bits, so all 10 pegs need to be at the right height to free it.

Thanks! Ignorance fought

It could be a master-key system, especially a particular type like a Maison key system. There is nothing special about the physical key, but the locks are configured to open to a certain correct set of keys instead of just one.

Yes it is, and it makes the lock less secure.
The short version,
https://www.youtube.com/watch?v=8U6rdI_uG2c
The ‘more than I needed to know’ version,
https://www.youtube.com/watch?v=aVPSaKLKHd4

CMC

A master key is one step beyond what the OP describes (though it may well be a master key system): If there’s a master key (presumably only held by the employees of the inn), that single key can open all of the doors in the inn. You need a slightly fancier lock for that, and it’s significantly less secure than a system without a master key, but it can be done.

No, not a ‘fancier’ lock. Assuming a pin tumbler lock, you just need to have wafers in addition to driver and key pins in your pinning supplies.

CMC

This is right on the money. Master key systems like this can get quite complex as well, with multiple levels of master keys for different floors/buildings or entire campuses.

When I was a locksmith once we had a job to master key an entire building. It was for a well-known DoD contractor who I will not name here, but it was their headquarters and the CEO insisted he possess a key that opened every single door in the building, along with several other levels of access for others.

We spent a couple of hours drawing up an alternative plan that would result in much more secure locks but a separate master for every floor (it was a large building). He simply did not understand (or care to bother trying to understand), and insisted on the original plan. “Whatever; your money, your job” is what we said to each other and proceeded to load up every cylinder in the place with tiny wafer pins so this idiot could have his “One Key to Rule Them All.” By the time we finished, you barely even needed keys; I swear you could almost just hip-check open any door in the building.

Key management can be monstrously complex. When I was in college, I worked at the campus TV station and lived in the dorms. The key for my dorm contained three levels of access - the building’s front doors, the floor button in the elevators, and my room. The key for the TV station had two - the building, and the equipment pool room where the portable cameras and tape recorders were kept so the journalism students couldn’t just grab them willy-nilly.

In theory, this works. In practice, locks and keys wear down, and unless you change the warding (the cross-section shape of a key and its slot in a lock) there’s just so many permutations of what’s possible. My dorm room key would open the TV station door, but not the equipment room, so I probably had some accidental level of master access in my pocket, and who knows what other locks I might have had access to?

Yeah, it was similar at my college - I had a key that would get me into the building, into the suite shared with three other people, and into my bedroom, but my key wouldn’t open other bedrooms or suites.