auto judge key type