Hi! It’s seems that is a construction building problem on the Smart Keyboard that Apple doesn’t fix, and still sell it until now anyway. So if somebody haven’t had the problem yet, it’s just like a matter of time to start to have some headaches with the Keyboard. The Keyboard problem is that as long passes the time, it starts to oxidize/corrode and also the three pins (the middle one specifically) goes down and doesn’t stay at same high level that the other ones, causing to not connect properly with the iPad. The way to fix this problems requires some time and paciency (it’s not hard but also not so easy). I suggest you to watch this video and follow his steps:[br]
https://m.youtube.com/watch?v=buNYHzMZJdk