“They entered the property which was unlocked but found it empty. They saw bullet holes in the living room wall and kitchen door,” he said.
Mr Keenan said the address was occupied by Patrick Beatson. Contact was made with the occupier and he attended a police station.
He confirmed he was at home alone when the shooting occurred and his children were elsewhere at the time.
Mr Keenan said: “He allowed the police to search his house, but would provide no further information.”
Footage of the gun crime was shown to the court.
It showed a white BMW car turning into the cul-de-sac before an individual emerged from the passenger side and ran towards the scene of the shooting.
Loud bangs could be heard.
The car was tracked on CCTV to Dalmeny, near South Queensferry, where it was found burnt out at a cycle path.
Defence counsel Mark Stewart KC told the court Robertson understood he faced a significant custodial sentence.
Lord Weir, told Robertson, who followed proceedings via a video link to prison: “The charges to which you have pleaded guilty and the agreed circumstances in which they arose raise matters of very real public concern.”
Robertson has previous convictions for serious assault, possession of weapons and attempted murder.
In 2007 he was jailed at the High Court for 10 years for shooting a former youth footballer in a murder bid.
Robertson discharged a sawn off shotgun at Jamie Ewart outside the Clermiston Inn in Edinburgh and hit him on the arm.
Det Ch Supt Dave Ferry, of Police Scotland, said: “While this was established as a targeted attack, it was a concerning incident for the local community.”
He will be sentenced on 14 January.