inputtype, imeoption,hasIME flag

Update to refine check for keyboard and setting types and imd options.