Connecting a USB keyboard to Xiaomi Mi A1
I have the same device. Female to female adapter as pointed out in comments doesn't work. You have to use OTG adapter. I use it for USB storage

Aside, phone only works with vfat formatted USB / Ext. SD unless you use custom kernel