This occurs when you are using an uncertified lightning to USB adapter. For Apple devices, it is highly recommended that you use original equipment, as most third-party equipment is unrecognized by Apple products. You can buy the official lightning to USB 3 camera adapter to connect your USB keyboard. It also comes with a charging port that can help power the keyboard (in case of lack of power).