I get this output, which looks fine to me:
> move painting
As you unhook the painting and put it gently on the floor, you reveal a small key hanging on the crooked nail upon which the painting had hung.
> take key
You take the key from the crooked nail on the wall and slip it into your pocket.
> use key on desk
As you put the key into the keyhole of the desk drawer and turn, you hear a loud clicking noise.
> open desk
You open the desk using the key.
> x desk
It is a fine mahogany desk of excellent craftmanship. The middle drawer is adorned with a brass ring.
It contains a book and matches.
Is this not the behaviour you expect?