I thought for sure that I had already filed this bug, but I can't find it now.
PKEY-FCN lets you lock and unlock PDOOR ("door made of oak") by turning the key, though you probably have to "TURN KEY WITH object" for it to work.
However, it doesn't check if the key is in the keyhole, so as long as you are carrying the key (and nothing else prevents you from locking/unlocking the door, e.g. the letter opener is still in the lock), you can do it from anywhere:
>LOOK
Room 8
This is a small chamber carved out of the rock at the end of a short crawl. On
the wall is crudely chiseled the number "8".
>TURN RUSTY IRON KEY WITH SWORD
The door is locked.
>TURN RUSTY IRON KEY WITH SWORD
The door is now unlocked.
I thought for sure that I had already filed this bug, but I can't find it now.
PKEY-FCN
lets you lock and unlockPDOOR
("door made of oak") by turning the key, though you probably have to "TURN KEY WITH object" for it to work.However, it doesn't check if the key is in the keyhole, so as long as you are carrying the key (and nothing else prevents you from locking/unlocking the door, e.g. the letter opener is still in the lock), you can do it from anywhere: