automatically detect display input