It almost became Ianto Jones' quiet, instinctive habit. Whenever Jack proposed that the team do something - anything - that made Ianto fearful for their lives, his hand would search out the nearest piece of wooden furniture and he'd knock on it. Knock on wood was a saying meant to bring good fortune, so Torchwood's coffee boy figured it would bring him Jack, for Jack was as close to fortune as he'd ever get.
He assumed that Jack knew, in Torchwood it was smarter to assume that Jack knew and try to hide things from the others, so in front of him he didn't bother knocking on the underside of the table or only using one knuckle to be quieter. If Jack was the only one around then he just knocked on the table. But if Tosh, Owen or Gwen showed their face then he took what he jokingly called 'evasive action'. But he never let on as to why he'd taken up the habit.
Jack would probably only laugh at him.
