On Thursday the court heard how Philip Convery was in the house at Mayogall Road near Magherafelt studying for his GCSE maths exam.
His uncle Martin Convery, 44, was helping him with his studies in the kitchen while his 70-year-old grandmother Teresa Convery, was in the living room.
All three were attacked and injured when two men, one of them wearing a balaclava, burst into the house on the evening of June 5, 2012, and demanded £10,000.
On trial at the crown court in Derry in connection with the incident, which both the prosecution and defence agree occurred, is Michael Mongan, 23, from White Rise in Dunmurry.
He denies beating the three members of the Convery family, possessing an iron bar and attempting to rob Martin Convery of £10,000.
He also denies driving without insurance a car which had its number plates removed and driving while disqualified.
A prosecution barrister told the jurors that Philip Convery underwent emergency surgery days after the attack.
"He was struck on the head with an iron bar and then had his face stood on.
"The head injuries he sustained resulted in him having to be admitted to the Royal Victoria Hospital in Belfast where he had an operation to remove a blood clot on his brain.
"It is the prosecution's case that the defendant stood on Philip's face before hitting him on the head with an iron bar", the barrister said.
The prosecutor said that the defendant, who was not wearing a balaclava, also struck Martin Convery several times on the head with the butt of a gun.
He added: "Martin Convery managed to escape from the house and he ran out onto the nearby road and flagged down a passing motorist.
"He was chased by the man wearing the balaclava and after a brief struggle he managed to wrest the iron bar from his pursuer.
"Martin then went back to the house and saw Philip on the ground with the defendant.
"He shouted that he was going to call for the police.
"The two men then got into a dark blue Vauxhall Vectra which had its number plates removed and drove off at speed", the barrister said.
He said that in subsequent police identity line-ups both Philip and his grandmother Teresa picked out the defendant but his uncle Martin picked out another person in the nine man line-up.
The defendant was arrested after the Vauxhall Vectra car, which he denied owning, was seen by police parked outside his Dunmurry home.
The prosecutor said the car had been spotted several times in the vicinity of the Convery home days before the incident.
The defendant was arrested and interviewed at Musgrave Street police station.
The prosecutor said: "When asked where he was on June 5 he said he was in Belfast all day in his home.
"He was again interviewed after the identity process and told he had been picked out. He denied he was involved in the incident.
"This is an identity case. There is no issue between the defence and the prosecution that the incident occurred.
"This terrifying ordeal actually occurred. The defence case is that the witnesses who picked out the defendant have made a mistake", the barrister told the jury.
The case, which is expected to last another seven days, continues before Judge Philip Babington.