iPad Pro 10.5 Smart Keyboard
I was having problems with my smart keyboard -- I tried several things including cleaning the contact on both the keyboard and the iPad. What finally worked was when I noticed a very slight bend in the keyboard. Straightening the keyboard allowed the contact to meet and everything returned to normal.
iPad Pro 10.5-inch, Wi-Fi, iOS 12.1, Apple Smart Keyboard