I think I've had a related problem. Sometimes after having my 2018 iPad Pro 12.9" in the MK, and then swathing to the plain old Apple folio I cannot get the virtual keyboard to come up on the screen. Yes, I've pulled it off and placed the plain old folio on and off. I then re-boot several times, and finally get the virtual keyboard back.
I've also don't a "system preferences reset". Though I have not done a total reset.
Maybe it is hardware? I just don't know.