Check your connectors if you have connectivity problems with the Smart Keyboard
I used to have problems with my Smart Keyboard sometimes not responding when I moved the iPad around. A quick look at the connector suggested that the magnetic dock stripes on the keyboard don’t have equal distance to the pins. This means that the iPad does not dock right on the center and movements could easily push the pins outside the 3 circular connectors.
Anyway I went back to the store and told them that. They sent it back to Apple and which replaced it with a new one. This time the difference in distance is much smaller and the connection hasn’t broken once.
Apart from using a measuring tape you might also be able to tell if the pins are not correctly lined up if you see pressure/dirt marks on your connector that are way to far on the side.