A word of warning, not all key caps go back like this.
The top left key (double-s thing), right square bracket, backslash key, left control, left option, right option and the little cursor arrows (I think that's all) go in differently. If you use the above technique, they will break.
There are two 'hooks' and two 'clips'
For these, the 'hook' is reversed and at two corners of the key-cap. This means you have to insert the key cap vertically behind the butterfly mechanism to let the butterfly-lugs engage the 'hooks', then fold the key cap down flat onto the butterfly so the 'clips' lock onto the other pair of butter=fly lugs.
Most are the 'reverse hooks. at the top edge of the key-cap, so two top corners, with 'clips' at bottom edge of key-cap, but the cursor arrows are mostly "hooks" on left (iirc) and 'clips on right; the up and down arrows are reversed, and I can't remember which way round, so you do need to check carefully.