Specifically; the mangled lock of the case for a 1930s Erika M typewriter. This is a relatively heavy, expensive typewriter, so had a fairly solid case with a lock. The lock of this machine's case had however been badly mangled, the flip-up clasp had been pried off with brute force. Luckily it was still hanging on to the lock, albeit with only one (mangled) leg. To be able to re-fit this clasp, the holding-bracket needs to come off. To remove the holding-bracket, you need to get inside the lock. So the whole lock had to come off.
Luckily in this case, the lock is fitted not with rivets, but with split-pens - with some careful closing the split-ends and prying them up, the lock can be completely removed from the case lid.
Then the lock can be opened by removing two screws from the back cover. The lock itself is rusty, but the front plate and the holding-bracket and clasp are made of brass. Cleaning and careful bending (brass!) got the clasp back into shape again for re-fitting.
The whole thing re-assembled and given a polish, it is put back with the original split-pen nails into the case. The clasp now snaps open and closed again to hold the slide unlocking the case. With the right key it probably also locks fine again, but for now will not be pushing my luck with that :-)