Here, the question asked is for the case when you want to remove the keyboard.
The keyboard cables are connected to the connector using a locking clip also known as cable retainer. It is made of plastic generally so be careful while handling it.
So, the sequence is such : there’s a base, in the brown color, having small yellow pins in the figure.
The next is the locking clip, it is written 1 on it twice.. and it is fitted on the base. The keyboard cables are connected to the base pins and they are hold using this retainer.
So, now in order to remove the keyboard, as the retainer is there, you first require to move it, then remove the cables.
First, hold the retainer, pull it for around 2 mm only in the direction of the cables, i.e. the upward direction as per the given figure. The most important thing is, make sure the retainer remains attached to the base and you do not pull it out completely, otherwise the lock is broken.
So, once you pull it up for 2 mm at maximum, you can then remove the cables as the thing holding those cables is upward so the connections can be removed now.
After removing the connections, put the locking clip back to its place. When you want to insert a keyboard again, follow the same procedure. Pull the retainer 2 mm up, insert the cables and then put it on its place.
This is the way to ensure that no harm is done to the cables.