auto detect key type for import