Input and manual switch (1st. clean version)