I was having this debate myself, with the following conclusion: if the ball strikes a player in touch without him/her making any movement to knock or kick it, then the ball, even if it has not crossed the plane of the touchline, has been put in touch by the last player in the field of play to touch it. If a player in the same situation strikes at, and connects with, the ball with hand/arm or foot/lower leg, then the ball is not (yet) in touch. I suppose that it would also count if he/she deliberately headed or chested it.